Question: Gray encoding of decimal numbers ensures that only one bit changes when the decimal number changes by one unit. Let b 1 b 2 b
Gray encoding of decimal numbers ensures that only one bit changes when the decimal number changes by one unit. Let b1b2b3 ... bn represent an ordinary bi nary representation of a decimal number, with b1 being the most significant bit. Let the corresponding Gray code bits be g1g2g3 ... gn. Then the Gray code representation is obtained by the algorithm
g1 = b1
gn = bn ⊕ bn-1
where ⊕ denotes modulo-2 addition (i.e., 0 ⊕ 0 = 0, 0 ⊕ 1 = 1, 1 ⊕ 0 = 1, and 1 ⊕ 1 = 0). Find the Gray code representation for the decimal numbers 0 through 32.
Step by Step Solution
3.40 Rating (163 Votes )
There are 3 Steps involved in it
The binary and Gray encoded numbers are given in the table ... View full answer
Get step-by-step solutions from verified subject matter experts
