Combinational Circuit
Definition
A Combinational Logic Circuit (CLC) is a digital circuit whose output depends only on the present inputs. There is no memory of past inputs.
Characteristics
- Output depends solely on current inputs
- No storage or feedback
- Delay exists due to gate propagation
- Used for arithmetic, data routing, and logic operations
Basic Logic Gates
1. AND Gate: Output = (High if all inputs are 1)
A βββ ββΒ·β OutputB βββ2. OR Gate: Output = (High if any input is 1)
A βββ ββ + β OutputB βββ3. NOT Gate (Inverter): Output = (Inverts input)
A ββββ Output4. XOR Gate: Output = (High if inputs are different)
A βββ ββββ OutputB βββ5. NAND Gate β Output = (NOT-AND)
A βββ βββΌβ OutputB βββ
- Universal GATE6. NOR Gate β Output = (NOT-OR)
A βββ βββ½β OutputB βββ
- Universal GATE7. XNOR Gate β Output = (High if inputs are same)
A βββ βββββ OutputB βββUniversal Gate
A universal gate can implement any logic function
1. NAND as Universal Gate β
- NAND can implement any logic function
- NAND gate can form:
- NOT:
- AND:
- OR:
- Reason: NAND combinations can generate all basic gates
- Advantage: Simplifies hardware design, reduces cost
2. NOR as Universal Gate β
- NOR can also implement any logic function
- NOR gate can form:
- NOT:
- OR:
- AND:
- Reason: NOR combinations can generate all basic gates
- Advantage: Useful in memory circuits and logic simplification
Basic Combinational Circuits
1. Half Adder β
- Adds two single-bit numbers (A, B)
- Sum (S) =
- Carry (C) =
A ββββ ββββ SB ββββ
A ββββ ββΒ·β CB ββββ2. Full Adder
- Adds three bits (A, B, Cin)
- ==Sum== =
- Carry = β
3. Half Subtractor:
- Diff = ,
- Borrow = β
4. Full Subtractor:
- Diff = ,
- Borrow =
5. Multiplexer (MUX)
- Selects one input from many
- n-to-1 MUX has n inputs, select lines, 1 output
6. Demultiplexer (DEMUX)
- Routes single input to one of many outputs
- 1-to-n DEMUX has 1 input, select lines, n outputs
7. Encoder
- Converts inputs into n-bit code
- Example: 8-to-3 encoder
8. Decoder
- Converts n-bit input to outputs
- Example: 3-to-8 decoder
Applications
- Arithmetic operations (Adders, Subtractors)
- Data routing (MUX/DEMUX)
- Code conversion (Encoder/Decoder)
- Logic functions in processors
Important Combinational Circuits
Section titled βImportant Combinational Circuitsβ1. Half Adder β
- Adds two single-bit numbers (A, B)
- Sum (S) = A β B
- Carry (C) = A Β· B
Truth Table:
| A | B | Sum (S) | Carry (C) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Circuit Diagram:
A ββββ ββββ SB ββββ
A ββββ ββΒ·β CB ββββ2. Full Adder
- Adds three bits (A, B, Cin)
- Sum = A β B β Cin
- Carry = (A Β· B) + (B Β· Cin) + (A Β· Cin) β
Truth Table:
| A | B | Cin | Sum | Carry |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Circuit Diagram:
A βββ ββββ\ B βββ \ β β Sum Cin ββββββ/
A βββ ββΒ·β\ B βββ \ + β Carry Cin ββββββ/3. Half Subtractor
- Diff = A β B
- Borrow = AΜ Β· B
Truth Table:
| A | B | Diff | Borrow |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
Circuit Diagram:
A ββββ ββββ DiffB ββββ
A βββ ββββ\ Β·β BorrowB ββββββ/4. Full Subtractor
- Diff = A β B β Bin
- Borrow = AΜ Β· B + (AΜ β B) Β· Bin
Truth Table:
| A | B | Bin | Diff | Borrow |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
Circuit Diagram:
A βββ ββββ\ B βββ \ β β Diff Bin ββββββ/
A βββ ββββ\ B βββ \ + β Borrow Bin ββββββ/5. Multiplexer (MUX)
- Function: Selects one input from many based on select lines
- n-to-1 MUX: inputs, select lines, 1 output
- Truth Table (4-to-1 example):
| S1 | S0 | Y |
|---|---|---|
| 0 | 0 | I0 |
| 0 | 1 | I1 |
| 1 | 0 | I2 |
| 1 | 1 | I3 |
Circuit Diagram (4-to-1):
I0 βββI1 βββ€I2 βββ€ββββI3 βββ ββ Y βS1 βββββββS0 βββββββ6. Demultiplexer (DEMUX)
- Function: Routes single input to one of many outputs based on select lines
- 1-to-n DEMUX: 1 input, select lines, outputs
- Truth Table (1-to-4 example):
| S1 | S0 | Y0 | Y1 | Y2 | Y3 |
|---|---|---|---|---|---|
| 0 | 0 | I | 0 | 0 | 0 |
| 0 | 1 | 0 | I | 0 | 0 |
| 1 | 0 | 0 | 0 | I | 0 |
| 1 | 1 | 0 | 0 | 0 | I |
Circuit Diagram (1-to-4):
ββ Y0I βββββ€ ββ Y1 ββ Y2 ββ Y3
S1 βββS0 βββ7. Encoder
- Function: Converts inputs into n-bit code
- Example: 8-to-3 encoder
| Inputs (I0-I7) | Output (Y2 Y1 Y0) |
|---|---|
| 00000001 | 000 |
| 00000010 | 001 |
| 00000100 | 010 |
| 00001000 | 011 |
| 00010000 | 100 |
| 00100000 | 101 |
| 01000000 | 110 |
| 10000000 | 111 |
Circuit Diagram (8-to-3):
I0 βββI1 βββ€I2 βββ€βββ> Y0,Y1,Y2I3 βββ€I4 βββ€I5 βββ€I6 βββ€I7 βββ8. Decoder
- Function: Converts n-bit input to outputs
- Example: 3-to-8 decoder
| Input (A2 A1 A0) | Output (Y0-Y7) |
|---|---|
| 000 | 00000001 |
| 001 | 00000010 |
| 010 | 00000100 |
| 011 | 00001000 |
| 100 | 00010000 |
| 101 | 00100000 |
| 110 | 01000000 |
| 111 | 10000000 |
Circuit Diagram (3-to-8):
A0 βββA1 βββ€ βββ> Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7A2 βββMultiplexer & Demultiplexer
Section titled βMultiplexer & Demultiplexerβ1. Multiplexer (MUX)
Definition:
A Multiplexer is a combinational circuit that selects one input line from multiple inputs and forwards it to a single output line, based on select lines.
Key Points:
- Also called data selector
- Reduces number of data lines by combining them
- Requires n select lines to select from 2βΏ inputs
Multiplexer (MUX) Significance
- Allows selection of one data line from many inputs using select lines.
- Reduces hardware by sharing a single communication line.
- Used in data routing, ALU input selection, signal switching.
Block Diagram:
I0 βββββββββββ I1 ββ| 4 x 1 |ββ OUT I2 ββ| MUX | I3 βββββββββββ | | S1 S0 Select LinesTruth Table (4:1 MUX example):
| S1 | S0 | OUT |
|---|---|---|
| 0 | 0 | I0 |
| 0 | 1 | I1 |
| 1 | 0 | I2 |
| 1 | 1 | I3 |
2. Demultiplexer (DEMUX)
Definition:
A Demultiplexer is a combinational circuit that takes a single input and routes it to one of several output lines, based on select lines.
Key Points:
- Opposite of MUX
- Requires n select lines for 2βΏ outputs
Demultiplexer (DEMUX) Significance
- Routes one input signal to one of many output lines based on select lines.
- Used in serial-to-parallel data conversion.
- Common in communication systems for data distribution.
Block Diagram:
βββββββββββ O0IN ββ| 1 x 4 |ββ O1 | DEMUX |ββ O2 βββββββββββ O3 | | S1 S0 Select LinesTruth Table (1:4 DEMUX example):
| S1 | S0 | O0 | O1 | O2 | O3 |
|---|---|---|---|---|---|
| 0 | 0 | IN | 0 | 0 | 0 |
| 0 | 1 | 0 | IN | 0 | 0 |
| 1 | 0 | 0 | 0 | IN | 0 |
| 1 | 1 | 0 | 0 | 0 | IN |
Summary Table:
| Feature | Multiplexer | Demultiplexer |
|---|---|---|
| Function | Many β One | One β Many |
| Inputs | 2βΏ | 1 |
| Outputs | 1 | 2βΏ |
| Control | n select | n select |
| Example | 4:1 MUX | 1:4 DEMUX |
Encoder & Decoder
Section titled βEncoder & DecoderβEncoder
An Encoder is a combinational circuit that converts 2βΏ input lines into n output lines by encoding the active input into binary form.
Key Points:
- Works opposite to Decoder
- Only one input should be active at a time
- Example: 8-to-3 encoder β 8 inputs, 3 outputs
Encoder Significance
- Converts active input line into binary code.
- Reduces number of bits needed to represent multiple signals.
- Used in keyboards, priority systems, and digital communication.
Block Diagram (4-to-2 Encoder):
I0 I1 I2 I3 β β β β βββββββββ βEncoderβ 4x2 βββββββββ β β Y1 Y0 (Binary output)Truth Table (4-to-2 Encoder):
| I3 | I2 | I1 | I0 | Y1 | Y0 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
Decoder
A Decoder is a combinational circuit that converts n input lines into 2βΏ output lines, activating only one output for each input combination.
Key Points:
- Opposite of Encoder
- Used for address decoding in memory systems
- Example: 2-to-4 decoder β 2 inputs, 4 outputs
Decoder Significance
- Converts binary input into a single active output line.
- Used for address decoding in memory, display systems, and instruction decoding.
Block Diagram (2-to-4 Decoder):
A1 A0 (Inputs) β β βββββββββ βDecoderβ 2X4 βββββββββ β β β β O0 O1 O2 O3Truth Table (2-to-4 Decoder):
| A1 | A0 | O0 | O1 | O2 | O3 |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 |
Summary Table:
| Feature | Encoder | Decoder |
|---|---|---|
| Function | ManyβFew | FewβMany |
| Inputs | 2βΏ | n |
| Outputs | n | 2βΏ |
| Example | 8:3 Encoder | 3:8 Decoder |