Coding Systems - කේතීකරණ පද්ධති
1. Introduction to Coding Systems
• Data Transformation: When you enter data into a
computer, it converts the data into different
patterns made of 0 and 1.
• Application: Binary codes are universally used to
store numeric, alphabetic, special characters,
images, and sounds in the computer's internal
storage devices.
2. Core Types of Coding Systems
Computers use four primary types of character encoding systems:
1. BCD (Binary Coded Decimal)
2. ASCII (American Standard Code for Information Interchange)
3. Unicode (Universal Coding System)
1. BCD (Binary Coded Decimal)
• History: Used primarily in the early stages of computing.
• Structure: One single decimal digit is represented by 4 bits.
• Limitation: This system is used only to represent decimal numbers (0 through 9).
Decimal to BCD Reference Table:
Convert following Decimal numbers to BCD
302
2136
17295
2. ASCII (American Standard Code for Information Interchange)
• Usage: It is arguably the most widely known data communications code in use today. It is
implemented in personal computers, printers, and various communication hardware.
• Structure: Represents characters using 7-bit binary numbers.
• Capacity: It can represent a total of 128 unique characters.
Problem: When the word 'School' is entered into the computer through the keyboard, write down how it is
understood by the computer.
Step 1: Write the decimal numbers for the symbols
• S — 83
• c — 99
• h — 104
• o — 111
• l — 108
Step 2: Write binary numbers for each value
• S — 1010011
• c — 1100011
• h — 1101000
• o — 1101111
• l — 1101100
Step 3: Write the associated code
101001111000111101000110111111011111101100
Activity Prompt: Write down the ASCII code of "ICT" in binary numbers.
Step 1: Find the decimal values for the characters
Using the standard ASCII character reference table:
• I = 73
• C = 67
• T = 84
Step 2: Convert the decimal values to 7-bit binary numbers
• I (73) 1001001
• C (67) 1000011
• T (84) 1010100
100100110000111010100
3. Unicode (Universal Coding System)
• The Problem: While ASCII (128 characters) and EBCDIC (256 characters) work well for English, they
lack the capacity to represent complex language scripts like Sinhala, Tamil, Japanese, and Chinese,
which require thousands of unique characters.
• The Solution: Unicode was designed to establish a global standard.
• Structure: Uses 16 bits per character.
• Capacity: It can successfully represent 65,536 different symbols (216 = 65,536).
Summary Table (Crucial for Exams)
This quick-reference layout highlights the vital metrics for each coding architecture:
Coding System Bits Per Character Total Character Capacity
BCD 4 10
ASCII 7 128
Unicode 16 65,536