binary to gray code converter

11
MAJOR PROJECT BINARY TO GRAY CODE CONVERTER (THE CIRCUIT CONVERTS BINARY I/P INTO GRAY CODE O/P) Page7

Upload: ajay11126

Post on 28-Nov-2014

3 views

Category:

Documents


1 download

DESCRIPTION

(THE CIRCUIT CONVERTS BINARY I/P INTO GRAY CODE O/P)

TRANSCRIPT

Page 1: BINARY TO GRAY CODE CONVERTER

MAJOR PROJECT

BINARY TO GRAY CODE CONVERTER(THE CIRCUIT CONVERTS BINARY I/P INTO GRAY CODE O/P)

Page7

Page 2: BINARY TO GRAY CODE CONVERTER

INTRODUCTION

The BINARY to GRAY CODE CONVERTER is a digital circuit that is used to convert the binary input into the corresponding equivalent gray code at its output.

The circuit is a simple digital circuit which employs the use of Ex-OR gate IC for its operation.

The output of the circuit i.e. the Gray Code; finds various practical applications.

The Gray code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.

GRAY CODE

Page8

Page 3: BINARY TO GRAY CODE CONVERTER

The Gray code, by Frank Gray, is a binary numeral system where two successive values differ in only one bit.

The gray code is sometimes referred to as reflected binary, because the first eight values compare with those of the last 8 values, but in reverse order.

The table above shows the Binary code and its corresponding Gray code

Page9

Decimal Binary Gray

0 0000 00001 0001 00012 0010 00113 0011 00104 0100 01105 0101 01116 0110 01017 0111 01008 1000 11009 1001 110110 1010 111111 1011 111012 1100 101013 1101 101114 1110 100115 1111 1000

Page 4: BINARY TO GRAY CODE CONVERTER

CONVERTING BINARY TO GRAY

A. Write down the number in binary code.

B. the most significant bit of the gray number is the most significant bit of the binary code.

C. add (using modulo 2, this is binary addition with the carry ignored.) the next significant bit of the binary number to the next significant bit of the binary number to obtain the next gray coded bit.

D. repeat step C till all bits of the binary coded number have been added modulo 2; the resultant number is the gray coded equivalent of the binary number.

Page10

Page 5: BINARY TO GRAY CODE CONVERTER

LIST OF COMPONENTS

SR. no. NAME SYMBOL1 EX-0R GATE IC7486

2 RESISTOR(R1=R2=R3=R4=270Ω)

3 LED

CIRCUIT DIAGRAM

Page11

Page 6: BINARY TO GRAY CODE CONVERTER

PIN DIAGRAM OF 7486

PCB LAYOUT

Page12

Page 7: BINARY TO GRAY CODE CONVERTER

APPLICATIONS OF GRAY CODE

Page13

Page 8: BINARY TO GRAY CODE CONVERTER

Genetic algorithms

Due to the Hamming distance properties of Gray codes, they are sometimes used in Genetic Algorithms. They are very useful in this field, since mutations in the code allow for mostly incremental changes, but occasionally a single bit-change can cause a big leap and lead to new properties.

Karnaugh maps

Gray codes are also used in labeling the axes of Karnaugh maps.

Error correction

In modern digital communications, Gray codes play an important role in error correction. For example, in a digital modulation scheme such as QAM where data is typically transmitted in symbols of 4 bits or more, the signal's constellation diagram is arranged so that the bit patterns conveyed by adjacent constellation points differ by only one bit. By combining this with forward error correction capable of correcting single-bit errors, it is possible for a receiver to correct any transmission errors that cause a constellation point to deviate into the area of an adjacent point. This makes the transmission system less susceptible to noise.

Communication between clock domains

Digital logic designers use Gray codes extensively for passing multi-bit count information between synchronous logic that operates at different clock frequencies. The logic is considered operating in different "clock domains". It is fundamental to the design of large chips that operate with many different clocking frequencies.

ADVANTAGES

Page14

Page 9: BINARY TO GRAY CODE CONVERTER

Simple circuit Easy to design Compact circuit Wide applications.

DISADVANTAGES

The circuit doesn’t have any disadvantages.

CONCLUSION

The circuit is very compact and handy and has wide applications. It finds its application mostly in the communication field.

The simple design and low manufacturing cost are the added advantages.

Page15