1. Examples
1. (11100)Gray Code = ( ? )10
Solution: (11100)GrayCode = (_______)10
1. Convert GrayCode to binary Gray code : `11100`
Method-1: (Gray code to Binary) `b_4=g_4=1`
`b_3=b_4 o+ g_3=1 o+ 1=0`
`b_2=b_3 o+ g_2=0 o+ 1=1`
`b_1=b_2 o+ g_1=1 o+ 0=1`
`b_0=b_1 o+ g_0=1 o+ 0=1`
`:.` Binary : `10111`
Method-2: (Gray code to Binary)`g_4` `1` | | `g_3` `1` | | `g_2` `1` | | `g_1` `0` | | `g_0` `0` | Gray code | `darr` | | `darr` | | `darr` | | `darr` | | `darr` | | `1` | `rarr` | `0` | `rarr` | `1` | `rarr` | `1` | `rarr` | `1` | | `b_4` `=g_4` | | `b_3` `=b_4 o+ g_3` | | `b_2` `=b_3 o+ g_2` | | `b_1` `=b_2 o+ g_1` | | `b_0` `=b_1 o+ g_0` | Binary code |
`:.` Binary : `10111`
2. Convert binary to decimal (10111)2 = (_______)10
`10111`
` = 1 × 2^4 + 0 × 2^3 + 1 × 2^2 + 1 × 2^1 + 1 × 2^0`
`= 1 × 16 + 0 × 8 + 1 × 4 + 1 × 2 + 1 × 1`
`= 23`
`:.` (10111)2 = (23)10
`:.` (11100)GrayCode = (23)10
2. (101100)Gray Code = ( ? )10
Solution: (101100)GrayCode = (_______)10
1. Convert GrayCode to binary Gray code : `101100`
Method-1: (Gray code to Binary) `b_5=g_5=1`
`b_4=b_5 o+ g_4=1 o+ 0=1`
`b_3=b_4 o+ g_3=1 o+ 1=0`
`b_2=b_3 o+ g_2=0 o+ 1=1`
`b_1=b_2 o+ g_1=1 o+ 0=1`
`b_0=b_1 o+ g_0=1 o+ 0=1`
`:.` Binary : `110111`
Method-2: (Gray code to Binary)`g_5` `1` | | `g_4` `0` | | `g_3` `1` | | `g_2` `1` | | `g_1` `0` | | `g_0` `0` | Gray code | `darr` | | `darr` | | `darr` | | `darr` | | `darr` | | `darr` | | `1` | `rarr` | `1` | `rarr` | `0` | `rarr` | `1` | `rarr` | `1` | `rarr` | `1` | | `b_5` `=g_5` | | `b_4` `=b_5 o+ g_4` | | `b_3` `=b_4 o+ g_3` | | `b_2` `=b_3 o+ g_2` | | `b_1` `=b_2 o+ g_1` | | `b_0` `=b_1 o+ g_0` | Binary code |
`:.` Binary : `110111`
2. Convert binary to decimal (110111)2 = (_______)10
`110111`
` = 1 × 2^5 + 1 × 2^4 + 0 × 2^3 + 1 × 2^2 + 1 × 2^1 + 1 × 2^0`
`= 1 × 32 + 1 × 16 + 0 × 8 + 1 × 4 + 1 × 2 + 1 × 1`
`= 55`
`:.` (110111)2 = (55)10
`:.` (101100)GrayCode = (55)10
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|