BCD, Gray Code & Excess-3 Code
BCD, Gray Code & Excess-3 Code
BCD, Gray Code & Excess-3 Code
GENERAL PROFICIENCY
SUBMITTED TO: SUBMITTED BY:
MS.DEEPTI GOEL PRASHANT RUSTAGI
(ASST. PROF. BCA DEPT.) ENROLMENT NO - 01524302016
MS.RUPALI PANDEY (BCA 1ST YEAR) (EVENING SHIFT)
(ASST. PROF. BCA DEPT.)
BCD , GRAY CODE & EXCESS-
3 CODE
BCD (BINARY CODED DECIMAL)
Decimal BCD
0
8
0
4
0
2
0
1
Decimal: 9 1
Binary : 0000 1001 0000 0001
PACKED BCD
• Two numerals are encoded into a single byte, with one
numeral in the least significant nibble (bits 0 through 3)
and the other numeral in the most significant nibble (bits 4
through 7).
Decimal: 9 1
Binary : 1001 0001
DIFFERENCE B/W BINARY & BCD
After 9 the decimal equivalent binary number is of four bit but in case of
BCD it is an eight bit number. For 0 to 9 decimal numbers both binary and
BCD is equal but when decimal number is more than 9 BCD differs from
binary.
Binary Coded
Decimal number Binary number
Decimal(BCD)
8 1000 1000
9 1001 1001
10 1010 0001 0000
11 1011 0001 0001
12 1100 0001 0010
GRAY CODE
Decimal Gray code
5 0111
CONVERSION BINARY TO GRAY
• The MSB of the Gray code is same
as the corresponding bit in the
binary number.
• Going from left to right , add each
adjacent pair of binary bit to get
next gray code bit and discard
carry.
CONVERSION GRAY TO BINARY