Computer Codes
Computer Codes
Aqsa Ali
SE-101
Character Codes
Binary-Coded Decimal
EBCDIC
ASCII
Unicode
Character codes
Codes are used to represent the letters and special characters (such as +,,*,$,&) in terms of 0s and 1s
Codes means writing program or give information of any type to computer
Weve gone over how digital computers use the binary system to
represent and manipulate numeric values, but have yet to consider how
these internal values can be converted to a form that is meaningful to
humans. This is done through a coding system used by the computer and
how the values are stored and retrieved.
BCD
Binary Coded Decimal (BCD) is very common in electronics,
particularly those that display numerical data, such as alarm clocks
and calculators.
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
4-bit binary form later extended to 6
0
1
2
3
4
5
6
7
8
9
10
11
12
13
56
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
00010000
00010001
00010010
00010011
01010110
5
BCD example
Decimal
7
+2
9
BCD
0111
+0 0 1 0
1001
BCD Table
BCD
Decimal
Binary
0
1
2
3
4
5
6
7
8
9
0000 0000
0000 0001
0000 0010
0000 0011
0000 0100
0000 0101
0000 0110
0000 0111
0000 1000
0000 1001
0000 0000
0000 0001
0000 0010
0000 0011
0000 0100
0000 0101
0000 0110
0000 0111
0000 1000
0000 1001
0000 0000
0000 0001
0000 0010
0000 0011
0000 0100
0000 0101
0000 0110
0000 0111
0000 1000
0000 1001
10
0000 1010
0001 0000
11
0000 1011
0001 0001
Unpacked
Packed
EBCDIC
EBCDIC
Extended Binary Coded Decimal Interchange Code,
EBCDIC was first developed by IBM and is a coding
method used by computers to present letters,
numbers, or other symbols in a binary language the
computer can understand.
Used mainly on IBM mainframe and IBM midrange
computer operating systems.
ASCII
American Standard Code for Information Interchange
ASCII Types
The ASCII table is divided in 3 sections
Lower ASCII, between 32 and 127. This table originates from the older, American
systems, which worked on 7-bit character tables.
Higher / Extended ASCII, between 128 and 255 (8 bit). This portion is
programmable; characters are based on the language of your operating system or
program you are using. Foreign letters are also placed in this section.
Extended ASCII
H
e
l
l
o
,
w
o
r
l
d
=
=
=
=
=
=
=
=
=
=
=
=
Binary
100 1000
110 0101
110 1100
110 1100
110 1111
010 1100
010 0000
111 0111
110 0111
111 0010
110 1100
110 0100
=
=
=
=
=
=
=
=
=
=
=
=
Hexadecimal
48
65
6C
6C
6F
2C
20
77
67
72
6C
64
=
=
=
=
=
=
=
=
=
=
=
=
Decimal
72
101
108
108
111
44
32
119
103
114
108
100
ASCII
The American Standard Code for Information
Interchange (ASCII) was created to better
transmit data between systems.
It is widely used in micro computers
Defines codes for 32 control characters, 10
digits, 52 letters (upper and lower-case), 32
special characters, and more.
10100011
10100010
10100011
10100100
10100101
10100110
10100111
10101000
10101001
10101010
10101011
10101100
10101101
10101110
10101111
10100000
10110001
HEX
Numeric
ASCII-8
HEX
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
B0
B1
0
1
2
3
4
5
6
7
8
9
01010000
01010001
01010010
01010011
01010100
01010101
01010110
01010111
01011000
01011001
50
51
52
53
54
55
56
57
58
59
18
Unicode
Unicode is a computing industry standard for the consistent encoding
Latest version of Unicode consists of more than
110,000 characters covering 100 scripts.
Unicode can be implemented by different character encodings like
Unicode Transformation Format
Unicode
16-bit base coding with the capacity to encode the majority of characters
used in every language of the world.
Unicode also defines an extension mechanism that will allow for the
coding of an additional million characters.
Unicode provides a unique number for every character, no matter what
the platform, no matter what the program, no matter what the language.
The Unicode Standard has been adopted by such industry leaders as
Apple, HP, IBM, Microsoft, Oracle, java
U+060x
U+061x
U+062x
U+063x
U+064x
U+065x
U+066x
U+067x
U+068x
U+069x
U+06Ax
U+06Bx
U+06Cx
U+06Dx
U+06Ex
U+06Fx
Questions??