Consider numbers represented in 4-bit Gray code. Let be the Gray code representation of a number and let be the Gray code of value of the number. Which one of the following functions is correct?
View worked solution
Answer: C
To find the correct function, we map each decimal value to its 4-bit Gray code representation . The decimal value of this Gray code (interpreted as a standard binary number) represents the minterm index . We then find the Gray code of , which is .
The mapping table for all 16 values is as follows:
| Minterm Index | |||
|---|---|---|---|
| 0 | 0000 | 0 | 0001 |
| 1 | 0001 | 1 | 0011 |
| 2 | 0011 | 3 | 0010 |
| 3 | 0010 | 2 | 0110 |
| 4 | 0110 | 6 | 0111 |
| 5 | 0111 | 7 | 0101 |
| 6 | 0101 | 5 | 0100 |
| 7 | 0100 | 4 | 1100 |
| 8 | 1100 | 12 | 1101 |
| 9 | 1101 | 13 | 1111 |
| 10 | 1111 | 15 | 1110 |
| 11 | 1110 | 14 | 1010 |
| 12 | 1010 | 10 | 1011 |
| 13 | 1011 | 11 | 1001 |
| 14 | 1001 | 9 | 1000 |
| 15 | 1000 | 8 | 0000 |
Now, we collect the minterm indices where each output bit is :
- For , the bit is at .
This matches Option C: .
Free practice · Your answers on this page are not saved.
