Ascii
Ascii
1
The letter M is located at the
intersection of line 4 and column
D.
Control characters
2
Exercise: (TD)
1/ In ASCII code, (41)16 is 'A' and (30)16 is '0'.
Without using the ASCII code table, deduce the
encoding of the following message: STRM1
A= 41 B= 42 …. I= 49 J= 4A K= 4B…. O=4F P=50
0= 30 1=31 …
STRM1 = ????
3
2. BCD code (Binary Coded Decimal )
Examples :
4
3. Gray code
invented at Bell
Labs by engineer
Frank Gray and
patented in 1953
5
1- Conversion binary-gray To obtain Gray's code from pure binary, we
retain the first bit of pure binary, i.e. the
+ + + first bit of pure binary remains the first
Bn-1Bn-2 Bn-3 ..B1B0 bit of Gray's reflected binary. The first bit
of pure binary is added to the second bit
of pure binary to obtain the second bit of
reflected binary. The second bit of pure
binary is then added to the third bit of
Gn-1Gn-2 Gn-3 ..G1G0 pure binary to obtain the third bit of
reflected binary, and so on.
Addition
Example: without
(11001)2= (?)gray carry
+ + + +
1 1 0 0 1
1 0 1 0 1
(11001)2=(10101)gray
6
2- Conversion gray-binary
To obtain the binary code from the Gay code,
we retain the first Gray bit, i.e. the first Gray
Gn-1Gn-2 Gn-3 ..G1G0 bit remains the first binary bit. The first binary
bit is added to the second pure Gray bit to
obtain the second binary bit. The second
+ + + binary bit is then added to the third pure Gray
bit to obtain the third binary bit, and so on.
Bn-1Bn-2 Bn-3 ..B1 B0
Addition
without
carry
Example:
(10111)gray=(?)2
1 01 1 1
+
1 10 1 0 (10111)gray=(11010)2
7
Table of gray codes
8
The code for ê is 00EA
4. UNICODE code
its UNICODE representation
is 0000 0000 1110 1010
9
isجؐ The code for the letter
062C