- 2072 Chaitra · 2 marks
Convert (101001001)₂ to Gray
Short answer
MSB unchanged; each next Gray bit is XOR of current and previous binary bits. 101001001 binary gives 111101101 Gray.
Convert (101001001)binary = (?)Gray.
Rule: the MSB of the Gray code equals the MSB of binary; every other Gray bit is the XOR of the corresponding binary bit and the bit to its left: .
| Binary pair | XOR | Gray bit |
|---|---|---|
| MSB 1 | copy | 1 |
| 1, 0 | 1 ⊕ 0 | 1 |
| 0, 1 | 0 ⊕ 1 | 1 |
| 1, 0 | 1 ⊕ 0 | 1 |
| 0, 0 | 0 ⊕ 0 | 0 |
| 0, 1 | 0 ⊕ 1 | 1 |
| 1, 0 | 1 ⊕ 0 | 1 |
| 0, 0 | 0 ⊕ 0 | 0 |
| 0, 1 | 0 ⊕ 1 | 1 |
Answer:
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Gray vs binary code, convert (10110)₂ to Gray · Digital Logic, chapter 1
- Convert (110111)gray to binary · Digital Logic, chapter 1
- Convert (01010111)gray to binary · Digital Logic, chapter 1
- Gray code, (11101)Gray to binary, FFH AND CAH · Digital Logic, chapter 1
- BCD code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- Gray code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1