Grey Code Conversion {BS AI The University of Faisalabad Slides}.pptx

potatolazy00 21 views 12 slides Jun 11, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

Code conversions
Binary to Grey
Grey to binary


Slide Content

Lecture 8 Gray Code

Perform BCD Addition of 8765 and 3943

Gray Code The reflected binary code or Gray code is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). Gray codes are very useful in the normal sequence of binary numbers generated by the hardware that may cause an error or ambiguity during the transition from one number to the next. So , the Gray code can eliminate this problem easily since only one bit changes its value during any transition between two numbers . Iterative method of generating G (n+1)  from G n  are given below. This is simpler method to contract Gray code of n-bit Binary numbers. Each bit is inverted if the next higher bit of the input value is set to one. The nth Gray code is obtained by computing n⊕(floor(n/2)).

 Convert (1001) 2  into Gray Code  Convert (10) 10  into Gray Code

 (1001) 2  = (1101) g (10) 10  = (1111) g

Conversion of Gray Code into Binary Number The MSB of Gray code is copied as it to be the MSB bit of binary number which is then XORed with the next bot of gray code, the result is recorded as the next bit of binary number, now this recorded bit is XORed with the next bit of gray code and this process is continued till the LSB is obtained.

 Convert (110011100) g  to binary number

Question Convert (101010101) g  to binary number Convert (1001001) g to binary  ( 11100) G  = (       ?       ) 2 ( 101100) G  = (       ?       ) 2

110011001 2 1110001 2 10111 2   110111 2

https://www.javatpoint.com/laws-and-rules-of-boolean-algebra-in-digital-electronics
Tags