6. Why codes are used?
• Codes are used to represent the letters and
special characters (such as +,-,*,$,&) in terms of
0’s and 1’s
http://improvec.blogspot.in/ 6
7. Character Sets
BCD - Binary Coded Decimal
ASCII - American Standard Code for
Information Interchange
EBCDIC - Extended Binary Coded Decimal
Interchange Code
http://improvec.blogspot.in/ 7
9. BCD (Binary Coded Decimal)
BCD code is the simplest code to represent
decimal numbers
In BCD code a decimal number is represented
by four binary bits
For example, 3 is represented as 0011
http://improvec.blogspot.in/ 9
10. BCD Code (Binary Coded Decimal) contd
If a decimal number consists of two or more than
two digits, each digit is individually represented
by its four bit binary equivalent
For example, 56 is represented by 0101 0110
http://improvec.blogspot.in/ 10
13. ASCII
ASCII is pronounced as “ask-ee”
It stands for American Standard Code for
Information Interchange
It is widely used in micro computers
http://improvec.blogspot.in/ 13
14. ASCII (contd)
Micro computers using 8-bit word length use
7-bit to represent the basic code
The 8th bit is used for parity or it may be
permanently 0 or 1
http://improvec.blogspot.in/ 14
15. ASCII CODE (contd) :
In this code a character is represented by two
parts
They are a zone portion and numeric portion
Each digit has 0101 as the zone portion and its
binary representation as the numeric portion
Alphabetical characters are divided into two
groups having 1010 or 1011 as the zone portion
http://improvec.blogspot.in/ 15
16. ASCII Codes for characters
Alphabetic ASCII-8 HEX Numeric ASCII-8 HEX
A 10100011 A1 0 01010000 50
B 10100010 A2 1 01010001 51
C 10100011 A3 2 01010010 52
D 10100100 A4 3 01010011 53
E 10100101 A5 4 01010100 54
F 10100110 A6 5 01010101 55
G 10100111 A7 6 01010110 56
H 10101000 A8 7 01010111 57
I 10101001 A9 8 01011000 58
J 10101010 AA 9 01011001 59
K 10101011 AB
L 10101100 AC
M 10101101 AD
N 10101110 AE
O 10101111 AF
P 10100000 B0
Q 10110001 B1
http://improvec.blogspot.in/ 16