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?

  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’ is 111110. 


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:


Our Apps Playstore
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303
Home Practice Test Series Premium