Gray code equivalent to decimal number 8 is:

2025

Gray code equivalent to decimal number 8 is:

  1. A.

    1000

  2. B.

    1100

  3. C.

    1010

  4. D.

    1110

Attempted by 993 students.

Show answer & explanation

Correct answer: B

Decimal number = 8

Step 1: Convert decimal to binary

810=100028_{10} = 1000_2810​=10002​

Step 2: Convert binary to Gray code

Gray code rule:

  • MSB remains the same

  • Each next bit = XOR of current binary bit and previous binary bit

Binary:  1 0 0 0
Gray:   1 1 0 0

Gray=1000⊕0100=1100\text{Gray} = 1000 \oplus 0100 = 1100Gray=1000⊕0100=1100

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor