Q60.Marks: +2.0UGC NET Paper 2: Computer Science and Application 26th June 2025 Shift 1
Gray code equivalent to decimal number 8 is:
1.1000
2.1100✓ Correct
3.1010
4.1110
Solution
The Correct answer is Option 2
Key Points
Gray code equivalent to decimal number 8 is:
Gray code is a binary numeral system where two successive values differ in only one bit.
The decimal number 8 in binary is represented as 1000. To convert it into Gray code:
The most significant bit (MSB) of the Gray code is the same as the binary representation MSB. So, the MSB remains 1.
For the subsequent bits, each bit of the Gray code is obtained by XORing the corresponding binary bit with the bit before it. Following this method for 8 (1000 in binary), we get:
MSB = 1
Second bit = 1 XOR 0 = 1
Third bit = 0 XOR 0 = 0
Fourth bit = 0 XOR 0 = 0
Thus, the Gray code for 8 becomes 1100.
Option 1: 1000:
This is the binary representation of the decimal number 8, not its Gray code equivalent.
Gray code differs from binary representation in that two successive values differ by only one bit.
Option 2: 1100:
This is the correct Gray code equivalent of the decimal number 8.
Following the conversion steps described above, the decimal number 8 (1000 in binary) converts to 1100 in Gray code.
Option 3: 1010:
This is not the correct Gray code for 8.
It does not follow the rule of successive bits differing by only one bit, which is a requirement for Gray code.
Option 4: 1110:
This is also incorrect.
While it starts with the correct MSB (1), the subsequent bits do not match the XOR operation required for Gray code conversion.