1. Examples
1. (10011)2 = ( ? )Gray Code
Solution: Binary code : `10011`
Method-1: (Binary to Gray code) `g_4=b_4=1`
`g_3=b_4 o+ b_3=1 o+ 0=1`
`g_2=b_3 o+ b_2=0 o+ 0=0`
`g_1=b_2 o+ b_1=0 o+ 1=1`
`g_0=b_1 o+ b_0=1 o+ 1=0`
`:.` Gray code : `11010`
Method-2: (Binary to Gray code)`b_4` `1` | `b_3` `0` | `b_2` `0` | `b_1` `1` | `b_0` `1` | Binary code | `b_4` `1` | `b_4 o+ b_3` `1 o+ 0` | `b_3 o+ b_2` `0 o+ 0` | `b_2 o+ b_1` `0 o+ 1` | `b_1 o+ b_0` `1 o+ 1` | | `darr` | `darr` | `darr` | `darr` | `darr` | | `1` `g_4` | `1` `g_3` | `0` `g_2` | `1` `g_1` | `0` `g_0` | Gray code |
`:.` Gray code : `11010`
1. (1011001)2 = ( ? )Gray Code
Solution: Binary code : `1011001`
Method-1: (Binary to Gray code) `g_6=b_6=1`
`g_5=b_6 o+ b_5=1 o+ 0=1`
`g_4=b_5 o+ b_4=0 o+ 1=1`
`g_3=b_4 o+ b_3=1 o+ 1=0`
`g_2=b_3 o+ b_2=1 o+ 0=1`
`g_1=b_2 o+ b_1=0 o+ 0=0`
`g_0=b_1 o+ b_0=0 o+ 1=1`
`:.` Gray code : `1110101`
Method-2: (Binary to Gray code)`b_6` `1` | `b_5` `0` | `b_4` `1` | `b_3` `1` | `b_2` `0` | `b_1` `0` | `b_0` `1` | Binary code | `b_6` `1` | `b_6 o+ b_5` `1 o+ 0` | `b_5 o+ b_4` `0 o+ 1` | `b_4 o+ b_3` `1 o+ 1` | `b_3 o+ b_2` `1 o+ 0` | `b_2 o+ b_1` `0 o+ 0` | `b_1 o+ b_0` `0 o+ 1` | | `darr` | `darr` | `darr` | `darr` | `darr` | `darr` | `darr` | | `1` `g_6` | `1` `g_5` | `1` `g_4` | `0` `g_3` | `1` `g_2` | `0` `g_1` | `1` `g_0` | Gray code |
`:.` Gray code : `1110101`
This material is intended as a summary. Use your textbook for detail explanation. Any bug, improvement, feedback then
|