What is the gray code for the binary 101011

By Mona Kumari|Updated : June 22nd, 2022

Choose the right answer to the question What is the gray code for the binary 101011 from the following options along with a detailed explanation.

  1. 101011
  2. 110010
  3. 111110
  4. 111101

Answer - C. 111110

The answer to the question, what is the gray code for the binary 101011 will be 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. 

Comments

write a comment

Follow us for latest updates