1. (A1)16 = ( ? )Gray CodeSolution:(A1)16 = (_______)GrayCode1. Convert hexadecimal to binary
(A1)16 = (_______)2`:.` (A1)
16 = (
10100001)
22. Convert binary to GrayCode
Binary code : `10100001`Method-1: (Binary to Gray code)
`g_7=b_7=1`
`g_6=b_7 o+ b_6=1 o+ 0=1`
`g_5=b_6 o+ b_5=0 o+ 1=1`
`g_4=b_5 o+ b_4=1 o+ 0=1`
`g_3=b_4 o+ b_3=0 o+ 0=0`
`g_2=b_3 o+ b_2=0 o+ 0=0`
`g_1=b_2 o+ b_1=0 o+ 0=0`
`g_0=b_1 o+ b_0=0 o+ 1=1`
`:.`
Gray code : `11110001`
Method-2: (Binary to Gray code)
`b_7` `1` | `b_6` `0` | `b_5` `1` | `b_4` `0` | `b_3` `0` | `b_2` `0` | `b_1` `0` | `b_0` `1` | Binary code |
`b_7` `1` | `b_7 o+ b_6` `1 o+ 0` | `b_6 o+ b_5` `0 o+ 1` | `b_5 o+ b_4` `1 o+ 0` | `b_4 o+ b_3` `0 o+ 0` | `b_3 o+ b_2` `0 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` | `darr` | |
`1` `g_7` | `1` `g_6` | `1` `g_5` | `1` `g_4` | `0` `g_3` | `0` `g_2` | `0` `g_1` | `1` `g_0` | Gray code |
`:.`
Gray code : `11110001``:.` (A1)16 = (11110001)GrayCode