Combinational Circuits

COS2621 - Computer Organisation · Digital Logic Design

Combinational Circuits

Combinational circuits are a type of digital circuit where the output depends only on the current inputs. They do not have memory elements, meaning the output is a direct function of the inputs at any given time. This is different from sequential circuits, where the output can depend on past inputs as well.

Basic Concepts

In combinational circuits, the relationship between inputs and outputs can be expressed using Boolean algebra. Each output can be represented as a function of the inputs. For example, if you have two inputs, A and B, and one output, F, the output can be defined by a Boolean expression like F = A AND B.

Remember: The output of a combinational circuit is determined only by its current inputs.

Common Types of Combinational Circuits

Several types of combinational circuits are commonly used in digital systems. These include:

  • Adders: Circuits that perform addition.
  • Subtractor: Circuits that perform subtraction.
  • Multiplexers: Circuits that select one of several inputs to be the output.
  • Decoders: Circuits that convert binary information from n input lines to a maximum of 2^n unique output lines.
  • Encoders: Circuits that perform the reverse operation of decoders.

Adders

Adders are fundamental combinational circuits that perform addition of binary numbers. The simplest form is the half adder. A half adder has two inputs and two outputs:

  • Sum (S)
  • Carry (C)

The truth table for a half adder is as follows:

ABSum (S)Carry (C)
0000
0110
1010
1101

The Sum output can be expressed as:

S = A XOR B

The Carry output can be expressed as:

C = A AND B

Full Adder

A full adder is an extension of the half adder. It adds three bits: two significant bits and a carry-in bit. It has three inputs (A, B, and Cin) and two outputs (Sum and Carry-out). The truth table for a full adder is:

ABCinSumCout
00000
00110
01010
01101
10010
10101
11001
11111

The Sum output can be expressed as:

Sum = A XOR B XOR Cin

The Carry-out can be expressed as:

Cout = (A AND B) OR (Cin AND (A XOR B))

Multiplexers

A multiplexer (MUX) is a combinational circuit that selects one of several input signals and forwards the selected input to a single output line. A multiplexer with 2^n inputs has n selection lines. For example, a 4-to-1 multiplexer has four inputs (I0, I1, I2, I3) and two selection lines (S0, S1).

The truth table for a 4-to-1 multiplexer is as follows:

S1S0Output
00I0
01I1
10I2
11I3

The output can be expressed as:

Output = (I0 AND NOT S1 AND NOT S0) OR (I1 AND NOT S1 AND S0) OR (I2 AND S1 AND NOT S0) OR (I3 AND S1 AND S0)

Watch out: Ensure that the selection lines are correctly connected to the multiplexer inputs. Incorrect connections will lead to wrong outputs.

Decoders

A decoder is a combinational circuit that converts binary information from n input lines to a maximum of 2^n unique output lines. For example, a 2-to-4 decoder has two inputs (A1, A0) and four outputs (O0, O1, O2, O3).

The truth table for a 2-to-4 decoder is:

A1A0O0O1O2O3
001000
010100
100010
110001

The output can be expressed as:

O0 = NOT A1 AND NOT A0

O1 = NOT A1 AND A0

O2 = A1 AND NOT A0

O3 = A1 AND A0

Encoders

An encoder is a combinational circuit that converts 2^n input lines into n output lines. For example, a 4-to-2 encoder has four inputs (I0, I1, I2, I3) and two outputs (O0, O1). The truth table for a 4-to-2 encoder is:

I0I1I2I3O0O1
100000
010001
001010
000111

The output can be expressed as:

O0 = I1 OR I3

O1 = I2 OR I3

Designing Combinational Circuits

To design a combinational circuit, follow these steps:

  1. Define the problem and identify the inputs and outputs.
  2. Create a truth table that lists all possible input combinations and their corresponding outputs.
  3. Derive the Boolean expression for each output using the truth table.
  4. Simplify the Boolean expressions using Boolean algebra or Karnaugh maps.
  5. Implement the circuit using logic gates.

Example: Designing a Simple Combinational Circuit

Suppose you want to design a combinational circuit that outputs 1 when the input A is 1 and B is 0. The inputs are A and B, and the output is F.

Step 1: Define the Problem

Inputs: A, B

Output: F

Step 2: Create a Truth Table

ABF
000
010
101
110

Step 3: Derive the Boolean Expression

From the truth table, the output F is 1 only when A is 1 and B is 0. The Boolean expression is:

F = A AND NOT B

Step 4: Simplify the Expression

The expression is already in its simplest form.

Step 5: Implement the Circuit

Use an AND gate and a NOT gate to implement the circuit:

F = A AND NOT B

Conclusion

Combinational circuits are essential in digital systems. They perform various functions such as addition, selection, and encoding. Understanding how to design and implement these circuits is crucial for working with digital electronics.

Summary:

  • Combinational circuits output depends only on current inputs.
  • Common types include adders, multiplexers, decoders, and encoders.
  • Designing a combinational circuit involves defining the problem, creating a truth table, deriving Boolean expressions, simplifying them, and implementing the circuit.

Check your understanding

  • What is the difference between a half adder and a full adder?
  • How does a multiplexer function?
  • What is the output of a 2-to-4 decoder when the inputs are 01?
  • Describe the steps in designing a combinational circuit.