- 2076 Asoj · 1+5 marks
Decoder; 2-to-4 decoder as a full adder
Short answer
A decoder converts an n-bit input into 2^n mutually exclusive minterm outputs. For a full adder, feed A and B to a 2-to-4 decoder to obtain D0–D3. Then S = (D1+D2) XOR Cin, and Cout = D3 + (D1+D2)·Cin, using OR, XOR, AND gates.
What is a decoder? Realize a 2-to-4 line decoder as a full adder circuit.
Decoder
A decoder is a combinational circuit that converts an -bit binary input code into output lines, of which exactly one is active for each input combination. Each output is one minterm of the inputs (e.g. 2-to-4, 3-to-8 (74138), BCD-to-decimal decoders).
Full adder using a 2-to-4 decoder
A 2-to-4 decoder has only two inputs, so feed it and . Its outputs are the minterms of :
Group the full-adder truth table by and write and in terms of :
| AB | Active line | S | |
|---|---|---|---|
| 00 | 0 | ||
| 01 | |||
| 10 | |||
| 11 | 1 |
Let (). Then
Circuit
+--------+
A ----->| 2-to-4 |-- D0 (unused)
B ----->| decoder|-- D1 --+
| |-- D2 --+--[OR]-- P
| |-- D3 ------------- D3
+--------+
P, Cin ---[XOR]--------------------- S
P, Cin ---[AND]--- P.Cin ---+
D3 -------------------------+--[OR]-- Cout
Gates: 2 OR, 1 XOR, 1 AND.
Check
| A B | P | S | A+B+C (binary) | |
|---|---|---|---|---|
| 0 1 1 | 1 | 0 | 1 | 10 |
| 1 1 0 | 0 | 0 | 1 | 10 |
| 1 1 1 | 0 | 1 | 1 | 11 |
| 1 0 0 | 1 | 1 | 0 | 01 |
All eight combinations were verified.
Alternative: two 2-to-4 decoders with enable can be joined (using on the enables) into a 3-to-8 decoder; then and are taken with two 4-input OR gates.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Full adder using a 2×4 decoder · Digital Logic, chapter 4 · asked 2×
- Full adder using decoder; (57−43) by 2's complement · Digital Logic, chapter 4
- Full subtractor using decoder; combinational circuit · Digital Logic, chapter 4
- Full adder using a single 1:4 DEMUX · Digital Logic, chapter 4 · asked 5×
- Full subtractor using a 2×4 decoder · Digital Logic, chapter 4 · asked 4×
- Full adder using a single 4:1 MUX · Digital Logic, chapter 4
- VHDL models; full adder structural · Embedded System, chapter 9
- VHDL PROCESS; full adder with half adders · Embedded System, chapter 9