Skip to main content

Full subtractor using decoder; combinational circuit

Short answer

With a 3-to-8 decoder, difference D = Y1+Y2+Y4+Y7, borrow Bout = Y1+Y2+Y3+Y7, both via 4-input OR gates. A combinational circuit has outputs depending only on present inputs, with no memory or feedback.

Design the full-subtractor circuit using decoder and required logic gates. What is a combinational logic circuit?

Full subtractor using a decoder

A full subtractor computes A−B−BinA - B - B_{in} and gives the difference DD and borrow out BoutB_{out}.

ABBinB_{in}DBoutB_{out}Minterm
000000
001111
010112
011013
100104
101005
110006
111117
D=Σm(1,2,4,7),Bout=Σm(1,2,3,7)D = \Sigma m(1,2,4,7), \qquad B_{out} = \Sigma m(1,2,3,7)

A 3-to-8 decoder with inputs A,B,BinA, B, B_{in} (A = MSB) gives all 8 minterms at Y0Y_0–Y7Y_7. Each output function is the OR of its minterm lines:

D=Y1+Y2+Y4+Y7,Bout=Y1+Y2+Y3+Y7D = Y_1 + Y_2 + Y_4 + Y_7, \qquad B_{out} = Y_1 + Y_2 + Y_3 + Y_7
          +--------+
  A ----->| 2   Y0 |
  B ----->| 1   Y1 |---> D, Bout
  Bin --->| 0   Y2 |---> D, Bout
          | 3:8 Y3 |---> Bout
          |     Y4 |---> D
          |     Y5 |
          |     Y6 |
          |     Y7 |---> D, Bout
          +--------+
  Y1, Y2, Y4, Y7 ---[OR 4]---> D
  Y1, Y2, Y3, Y7 ---[OR 4]---> Bout

Two 4-input OR gates complete the design (with an active-low decoder like 74138, use 4-input NAND gates instead).

Combinational logic circuit

A combinational logic circuit is a circuit whose outputs at any instant depend only on the present values of its inputs. It has no memory and no feedback from output to input. It is built only from logic gates. Examples: adders, subtractors, multiplexers, decoders, encoders and comparators.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →