Anonymous user menu

GRAY CODE

GRAY CODE

GRAY CODE: Gray code is represented with ‘0’ and ‘1’ which is used for the Decoding Error.

  • This code is used in devices which converts analog to digital because it is “more error free”.
  • Gray code is a Non-weighted code
  • Here for the converting binary to the gray code, we will do an EX-OR operation for the inputs one bit with next bit.
  • A first bit of the input is written as the first bit of the output and second bit of the output will come by doing EX-OR operation for the first and second bit of the input.
  • The operation goes on.  

S. NO.

BINARY

(base 2)

GRAY

CODE

1

0000

0000

2

0001

0001

3

0010

0011

4

0011

0010

5

0100

0110

6

0101

0111

7

0110

0101

8

0111

0100

9

1000

1100

10

1001

1101

11

1010

1111

12

1011

1110

13

1100

1010

14

1101

1011

15

1110

1001

16

1111

1000

0Comment

What to read next

Please Go through all these linksW3Schools – HTML Tutorial