Beruflich Dokumente
Kultur Dokumente
Binary code
Digital data is represented, stored and transmitted as group of binary bits. This group is called binary code. The binary code can be used for represent the number as well as alpha numeric letters.
Reflective code
Sequential code
Weighted code
0010
0011 0100 0101 0110
2
3 4 5 6
0111
1000 1001
7
8 9
Gray code
It is called cyclic or reflected code. In this code each code group does not differ from its neighbour in more than one bit. This code is used for input and output devices in digital system.
1 1
1 0
1 0
1 0
Example
Convert (111011)2 into gray code. Solution:
1 1
1 0
1 0
0 1
1 1
1 0
1. 2. 3.
Write the left most bit as such. Then add the binary digit from left to right at the adjacent position. Write the digit which comes after addition.
2.
3.
4.
1
+
0 1
0 1
0 1