# Gray code

by Dinesh Thakur Category: BINARY CODE

The Gray code was designed by Frank Gray at Bell Labs in 1953. It belongs to a class of codes called the minimum change code. The successive coded characters never differ in more than one-bit. Owing to this feature, the maximum error that can creep into a system using the binary gray code to encode data is much less than the worst -case error encountered in case of straight binary encoding.

The Gray code is an unweighted code. Because of this, the· gray code is not suitable for arithmetic operations but finds applications in input/output devices, some analog-to-digital converters and designation of rows and columns in Karnaugh map etc.

The table below lists the gray code equivalents of the decimal number 0 - 15. One can easily remember the gray codes. A three-bit gray code can be obtained by merely reflecting the two-bit code about an axis at the end of the code and assigning a third-bit as 0 above the axis and as 1 below the axis. The reflected gray code is nothing but code written in reverse order. By reflecting three-bit code, a four-bit code may be obtained.

Now let us consider a few examples. The four-bit gray code for decimal number 39 is 00101101.

Similarly, gray code for (923.1)10 and (327) is (923.1)10 = (1101 0011 0010.0001) Gray code

(327)10 = (100011 0100) Gray code Dinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles