SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
What is Gray Code?
Mukesh N. Tekwani
7
What is Gray Code?
1. This code is named after Frank Gray, an American physicist and researcher at
the Bell Laboratories.
2. It is a non-weighted code – the position of the bit doesn’t carry any weight.
3. Successive code words differ in one bit only.
4. Also called minimum change code, unit-distance code, or minimum error code
5. It is called a cyclic code because successive words differ in one bit position only.
6. This code is also called self-reflecting code.
7. Used in analog-to-digital converters and for error-detection & correction.
8. Gray code will be used when we study Karnaugh maps.
9. Due to change of only one bit, switching operations reduced and power
efficient.
10. This code is not suitable for arithmetic operations.
Mukesh N. Tekwani
4 bit Gray Code – Properties
Mukesh N. Tekwani
Decimal Binary Gray Code
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 1000
• Non-
weighted
code
• Difference of
one bit in
successive
codes (or
minimum
change code)
• Self-reflecting
code
Gray Code As a Reflected Code
1. Suppose we have a Gray code representation of n-bits.
2. To obtain the Gray code representation of (n+1) bits, we write down the two n-
bit representations one below the other, with the second one being a mirror
image of the first.
3. We then add (append) a 0 at the beginning of every code in the first group and
a 1 at the beginning of every code in the second group.
4. The n least significant bits for
Mukesh N. Tekwani
3 bit Gray Code as a Reflective Code
Mukesh N. Tekwani
Start Mirror 0s and 1s Mirror 0s and 1s
0 0 0 0 00 0 00
1 1 0 1 01 0 01
1 1 1 11 0 11
0 1 0 10 0 10
10 1 10
11 1 11
01 1 01
00 1 00
GRAYCODE
GRAYCODE
GRAYCODE

More Related Content

PPTX
Gray Code.pptx
PPTX
PPT
BCD,GRAY and EXCESS 3 codes
PPTX
3.codes( binary code ,excess 3, gray code )
PPTX
Binary to grey code conversion
PDF
Binary codes
PDF
Combinational circuits
PPTX
Code conversion
Gray Code.pptx
BCD,GRAY and EXCESS 3 codes
3.codes( binary code ,excess 3, gray code )
Binary to grey code conversion
Binary codes
Combinational circuits
Code conversion

What's hot (20)

PPTX
Parity Generator and Parity Checker
PPT
Pass Transistor Logic
PPT
Analog to digital converters, adc
PPTX
flip flops
PPTX
Classes of amplifiers
PDF
Binary codes
PPT
Mos and cmos technology
PDF
Manchester & Differential Manchester encoding scheme
PPTX
digital signal processing lecture 1.pptx
PPT
Error detection and correction
PPTX
Multirate DSP
DOCX
UNIT 1 MSP430.docx
PDF
Difference b/w 8085 & 8086
PPT
8086 micro processor
PPTX
ADC & DAC
PPTX
Weighted and Non Weighted Codes
PPTX
PPTX
Line coding
PPTX
MULTIPLEXER
PPT
Signal classification of signal
Parity Generator and Parity Checker
Pass Transistor Logic
Analog to digital converters, adc
flip flops
Classes of amplifiers
Binary codes
Mos and cmos technology
Manchester & Differential Manchester encoding scheme
digital signal processing lecture 1.pptx
Error detection and correction
Multirate DSP
UNIT 1 MSP430.docx
Difference b/w 8085 & 8086
8086 micro processor
ADC & DAC
Weighted and Non Weighted Codes
Line coding
MULTIPLEXER
Signal classification of signal
Ad

Similar to What is Gray Code? (20)

PPTX
Reflected code and conversion
PPTX
Digital Logic BCA TU Chapter 2.2
PPTX
Digital Fundamental - Binary Codes-Logic Gates
PDF
Lecture5 Chapter1- Binary Codes.pdf
PPTX
Binary and EC codes
PPTX
Unit-1 (DLD) Lecture 2.pptx
PPTX
4 bit Binary to Gray converter using XOR
PDF
Number system
PDF
Codes: Binary Codes Weighted codes Binary Coded Decimal (BCD) Non-weighted ...
PPTX
Dlc{binary to gray code conversion} ppt
PPT
dld chapter 2 logic gates and logic works affer subtactor
PDF
Codes.pdf .
PDF
Digital Code conversion from one system to another.
PPTX
Module_3_Codes and Arithmetic operation.pptx
PDF
Binary_Codes.pdfhfkhvfkdhvbhfvfdhfgffhfdhyf
PDF
Computer Logical Organization(It refers to how its functional units are arran...
PDF
Logic Gates(Logic gates are fundamental building blocks of digital circuits).pdf
Reflected code and conversion
Digital Logic BCA TU Chapter 2.2
Digital Fundamental - Binary Codes-Logic Gates
Lecture5 Chapter1- Binary Codes.pdf
Binary and EC codes
Unit-1 (DLD) Lecture 2.pptx
4 bit Binary to Gray converter using XOR
Number system
Codes: Binary Codes Weighted codes Binary Coded Decimal (BCD) Non-weighted ...
Dlc{binary to gray code conversion} ppt
dld chapter 2 logic gates and logic works affer subtactor
Codes.pdf .
Digital Code conversion from one system to another.
Module_3_Codes and Arithmetic operation.pptx
Binary_Codes.pdfhfkhvfkdhvbhfvfdhfgffhfdhyf
Computer Logical Organization(It refers to how its functional units are arran...
Logic Gates(Logic gates are fundamental building blocks of digital circuits).pdf
Ad

More from Mukesh Tekwani (20)

PDF
The Elphinstonian 1988-College Building Centenary Number (2).pdf
PPSX
Circular motion
PPSX
Gravitation
PDF
ISCE-Class 12-Question Bank - Electrostatics - Physics
PPTX
Hexadecimal to binary conversion
PPTX
Hexadecimal to decimal conversion
PPTX
Hexadecimal to octal conversion
PPTX
Gray code to binary conversion
PPSX
Decimal to Binary conversion
PDF
Video Lectures for IGCSE Physics 2020-21
PDF
Refraction and dispersion of light through a prism
PDF
Refraction of light at a plane surface
PDF
Spherical mirrors
PDF
Atom, origin of spectra Bohr's theory of hydrogen atom
PDF
Refraction of light at spherical surfaces of lenses
PDF
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
PPSX
Cyber Laws
PPSX
Social media
PPSX
TCP-IP Reference Model
The Elphinstonian 1988-College Building Centenary Number (2).pdf
Circular motion
Gravitation
ISCE-Class 12-Question Bank - Electrostatics - Physics
Hexadecimal to binary conversion
Hexadecimal to decimal conversion
Hexadecimal to octal conversion
Gray code to binary conversion
Decimal to Binary conversion
Video Lectures for IGCSE Physics 2020-21
Refraction and dispersion of light through a prism
Refraction of light at a plane surface
Spherical mirrors
Atom, origin of spectra Bohr's theory of hydrogen atom
Refraction of light at spherical surfaces of lenses
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
Cyber Laws
Social media
TCP-IP Reference Model

Recently uploaded (20)

PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
additive manufacturing of ss316l using mig welding
PPT
Project quality management in manufacturing
PPTX
Sustainable Sites - Green Building Construction
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
web development for engineering and engineering
PPTX
Geodesy 1.pptx...............................................
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
OOP with Java - Java Introduction (Basics)
additive manufacturing of ss316l using mig welding
Project quality management in manufacturing
Sustainable Sites - Green Building Construction
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CYBER-CRIMES AND SECURITY A guide to understanding
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
CH1 Production IntroductoryConcepts.pptx
web development for engineering and engineering
Geodesy 1.pptx...............................................
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Automation-in-Manufacturing-Chapter-Introduction.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Mechanical Engineering MATERIALS Selection
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...

What is Gray Code?

  • 1. What is Gray Code? Mukesh N. Tekwani 7
  • 2. What is Gray Code? 1. This code is named after Frank Gray, an American physicist and researcher at the Bell Laboratories. 2. It is a non-weighted code – the position of the bit doesn’t carry any weight. 3. Successive code words differ in one bit only. 4. Also called minimum change code, unit-distance code, or minimum error code 5. It is called a cyclic code because successive words differ in one bit position only. 6. This code is also called self-reflecting code. 7. Used in analog-to-digital converters and for error-detection & correction. 8. Gray code will be used when we study Karnaugh maps. 9. Due to change of only one bit, switching operations reduced and power efficient. 10. This code is not suitable for arithmetic operations. Mukesh N. Tekwani
  • 3. 4 bit Gray Code – Properties Mukesh N. Tekwani Decimal Binary Gray Code 0 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 0100 8 1000 1100 9 1001 1101 10 1010 1111 11 1011 1110 12 1100 1010 13 1101 1011 14 1110 1001 15 1111 1000 • Non- weighted code • Difference of one bit in successive codes (or minimum change code) • Self-reflecting code
  • 4. Gray Code As a Reflected Code 1. Suppose we have a Gray code representation of n-bits. 2. To obtain the Gray code representation of (n+1) bits, we write down the two n- bit representations one below the other, with the second one being a mirror image of the first. 3. We then add (append) a 0 at the beginning of every code in the first group and a 1 at the beginning of every code in the second group. 4. The n least significant bits for Mukesh N. Tekwani
  • 5. 3 bit Gray Code as a Reflective Code Mukesh N. Tekwani Start Mirror 0s and 1s Mirror 0s and 1s 0 0 0 0 00 0 00 1 1 0 1 01 0 01 1 1 1 11 0 11 0 1 0 10 0 10 10 1 10 11 1 11 01 1 01 00 1 00 GRAYCODE GRAYCODE GRAYCODE