Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us

All about Gray Code

Posted on March 15, 2023June 19, 2025 By vlsifacts No Comments on All about Gray Code

Gray code is a digital code, which is neither arithmetic nor weighted. There are no weights assigned to the bit positions of a Gray code. Moreover, we do not use Gray code for arithmetic operations. The advantage of Gray code is that it is very less error susceptible while encoding data compared to the straight binary code. This is because the Gray code exhibits a single-bit change from one code word to the next in sequence. The following table lists the binary as well as Gray codes for decimal numbers 0 to 7.

Decimal NumberBinary CodeGray Code
0000000
1001001
2010011
3011010
4100110
5101111
6110101
7111100

Let’s verify the special property of the Gray code, which is a single-bit change in adjacent code words.

For example, in the case of decimal numbers 3 and 4, the binary codes are 011 and 100, whereas Gray codes are 010 and 110. We can observe that in the case of binary code, from 3 to 4 there are changes in all three bits. However, in the case of Gray code, only the MSB bit got changed (single bit change). This property of Gray code is beneficial for multiple electromechanical applications of digital systems for efficient error detection and correction. We should notice over here that even the last and the first entry also differ by only 1 bit. This is known as the cyclic property of the gray code.

The following series of articles will cover different concepts of Gray code.

Use of Gray code in a Mechanical Encoding Disc
Binary to Gray code conversion and Gray code to Binary conversion
Applications of Gray Code

Previous           Table of Content           Next

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Discover more from VLSIFacts

Subscribe to get the latest posts sent to your email.

Related posts:

  1. Use of Gray code in a Mechanical Encoding Disc
  2. Error Detection and Correction Codes
  3. Parity Code for Error Detection
  4. Hamming Distance
Digital Electronics Tags:error detection, Gray Code, single bit change

Post navigation

Previous Post: Founders and Headquarters of Leading VLSI/Semiconductor Companies
Next Post: Use of Gray code in a Mechanical Encoding Disc

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • NAND and NOR gate using CMOS Technology
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • Truth Tables, Characteristic Equations and Excitation Tables of Different Flipflops
  • AND and OR gate using CMOS Technology
  • Step-by-Step Guide to Running Lint Checks, Catching Errors, and Fixing Them: Industrial Best Practices with Examples

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

%d