Documente Academic
Documente Profesional
Documente Cultură
Observed anything?
Similar to HEX, but after 9 therewill
be no output
Note:
You should realize that, with four bits, sixteen numbers (0000
through 1111) can be represented but that, in the 8421 code,
only ten of these areused.
The six code combinations that are not used—1010, 1011,1100,
1101, 1110, and 1111
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
10 1010 0001 0000
11 1011 0001 0001
12 1100 0001 0010
13 1101 0001 0011
14 1110 0001 0100
15 1111 0001 0101
Decimal-to-BCD
• Start at the right-most bit and break the code
into groups of four bits.
• Then write the decimal digit representedby
each 4-bit group.
• Gray Code = 0 0 11 1 0 01