Grey Code Conversion {BS AI The University of Faisalabad Slides}.pptx
potatolazy00
21 views
12 slides
Jun 11, 2024
Slide 1 of 12
1
2
3
4
5
6
7
8
9
10
11
12
About This Presentation
Code conversions
Binary to Grey
Grey to binary
Size: 335.29 KB
Language: en
Added: Jun 11, 2024
Slides: 12 pages
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