Computer Science, asked by mdm276243, 9 months ago

Write the pros and cons of Gray code and BCD code.

Answers

Answered by sandhuss19
2

Answer:

Advantages of Gray Code over binary codes:-

To represent digital circuits in SOP or POS form and to reduce/optimize the digital circuits using expressions we need K-map. So now in K-map the encoding is done through gray coding instead of binary code since it is a unit distance code and to travel from one code group to another the minimum distance is 1.

The next application comes in Clock domain crossing where two clock domains are asynchronous to each other.When we try to synchronize the binary count from one clock domain to another every bit changes in case of binary codes and to keep track of all the binary values at the same time is problematic. So in clock domain crossing Gray coding are used instead of binary encoding.

The third application comes in Asynchronous FIFO design.For the reasons mentioned above Gray code pointers are used instead of binary pointer.

Gray coding are used in shaft encoder to observe angular displacement or in linear encoder to measure linear displacement while binary codes are suitable for arithmetic operations.

Binary pointer has the issues with multibit synchronization problems and metastability issues in digital circuits while with Gray pointer this problem has been reduced.

Gray codes are used in genetic algorithm since it allows since bit change inherited from hamming distance codes which are used in mutations and can lead to new characteristics and properties.

Gray codes pointers are a bit inefficient while calculating FIFO depths since it is a power of 2 method while through binary coding depth of any kind of FIFO can be calculated(this is one of the disdvantage of gray encoding).

Other applications where gray codes can be useful:-

a. Baguenaudier puzzle.

b. Towers of Hanoi puzzle.

c.Hamiltonian Path.

Similar questions