

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Q1 (a) Binary to Gray 1 1 0 0 0 1 1 0 Step 1: Write left most bit as it is 1 Step 2: Add the left most binary digit to adjacent one 1 + 0 0 0 1 1 0 1 0 Step 3: Add next adjacent pair 1 1 + 0 0 0 1 1 0 1 0 1 Step 4: Again add next adjacent pair and repeat until the last pair 1 1 0 + 0 0 1 1 0 1 0 1 0 Step 5: Repeat step 4 1 1 0 0 + 0 1 1 0
Step 6: Repeat step 4^1 0 1 0 1 1 0 0 0 + 1 1 0
Step 7: Repeat step 4^1 0 1 0 0 1 1 0 0 0 1 + 1 0 1 0 1 0 0 1 0 Step 8: Repeat step 4 1 1 0 0 0 1 1 + 0 1 0 1 0 0 1 0 1 So the Gray code for the binary 11000110 is 10100101
(b) Gray to Binary Step 1: Write left most bit as it is
Gray Code 1 Step 2: Add this gray bit to next binary bit and write the result below as arrows indicate.
Step 3: Repeat step 2 until the last bit
So Binary code for the gray 10101111 is 11001010