Digital codes-grey code

What is a Grey code?

Grey code is an unweighted code in which is not a arthematic code i.e. there are no specific weights assigned to bit positions. It is also called as unit distance code in which the successive code words differ only one bit. i.e. only one single bit change from one code word to another code word  in next sequence. It is also called as reflective code.

N bit code —–(Reflective property)—-> (n+1) bit code

What are the advantages and applications of Grey code?


  • Switching activity is reduced because of one digit change in consequence code words.
  • Low power consumption
  • Fast response
  • Minimum error in coding


  • Shaft position encoders
  • sequential lighting.

How to convert Binary code or BCD to Grey code?

The BCD to Grey code logic circuit is shown in figure.

BCD to Grey COde converter usig EXOR gateThe MSB in BCD is same as MSD in grey code. The remaining code bits are the exclusive or of the current and previous bit.

How to convert Grey code to BCD or binary code?

The grey code to BCD logic circuit is shown in figure.

Grey Code TO BCD Converter using EXOR GateThe MSB in grey code is same as BCD and the output BCD code digit is ex-or with the consecutive grey code digit to produce next BCD code.

Convert the BCD of 1011 in to Grey code?

B4           B3             B2        B1

G4           G3            G2           G1

The output grey code is 1110

Convert the grey code 1110 to BCD?

G4               G3                 G2            G1

B4                B3                 B2            B1

Quarter Column

Recent Posts