Skip to content

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 = Aβ‹…BA \cdot B (High if all inputs are 1)

A ──┐
β”œβ”€Β·β”€ Output
B β”€β”€β”˜

2. OR Gate: Output = A+BA + B (High if any input is 1)

A ──┐
β”œβ”€ + ─ Output
B β”€β”€β”˜

3. NOT Gate (Inverter): Output = Aβ€Ύ\overline{A} (Inverts input)

A β”€β”€βŠ™β”€ Output

4. XOR Gate: Output = AβŠ•BA \oplus B (High if inputs are different)

A ──┐
β”œβ”€βŠ•β”€ Output
B β”€β”€β”˜

5. NAND Gate – Output = Aβ‹…Bβ€Ύ\overline{A \cdot B} (NOT-AND)

A ──┐
β”œβ”€βŠΌβ”€ Output
B β”€β”€β”˜
- Universal GATE

6. NOR Gate – Output = A+Bβ€Ύ\overline{A + B} (NOT-OR)

A ──┐
β”œβ”€βŠ½β”€ Output
B β”€β”€β”˜
- Universal GATE

7. XNOR Gate – Output = AβŠ•Bβ€Ύ\overline{A \oplus B} (High if inputs are same)

A ──┐
β”œβ”€βŠ•βŠ™β”€ Output
B β”€β”€β”˜

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: Aβ€Ύ=AΒ NANDΒ A\overline{A} = A \text{ NAND } A
    • AND: Aβ‹…B=AΒ NANDΒ Bβ€Ύ=(AΒ NANDΒ B)Β NANDΒ (AΒ NANDΒ B)A \cdot B = \overline{A \text{ NAND } B} = (A \text{ NAND } B) \text{ NAND } (A \text{ NAND } B)
    • OR: A+B=(Aβ€ΎΒ NANDΒ Bβ€Ύ)=(AΒ NANDΒ A)Β NANDΒ (BΒ NANDΒ B)A + B = (\overline{A} \text{ NAND } \overline{B}) = (A \text{ NAND } A) \text{ NAND } (B \text{ NAND } B)
  • 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: Aβ€Ύ=AΒ NORΒ A\overline{A} = A \text{ NOR } A
    • OR: A+B=Aβ€ΎΒ NORΒ Bβ€Ύβ€Ύ=(AΒ NORΒ A)Β NORΒ (BΒ NORΒ B)A + B = \overline{\overline{A} \text{ NOR } \overline{B}} = (A \text{ NOR } A) \text{ NOR } (B \text{ NOR } B)
    • AND: Aβ‹…B=AΒ NORΒ Bβ€Ύ=(AΒ NORΒ B)Β NORΒ (AΒ NORΒ B)A \cdot B = \overline{A \text{ NOR } B} = (A \text{ NOR } B) \text{ NOR } (A \text{ NOR } B)
  • 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) = AβŠ•BA \oplus B
  • Carry (C) = Aβ‹…BA \cdot B
A ───┐
β”œβ”€βŠ•β”€ S
B β”€β”€β”€β”˜
A ───┐
β”œβ”€Β·β”€ C
B β”€β”€β”€β”˜

2. Full Adder

  • Adds three bits (A, B, Cin)
  • ==Sum== = AβŠ•BβŠ•C_inA \oplus B \oplus C\_{in}
  • Carry = (Aβ‹…B)+(Bβ‹…C_in)+(Aβ‹…C_in)(A \cdot B) + (B \cdot C\_{in}) + (A \cdot C\_{in}) ⭐

3. Half Subtractor:

  • Diff = AβŠ•BA \oplus B,
  • Borrow = Aβ€Ύβ‹…B\overline{A} \cdot B ⭐

4. Full Subtractor:

  • Diff = AβŠ•BβŠ•B_inA \oplus B \oplus B\_{in},
  • Borrow = Aβ€Ύβ‹…B+(Aβ€ΎβŠ•B)β‹…B_in\overline{A} \cdot B + (\overline{A} \oplus B) \cdot B\_{in}

5. Multiplexer (MUX)

  • Selects one input from many
  • n-to-1 MUX has n inputs, log⁑_2n\log\_2 n select lines, 1 output

6. Demultiplexer (DEMUX)

  • Routes single input to one of many outputs
  • 1-to-n DEMUX has 1 input, log⁑_2n\log\_2 n select lines, n outputs

7. Encoder

  • Converts 2n2^n inputs into n-bit code
  • Example: 8-to-3 encoder

8. Decoder

  • Converts n-bit input to 2n2^n outputs
  • Example: 3-to-8 decoder

Applications

  • Arithmetic operations (Adders, Subtractors)
  • Data routing (MUX/DEMUX)
  • Code conversion (Encoder/Decoder)
  • Logic functions in processors

1. Half Adder ⭐

  • Adds two single-bit numbers (A, B)
  • Sum (S) = A βŠ• B
  • Carry (C) = A Β· B

Truth Table:

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

Circuit Diagram:

A ───┐
β”œβ”€βŠ•β”€ S
B β”€β”€β”€β”˜
A ───┐
β”œβ”€Β·β”€ C
B β”€β”€β”€β”˜

2. Full Adder

  • Adds three bits (A, B, Cin)
  • Sum = A βŠ• B βŠ• Cin
  • Carry = (A Β· B) + (B Β· Cin) + (A Β· Cin) ⭐

Truth Table:

ABCinSumCarry
00000
00110
01010
01101
10010
10101
11001
11111

Circuit Diagram:

A ──┐
β”œβ”€βŠ•β”€\
B β”€β”€β”˜ \
βŠ• ─ Sum
Cin ──────/
A ──┐
β”œβ”€Β·β”€\
B β”€β”€β”˜ \
+ ─ Carry
Cin ──────/

3. Half Subtractor

  • Diff = A βŠ• B
  • Borrow = AΜ… Β· B

Truth Table:

ABDiffBorrow
0000
0111
1010
1100

Circuit Diagram:

A ───┐
β”œβ”€βŠ•β”€ Diff
B β”€β”€β”€β”˜
A ──┐
β”œβ”€βŠ™β”€\
·─ Borrow
B ──────/

4. Full Subtractor

  • Diff = A βŠ• B βŠ• Bin
  • Borrow = AΜ… Β· B + (AΜ… βŠ• B) Β· Bin

Truth Table:

ABBinDiffBorrow
00000
00111
01011
01101
10010
10100
11000
11111

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: nn inputs, log_2nlog\_2n select lines, 1 output
  • Truth Table (4-to-1 example):
S1S0Y
00I0
01I1
10I2
11I3

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, log_2nlog\_2n select lines, nn outputs
  • Truth Table (1-to-4 example):
S1S0Y0Y1Y2Y3
00I000
010I00
1000I0
11000I

Circuit Diagram (1-to-4):

β”Œβ”€ Y0
I ─────
β”œβ”€ Y1
β”œβ”€ Y2
└─ Y3
S1 ──┐
S0 β”€β”€β”˜

7. Encoder

  • Function: Converts 2n2^n inputs into n-bit code
  • Example: 8-to-3 encoder
Inputs (I0-I7)Output (Y2 Y1 Y0)
00000001000
00000010001
00000100010
00001000011
00010000100
00100000101
01000000110
10000000111

Circuit Diagram (8-to-3):

I0 ──┐
I1 ───
I2 ──────> Y0,Y1,Y2
I3 ───
I4 ───
I5 ───
I6 ───
I7 β”€β”€β”˜

8. Decoder

  • Function: Converts n-bit input to 2n2^n outputs
  • Example: 3-to-8 decoder
Input (A2 A1 A0)Output (Y0-Y7)
00000000001
00100000010
01000000100
01100001000
10000010000
10100100000
11001000000
11110000000

Circuit Diagram (3-to-8):

A0 ──┐
A1 ─── ───> Y0,Y1,Y2,Y3,Y4,Y5,Y6,Y7
A2 β”€β”€β”˜

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 Lines

Truth Table (4:1 MUX example):

S1S0OUT
00I0
01I1
10I2
11I3

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:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”€β”€ O0
IN ──| 1 x 4 |── O1
| DEMUX |── O2
β””β”€β”€β”€β”€β”€β”€β”€β”˜β”€β”€ O3
| |
S1 S0
Select Lines

Truth Table (1:4 DEMUX example):

S1S0O0O1O2O3
00IN000
010IN00
1000IN0
11000IN

Summary Table:

FeatureMultiplexerDemultiplexer
FunctionMany β†’ OneOne β†’ Many
Inputs2ⁿ1
Outputs12ⁿ
Controln selectn select
Example4:1 MUX1:4 DEMUX

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):

I3I2I1I0Y1Y0
000100
001001
010010
100011

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 O3

Truth Table (2-to-4 Decoder):

A1A0O0O1O2O3
001000
010100
100010
110001

Summary Table:

FeatureEncoderDecoder
FunctionMany→FewFew→Many
Inputs2ⁿn
Outputsn2ⁿ
Example8:3 Encoder3:8 Decoder