Skip to main content

Full adder using decoder; (57−43) by 2's complement

Short answer

Full adder: Use a 3-to-8 decoder with inputs A,B,C. OR minterms: S = Y1+Y2+Y4+Y7, Cout = Y3+Y5+Y6+Y7. Subtraction: 57-43 in 7-bit: 57 = 0111001, 2's complement of 43 = 1010101; sum = 10001110, discard carry → 0001110₂ = 14₁₀.

Realize full adder circuit using decoder and gates. Subtract (43)₁₀ from (57)₁₀ using 2's complement method.

Full adder using a decoder and gates

A full adder adds AA, BB and carry-in CC:

ABCSCoC_o
00000
00110
01010
01101
10010
10101
11001
11111
S=Σm(1,2,4,7),Co=Σm(3,5,6,7)S = \Sigma m(1,2,4,7), \qquad C_o = \Sigma m(3,5,6,7)

A 3-to-8 decoder (inputs A,B,CA, B, C) produces every minterm; OR the required lines:

S=Y1+Y2+Y4+Y7,Co=Y3+Y5+Y6+Y7S = Y_1 + Y_2 + Y_4 + Y_7, \qquad C_o = Y_3 + Y_5 + Y_6 + Y_7
          +-------+
  A ----->| 2  Y0 |
  B ----->| 1  Y1 |---> to S
  C ----->| 0  Y2 |---> to S
          |    Y3 |---> to Co
          |3:8 Y4 |---> to S
          |    Y5 |---> to Co
          |    Y6 |---> to Co
          |    Y7 |---> to S and Co
          +-------+
  Y1,Y2,Y4,Y7 --[OR 4]--> S
  Y3,Y5,Y6,Y7 --[OR 4]--> Co

(57)₁₀ − (43)₁₀ by 2's complement

Use 7 bits (57 needs 6 bits; one extra bit for sign safety).

57=01110012,43=0101011257 = 0111001_2, \qquad 43 = 0101011_2

1's complement of 43: 10101001010100. Add 1: 2's complement =1010101= 1010101.

      0111001     (+57)
    + 1010101     (2's complement of 43)
    ---------
    1 0001110
    ^ end carry discarded

An end carry appears, so the result is positive and equals the remaining bits: 00011102=8+4+2=140001110_2 = 8 + 4 + 2 = 14.

Answer: (57)10−(43)10=(0001110)2=(14)10(57)_{10} - (43)_{10} = (0001110)_2 = (14)_{10}

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →