- Home/
- GATE ELECTRONICS/
- GATE EC/
- Article
What is the Gray Code for the Binary 101011?
By BYJU'S Exam Prep
Updated on: September 25th, 2023
What is the gray code for binary 101011?
- 101011
- 110010
- 111110
- 111101
Table of content
Answer – C. 111110
The answer to the question, ‘what is the gray code for the binary 101011’ is 111110.
Solution
The detailed solution to the question What is the gray code for the binary 101011 is provided here.
Whatever may be the number of bits present in the given binary number, we can convert it into the corresponding gray code by following these two steps.
- Copy the Most Significant Bit (MSB) as it is.
- Perform Exclusive-OR operation on successive two bits from left to right.
Since there are 6 bits in the given binary number (101011), there will be 6 bits in the corresponding gray code. Let us continue the above procedure for converting the given binary number into the corresponding gray code.
- Since the MSB of the given binary number is 1, the leftmost bit of the gray code also will be 1.
- 1⊕0=1
- 0⊕1=1
- 1⊕0=1
- 0⊕1=1
- 1⊕1=0
Therefore, the gray code for the binary number 101011 will be 111110. Hence, Option (C) is the correct answer.
☛ Related Questions: