Question 12Asked in Bihar STET Paper 2 Computer Science (Class 11-12), 12 Sep 2023, Shift 2

When converting a binary number to Gray Code, what is the result of XORing the most significant bit (MSB) of the binary number with the next bit?

  1. AThe MSB of the Gray Code
  2. BThe LSB of the Gray Code
  3. CThe XOR of all the bits in the binary number
  4. DThe XOR of all the bits in the Gray Code
Show answerHide answer

Correct answer: (B) The LSB of the Gray Code

Explanation

Note: the answer key gives (B), but the Gray MSB equals the binary MSB, and MSB XOR next bit gives the second Gray bit; it is the LSB only for a 2-bit number.

From Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 2

This is question 12 of Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.