Skip to main content

BCD decoder; 1's and 2's complements

Short answer

BCD decoder activates one of ten outputs: D0=A'B'C'D', D1=A'B'C'D, D2=B'CD', D3=B'CD, D4=BC'D', D5=BC'D, D6=BCD', D7=BCD, D8=AD', D9=AD. 1's complement inverts all bits; 2's complement adds 1 to the 1's complement.

Realize the circuit diagram for BCD decoder. Explain 1's and 2's complements with examples?

BCD decoder (BCD-to-decimal, 4-to-10)

A BCD decoder takes a 4-bit BCD code ABCDABCD (AA = MSB) and activates one of ten outputs D0D_0–D9D_9 (IC 7442). Codes 1010–1111 never occur, so they are don't-cares and allow partial decoding.

DigitABCDFull decodingSimplified (with don't-cares)
00000A′B′C′D′A'B'C'D'A′B′C′D′A'B'C'D'
10001A′B′C′DA'B'C'DA′B′C′DA'B'C'D
20010A′B′CD′A'B'CD'B′CD′B'CD'
30011A′B′CDA'B'CDB′CDB'CD
40100A′BC′D′A'BC'D'BC′D′BC'D'
50101A′BC′DA'BC'DBC′DBC'D
60110A′BCD′A'BCD'BCD′BCD'
70111A′BCDA'BCDBCDBCD
81000AB′C′D′AB'C'D'AD′AD'
91001AB′C′DAB'C'DADAD
 A B C D   A' B' C' D'  (inverters)
 |  |  |  |
 +--+--+--+--[AND]--- D0 = A'B'C'D'
 +--+--+--+--[AND]--- D1 = A'B'C'D
      ...  (one AND gate per output)
 +--------+--[AND]--- D8 = AD'
 +--------+--[AND]--- D9 = AD

Ten AND gates and four inverters form the decoder.

1's and 2's complements

1's complement: invert every bit (0 → 1, 1 → 0). Example: 1's complement of 1011010110 is 0100101001.

2's complement: 1's complement + 1. Example: 2's complement of 1011010110 is 01001+1=0101001001 + 1 = 01010.

They represent negative numbers and turn subtraction into addition. Example 9−59 - 5 in 4 bits:

 1's complement method        2's complement method
   1001  (9)                    1001  (9)
 + 1010  (1's comp of 0101)   + 1011  (2's comp of 0101)
 ------                       ------
 1 0011                       1 0100
     +1  end-around carry      carry discarded
 ------                       
   0100  = 4                    0100  = 4

In 1's complement the end carry is added back; in 2's complement it is discarded. 2's complement has a single zero and is used in computers.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 4 questions →