---
title: "Convert (101001001)₂ to Gray"
subject: "Digital Logic"
chapter: 1
key: "semester_3/digital_logic:convert-binary-to-gray-101001001"
source: https://www.bctengineer.com/q/semester_3/digital_logic/convert-binary-to-gray-101001001
site: BCT Engineering
---

# Convert (101001001)₂ to Gray

Digital Logic · Chapter 1: Introduction

- Asked in: 2072 Chaitra, 2 marks
- Video: [Binary to Gray Code Conversion](https://www.youtube.com/watch?v=cF-Q5j7RUEw) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/digital_logic/convert-binary-to-gray-101001001
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-1

## Question

Convert (101001001)binary = (?)Gray.

## Short answer

MSB unchanged; each next Gray bit is XOR of current and previous binary bits. 101001001 binary gives 111101101 Gray.

## Answer

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: $G_i = B_{i+1} \oplus B_i$.

| 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: $(101001001)_2 = (111101101)_{Gray}$**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the Gray bit rule for binary?
   A. Every bit is copied
   B. Every bit = AND of neighbours
   C. MSB is inverted
   D. MSB copied; every other bit = binary bit XOR the bit to its left
   Answer: D. G_i = B_(i+1) XOR B_i. (Key point: Gray rule)

2. In 101001001, what is the second Gray bit?
   A. 1 (1 XOR 0)
   B. 0
   C. 2
   D. Same as MSB by copying
   Answer: A. The first two binary bits are 1 and 0, and 1 XOR 0 = 1. (Key point: Second bit)

3. What is (101001001) binary in Gray?
   A. 101001001
   B. 111101101
   C. 111100101
   D. 110101101
   Answer: B. Following the XOR table gives 1,1,1,1,0,1,1,0,1. (Key point: Final answer)

## Related in Digital Logic

- [Gray vs binary code, convert (10110)₂ to Gray](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Agray-vs-binary-convert-10110) — Digital Logic, chapter 1
- [Convert (110111)gray to binary](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-gray-110111-binary) — Digital Logic, chapter 1
- [Convert (01010111)gray to binary](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aconvert-gray-01010111-binary) — Digital Logic, chapter 1
- [Gray code, (11101)Gray to binary, FFH AND CAH](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Agray-to-binary-hex-and) — Digital Logic, chapter 1
- [BCD code and 3-bit binary-to-Gray converter](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Abcd-code-gray-converter) — Digital Logic, chapter 1
- [Gray code and 3-bit binary-to-Gray converter](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Agray-code-binary-gray-converter) — Digital Logic, chapter 1
