Get Answers to all your Questions

header-bg qa

Determine the Gray code equivalent of (11100101)2.

Answers (1)

best_answer

Rule to determine Gray code equivalent - The first bit in the Gray code is the same as the first bit of the binary number. Each subsequent Gray bit is obtained by XORing the previous binary bit with the current binary bit.

  1. First Gray bit = First Binary bit = 1
  2. Now perform XOR between each pair of consecutive binary bits:

$1⊕1=0$
$1⊕1=0$
$1⊕1=0$
$1⊕1=0$
$1⊕0=1$
$1⊕0=1$
$0⊕0=0$
$0⊕0=0$
$0⊕1=1$
$0⊕1=1$
$1⊕0=1$
$1⊕0=1$
$0⊕1=1$
$0⊕1=1$

$$ \text{Gray code of } (11100101)_2 \text{ is } (10010111)_2 $$

Posted by

Saniya Khatri

View full answer