Topic 1.3
Computer System
1.3 Information Coding Scheme
Learning Outcome
a) Describe how computers encode characters using
ASCII (8 bits), EBCDIC, Unicode.
b) Calculate the total number of bits/bytes in a given
word based on each coding scheme.
2
1 Data Representation-
Recap
How computer represent data?
“ ▸ Data & instructions can be
represented electronically
by using two unique binary
digits 1 (on) and 0 (off) and
bytes which are 8 bits
combined together to
represent a character up to
256 characters.
4
How computer represent data?
• Data representation refers to the form
in which data is stored, processed,
and transmitted in computers.
• Digital data is text, numbers, graphics,
sound, and video that has been
converted into bit patterns of 0s and
1s called binary numbers.
5
Representing number
Number Binary
Representation
Computers 0 00000000
represent all 1 00000001
numeric data 2 00000010
(numbers) 3 00000011
4 00000100
with the 5 00000101
binary system. ……
254 1 1 1 1 1 1 1 0
255 1 1 1 1 1 1 1 1
6
Representing Text Answer:
(Character Set) Information
▸ How can a computer Coding
represents non- Scheme
numeric characters
(character data )?
(such as what you are reading
now)
7
What is
Information
Coding
Scheme?
8
Information Coding Scheme/
System
The combinations of 0s and 1s that
represent uppercase and
lowercase letters, numbers, &
special symbols.
9
Why are Information Coding
Schemes necessary?
▸ Computers rely ▸ Each switch’s ▸ Coding schemes
on logic circuits, on/off state is translate real
which are represented by world data into
controlled by one bit, whose a form that
electronic value is either 0 computers can
switches whose or 1. process easily.
state can be
either on or off. 10
Information Coding Scheme
ASCII EBCDIC Unicode
[American [Extended Binary [Uniform code
Standard Coded Decimal capable of
Code for Interchange Code] representing all
Information world’s
Interchange] languages]
11
This figure shows how a letter is converted to binary form and back.
12
Information Coding Scheme : ASCII
• ASCII (pronounced “ask-ee”) is the most widely used coding scheme
to represent a set of characters.
Number of bits • Uses 8 bits to represent a character.
Number of • Represents 256 characters (28 = 256).
characters
Usage • Primarily used on minicomputers, personal computers and servers.
Advantage • ASCII coding scheme uses 8 bits to represent a character, meaning
Disadvantage that storing data in ASCII takes up less memory.
• The 256 characters that are represented by ASCII coding scheme
are only sufficient for English and Westerns European languages
but is not large enough for Asian and other languages that use
different alphabets.
13
Example of *Encoding in ASCII
P a y space $ 8 !
01010000 01100001 01111001 00100000 00100100 00111000 00100001
*Encoding means converting data into a
digital form
14
Information Coding Scheme :
EBCDIC
EBCDIC is widely considered to be an outdated coding
system, but is still used in some equipment, mainly on
IBM Mainframe and IBM midrange computer
operating systems in order to allow for continued use
of software written many years ago that expects an
EBCDIC communication environment.
15
Information Coding Scheme : EBCDIC
Number of bits • Uses 8 bits to represent a character.
Number of • Represents 256 characters (28 = 256).
characters
Usage • Primarily used on IBM mainframe, midrange systems and
high-end servers.
Advantage
• EBCDIC coding scheme uses 8 bits to represent a character,
meaning that storing data in EBCDIC takes up less memory.
Disadvantage • The 256 characters that are represented by EBCDIC coding
scheme are only sufficient for English and Westerns European
languages but is not large enough for Asian and other
languages that use different alphabets.
16
Example of *Encoding in EBCDIC
P a y space $ 8 !
11010111 11000001 11101000 00100000 01011011 11111000 01011010
*Encoding means converting data into a
digital form
17
Information Coding Scheme : Unicode
• Unicode is a 16 bit coding scheme that
has the capacity of representing all the
world’s current languages as well as
classic and historical languages, in 65,
536 characters and symbols.
18
Information Coding Scheme : Unicode
Number of bits • Uses 16 bits to represent a character.
Number of • Represents 65,536 characters (216 = 65, 536).
characters
Usage • Implemented in several operating systems including
Windows, Mac OS, and Linux.
Advantage
• Unicode can represent 65,536 characters, (216 = 65,536)
capable of representing almost all the world’s current
languages, classical and historical languages and symbols.
Disadvantage • Unicode coding scheme uses 16 bits to represent a
character, meaning that storing data in Unicode takes up
more memory.
19
Example of *Encoding in Unicode
P A Y space $ 8 !
00000000 00000000 00000000 00000000 00000000 00000000 00000000
01010000 01000001 01011001 00100000 00100100 00111000 00100001
*Encoding means converting data into a digital form
20
Information Coding Scheme : Unicode
Examples of Asian languages and historical
symbols that can be represented using Unicode
coding scheme.
21
Information Coding Scheme : Unicode
22
Part of ASCII , EBCDIC and Unicode
Binary Codes
Character ASCII EBCDIC Unicode
A 01000001 11000001 0000000001000001
B 01000010 11000010 0000000001000010
E 01000101 110000101 0000000001000101
The figure shows the combination of bits (0s and 1s) is
unique for each character in the ASCII ,EBCDIC and
Unicode Coding Scheme.
23
Part of ASCII , EBCDIC and Unicode Binary
Codes
Characteristic ASCII EBCDIC Unicode
Number of bits Uses 8 bits to represent a Uses 8 bits to represent Uses 16 bits to represent a
character a character character
Number of
characters Represents 256 Represents 256 Represents 65,536
represented characters characters characters
(28 = 256) (28 = 256) (216 = 65,536)
Usage
Primarily used on Primarily used on IBM Implemented in several OS
minicomputers, personal mainframe, midrange (Windows, Mac OS X, Linux)
computers and server systems and high-end
servers
24
Differences between Information Coding
Scheme
Characteristic ASCII EBCDIC Unicode
Number of bits Uses 8 bits to Uses 8 bits to Uses 16 bits to
represent a represent a represent a character
character character
Represents 65,536
Number of Represents 256 Represents 256 characters
characters characters characters (216 = 65,536)
represented (28 = 256) (28 = 256)
25
Number of bits/bytes used by Information
Coding Scheme to represent phrases
HELLO WORLD!
HEL LO WO R L D !
1 2 3 4 5 6 7 8 9 10 11 12
ASCII ECBDIC UNICODE
Bits 12 characters x 8 bits 12 characters x 8 bits 12 characters x 16 bits
= 96 bits = 96 bits = 192 bits
Bytes 96 bits /8 96 bits /8 192 bits /8
* = 12 bytes = 12 bytes = 24 bytes
*8 bits grouped together as a unit, they form a byte.
26
Number of bits used by Information
Coding Scheme to represent phrase
“ S E L AMA T DA T AN G K E KMS ” . .
12 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
ASCII ECBDIC UNICODE
Bits 25 characters x 8 bits 25 characters x 8 bits 25 characters x 16 bits
= 200 bits = 200 bits = 400 bits
Bytes 200 bits /8 200 bits /8 400 bits /8
* = 25 bytes = 25 bytes = 50 bytes
*8 bits grouped together as a unit, they form a byte.
27
‘A’ Number of bits used by Information
Coding Scheme to represent phrase
f o r C omp u t e r S c i e n c e !
ASCII ECBDIC UNICODE
Bits
Bytes
*
*8 bits grouped together as a unit, they form a byte.
28
Conclusion
▸ When discussing numbers and alphabetical characters, it is
important to remember that all data being transmitted through a
computer system is represented by bits or circuit notation.
▸ A fingerprint, picture, or company logo is also converted by
appropriate programs into patterns of binary digits.
▸ Now that you understand bits, bytes, and how computers
represent data, it is important to understand their relationship to
the rest of the system.
29
Chapter Concept :
Topic 1.3 Information Coding Scheme
1. How computer presents data?
2. Define Coding System/Scheme.
3. List three coding systems.
4. Explain ASCII from the number of bits, number of characters it
represents and the usage.
5. Explain EBCDIC from the number of bits, number of characters
it represents and the usage.
6. State the type of computer that still uses EBCDIC.
7. Explain Unicode from the number of bits, number of characters
it represents and the usage.
8. Discuss the advantage of using Unicode.
9. Discuss the advantage of using ASCII.
10. Explain why Unicode is becoming popular compared to ASCII
and EBCDIC.
11. Differentiate between ASCII, EBCDIC and Unicode from the
number of bits and number of characters.
30
Discussion
1. How many bits would it take to represent the following
phrase using the ASCII code?
Introduction to Computer Science.
2. Give the benefit of using ASCII.
3. Give the benefit of using Unicode over ASCII.
4. How many different characters can Unicode represent?
5. How many different characters can ASCII represent?
6. You are designing a computer system for use worldwide,
which character encoding scheme should you use and why?
31
THANKS!
32