© 2026 schoolict.net (Ruwan Mangala Suraweera)
3.5 Coding Systems – BCD, EBCDIC, ASCII and Unicodeකේතන පද්ධති – BCD, EBCDIC, ASCII සහ Unicode
G.C.E. O/L Grade 10 ICT · Lesson 3G.C.E. O/L ICT · 10 ශ්රේණිය · පාඩම 3
In this videoමේ වීඩියෝවේ
- BCD: each decimal digit in 4 bits.BCD: සෑම දශම ඉලක්කමක්ම bit 4 කින්.
- EBCDIC: 8-bit IBM mainframe code.EBCDIC: bit 8 IBM mainframe කේතය.
- ASCII: 7 bits, 128 characters; ‘A’ = 65.ASCII: bit 7, අක්ෂර 128; ‘A’ = 65.
- Unicode: every language + emoji.Unicode: සියලු භාෂා + emoji.
- Sinhala block U+0D80 – U+0DFF.සිංහල කොටස U+0D80 – U+0DFF.
Notesසටහන්
When you type the letter A, the computer does not store a picture of ‘A’ – it stores a code number in binary. A coding system is an agreed table that links characters to binary codes. In this note you will learn BCD, EBCDIC, ASCII and Unicode, where each is used, and their limitations.ඔබ A අකුර type කළ විට පරිගණකය ‘A’ රූපයක් ගබඩා නොකරයි – binary කේත අංකයක් ගබඩා කරයි. කේතන පද්ධතියක් යනු අක්ෂර binary කේතවලට සම්බන්ධ කරන එකඟ වූ වගුවකි. BCD, EBCDIC, ASCII සහ Unicode, ඒවා භාවිත වන තැන් සහ ඒවායේ සීමා මේ සටහනෙන් ඉගෙන ගමු.
1. Why do we need coding systems?1. කේතන පද්ධති අවශ්ය ඇයි?
Computers understand only 0 and 1. To store letters, digits and symbols, each character is given a unique number. If all computers use the same code, a message typed on one device can be read correctly on another.පරිගණක තේරුම් ගන්නේ 0 සහ 1 පමණයි. අකුරු, ඉලක්කම්, සංකේත ගබඩා කිරීමට සෑම අක්ෂරයකටම අනන්ය අංකයක් දෙනවා. සියලු පරිගණක එකම කේතය භාවිතා කළොත් එක් උපාංගයක type කළ පණිවිඩයක් තවත් උපාංගයක නිවැරදිව කියවිය හැක.
2. BCD – Binary Coded Decimal2. BCD – Binary Coded Decimal
BCD codes each decimal digit separately in 4 bits. It is used in digital clocks, calculators and electronic displays where digits are shown one by one.BCD සෑම දශම ඉලක්කමක්ම වෙන වෙනම bit 4 කින් කේත කරයි. ඉලක්කම් එකින් එක පෙන්වන digital ඔරලෝසු, calculators සහ ඉලෙක්ට්රොනික තිරවල භාවිතා වේ.
| Decimalදශම | BCDBCD | Pure binaryසාමාන්ය binary |
|---|---|---|
| 77 | 01110111 | 111111 |
| 5959 | 0101 10010101 1001 | 111011111011 |
| 20262026 | 0010 0000 0010 01100010 0000 0010 0110 | 1111110101011111101010 |
3. EBCDIC3. EBCDIC
EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit code made by IBM for its mainframe computers. It can code 256 characters. Example: ‘A’ = C1₁₆ = 11000001₂.EBCDIC (Extended Binary Coded Decimal Interchange Code) IBM සමාගම mainframe පරිගණක සඳහා සෑදූ bit 8 කේතයකි. අක්ෂර 256ක් කේත කළ හැක. උදා: ‘A’ = C1₁₆ = 11000001₂.
- Limitation: used mainly on IBM mainframes only – not compatible with ASCII.සීමාව: ප්රධාන වශයෙන් IBM mainframes වල පමණි – ASCII සමඟ නොගැළපේ.
- Letters are not in one continuous block, so sorting is harder.අකුරු එක අඛණ්ඩ පෙළක නොමැති නිසා පිළිවෙළ කිරීම අපහසුයි.
4. ASCII4. ASCII
ASCII (American Standard Code for Information Interchange) is the most common code for English text. Standard ASCII uses 7 bits → 2⁷ = 128 characters (codes 0–127). Extended ASCII uses 8 bits → 256 characters, adding symbols like é, £ and line-drawing characters.ASCII (American Standard Code for Information Interchange) ඉංග්රීසි පෙළ සඳහා බහුලවම භාවිත කේතයයි. සම්මත ASCII bit 7 → 2⁷ = අක්ෂර 128 (කේත 0–127). Extended ASCII bit 8 → අක්ෂර 256; é, £ වැනි සංකේත එකතු කරයි.
| Characterඅක්ෂරය | Decimalදශම | Binary (7-bit)Binary (bit 7) | HexHex |
|---|---|---|---|
| AA | 6565 | 10000011000001 | 4141 |
| BB | 6666 | 10000101000010 | 4242 |
| ZZ | 9090 | 10110101011010 | 5A5A |
| aa | 9797 | 11000011100001 | 6161 |
| 00 | 4848 | 01100000110000 | 3030 |
| 99 | 5757 | 01110010111001 | 3939 |
| spacespace | 3232 | 01000000100000 | 2020 |
Worked example: the word CAT in ASCII = 67 65 84 = 1000011 1000001 1010100.උදාහරණය: CAT වචනය ASCII වලින් = 67 65 84 = 1000011 1000001 1010100.
- Limitation: only 128 (or 256) characters – no space for Sinhala, Tamil, Chinese or emoji.සීමාව: අක්ෂර 128 (හෝ 256) පමණි – සිංහල, දෙමළ, චීන හෝ emoji සඳහා ඉඩ නැත.
5. Unicode5. Unicode
Unicode gives a unique code (code point) to every character in every language, plus symbols and emoji – over 150,000 characters. It is written as U+ followed by hex. The first 128 Unicode codes are the same as ASCII. It is stored using UTF-8 (1–4 bytes per character) or UTF-16.Unicode සෑම භාෂාවකම සෑම අක්ෂරයකටම සහ සංකේත, emoji වලට අනන්ය කේතයක් (code point) දෙයි – අක්ෂර 150,000කට වැඩියි. U+ සහ hex ලෙස ලියයි. පළමු Unicode කේත 128 ASCII ට සමානයි. UTF-8 (අක්ෂරයකට bytes 1–4) හෝ UTF-16 භාවිතයෙන් ගබඩා කරයි.
| Characterඅක්ෂරය | Code pointCode point | UTF-8 bytesUTF-8 bytes |
|---|---|---|
| AA | U+0041U+0041 | 11 |
| අඅ | U+0D85U+0D85 | 33 |
| කක | U+0D9AU+0D9A | 33 |
| 😀😀 | U+1F600U+1F600 | 44 |
- Limitation: needs more storage than ASCII (2–4 bytes for many characters).සීමාව: ASCII ට වඩා ගබඩා ඉඩ වැඩියි (බොහෝ අක්ෂරවලට bytes 2–4).
- Old software and devices may not show all characters (boxes □ appear).පැරණි මෘදුකාංග/උපාංග සියලු අක්ෂර නොපෙන්විය හැක (□ කොටු පෙනේ).
6. Comparison6. සැසඳීම
| Codeකේතය | BitsBits | Charactersඅක්ෂර | Main useප්රධාන භාවිතය | Limitationසීමාව |
|---|---|---|---|---|
| BCDBCD | 4 per digit4 per digit | 10 digits10 digits | Clocks, calculatorsඔරලෝසු, calculators | Digits onlyඉලක්කම් පමණි |
| EBCDICEBCDIC | 88 | 256256 | IBM mainframesIBM mainframes | Not compatible with ASCIIASCII සමඟ නොගැළපේ |
| ASCIIASCII | 7 (8 extended)7 (8 extended) | 128 (256)128 (256) | English text, keyboardsඉංග්රීසි පෙළ, keyboards | No other scriptsඅනෙක් අක්ෂර මාලා නැත |
| UnicodeUnicode | 8–32 (UTF-8: 1–4 bytes)8–32 (UTF-8: 1–4 bytes) | 150,000+150,000+ | All languages, emoji, webසියලු භාෂා, emoji, web | Uses more spaceඉඩ වැඩියෙන් |
Key Wordsප්රධාන පද
Sample Q&Aආදර්ශ ප්රශ්න සහ පිළිතුරු
1What is a coding system?කේතන පද්ධතියක් යනු කුමක්ද?
2Write 59 in BCD.59 BCD වලින් ලියන්න.
3How many characters can 7-bit ASCII represent? Why?bit 7 ASCII අක්ෂර කීයක් නිරූපණය කරයිද? ඇයි?
4The ASCII code of ‘A’ is 65. What is the code of ‘E’ and of ‘e’?‘A’ හි ASCII කේතය 65. ‘E’ සහ ‘e’ හි කේත?
5Why was Unicode introduced?Unicode හඳුන්වා දුන්නේ ඇයි?
6Which Unicode range is used for Sinhala?සිංහල සඳහා භාවිත Unicode පරාසය?
MCQබහුවරණ ප්රශ්න
Choose the correct answer for each question.සෑම ප්රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.
1How many characters can standard 7-bit ASCII represent?සම්මත bit 7 ASCII අක්ෂර කීයක් නිරූපණය කරයිද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
2⁷ = 128.2⁷ = 128.
2The ASCII code of ‘A’ is 65. What is the code of ‘D’?‘A’ හි ASCII කේතය 65. ‘D’ හි කේතය?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
A65 B66 C67 D68.A65 B66 C67 D68.
3The ASCII code of lower-case ‘a’ is:කුඩා ‘a’ හි ASCII කේතය:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
‘a’ = ‘A’ + 32 = 97.‘a’ = ‘A’ + 32 = 97.
4Which coding system was developed by IBM for mainframes?IBM mainframes සඳහා සැකසූ කේතන පද්ධතිය?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
EBCDIC = IBM, 8-bit.EBCDIC = IBM, bit 8.
5What is 47 in BCD?47 BCD වලින්?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
4 → 0100, 7 → 0111.4 → 0100, 7 → 0111.
6Which coding system can represent Sinhala letters?සිංහල අකුරු නිරූපණය කළ හැකි කේතන පද්ධතිය?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
Sinhala block U+0D80–U+0DFF.සිංහල කොටස U+0D80–U+0DFF.
7How many characters can extended ASCII represent?Extended ASCII අක්ෂර කීයක් නිරූපණය කරයිද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
8 bits → 2⁸ = 256.bit 8 → 2⁸ = 256.
8BCD is mainly used in:BCD ප්රධාන වශයෙන් භාවිතා වන්නේ:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
BCD shows decimal digits one by one.BCD දශම ඉලක්කම් එකින් එක පෙන්වයි.
9A main limitation of ASCII is that it:ASCII හි ප්රධාන සීමාවක්:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
Only 128/256 characters.අක්ෂර 128/256 පමණි.
10The Unicode code point of the Sinhala letter අ is:සිංහල අ අකුරේ Unicode code point:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
Sinhala block starts at U+0D80; අ = U+0D85.සිංහල කොටස U+0D80 න් ඇරඹේ; අ = U+0D85.
11The ASCII code of the digit ‘0’ is:‘0’ ඉලක්කමේ ASCII කේතය:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
‘0’ = 48 (30 in hex).‘0’ = 48 (hex හි 30).
12The word ‘HI’ is stored in ASCII as:‘HI’ වචනය ASCII වලින් ගබඩා වන්නේ:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
H = 72, I = 73.H = 72, I = 73.
13Emoji such as 😀 can be stored because of:😀 වැනි emoji ගබඩා කළ හැක්කේ:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
😀 = U+1F600.😀 = U+1F600.
14In UTF-8, how many bytes does the Sinhala letter අ use?UTF-8 හි අ අකුර bytes කීයක් ගනීද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
Characters from U+0800 to U+FFFF use 3 bytes.U+0800 සිට U+FFFF දක්වා bytes 3.
15The 7-bit ASCII code 1000010 represents:bit 7 ASCII කේතය 1000010 නිරූපණය කරන්නේ:
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
1000010₂ = 66 = ‘B’.1000010₂ = 66 = ‘B’.
MCQ answer keyMCQ පිළිතුරු
- D – 2⁷ = 128.2⁷ = 128.
- C – A65 B66 C67 D68.A65 B66 C67 D68.
- A – ‘a’ = ‘A’ + 32 = 97.‘a’ = ‘A’ + 32 = 97.
- B – EBCDIC = IBM, 8-bit.EBCDIC = IBM, bit 8.
- A – 4 → 0100, 7 → 0111.4 → 0100, 7 → 0111.
- C – Sinhala block U+0D80–U+0DFF.සිංහල කොටස U+0D80–U+0DFF.
- C – 8 bits → 2⁸ = 256.bit 8 → 2⁸ = 256.
- D – BCD shows decimal digits one by one.BCD දශම ඉලක්කම් එකින් එක පෙන්වයි.
- C – Only 128/256 characters.අක්ෂර 128/256 පමණි.
- A – Sinhala block starts at U+0D80; අ = U+0D85.සිංහල කොටස U+0D80 න් ඇරඹේ; අ = U+0D85.
- B – ‘0’ = 48 (30 in hex).‘0’ = 48 (hex හි 30).
- B – H = 72, I = 73.H = 72, I = 73.
- A – 😀 = U+1F600.😀 = U+1F600.
- D – Characters from U+0800 to U+FFFF use 3 bytes.U+0800 සිට U+FFFF දක්වා bytes 3.
- B – 1000010₂ = 66 = ‘B’.1000010₂ = 66 = ‘B’.
Structured Questionsව්යුහගත ප්රශ්න
1(i) What does ASCII stand for? (1 mark)
(ii) How many bits does standard ASCII use and how many characters can it code? (2 marks)
(iii) State one limitation of ASCII. (1 mark)(i) ASCII හි සම්පූර්ණ නම? (ලකුණු 1)
(ii) සම්මත ASCII bits කීයක් භාවිතා කරයිද, අක්ෂර කීයක් කේත කළ හැකිද? (ලකුණු 2)
(iii) ASCII හි එක් සීමාවක් සඳහන් කරන්න. (ලකුණු 1) (4 marksලකුණු 4)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
2The ASCII code of ‘A’ is 65. (i) Write the ASCII code of ‘G’ in decimal. (1 mark) (ii) Convert it to 7-bit binary. (2 marks) (iii) What is the code of ‘g’? (1 mark)‘A’ හි ASCII කේතය 65. (i) ‘G’ හි ASCII කේතය දශම වලින් ලියන්න. (ලකුණු 1) (ii) එය bit 7 binary වලට හරවන්න. (ලකුණු 2) (iii) ‘g’ හි කේතය? (ලකුණු 1) (4 marksලකුණු 4)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
3(i) Write 2026 in BCD. (2 marks) (ii) Write 2026 in pure binary. (2 marks) (iii) Which uses more bits? (1 mark)(i) 2026 BCD වලින් ලියන්න. (ලකුණු 2) (ii) 2026 සාමාන්ය binary වලින් ලියන්න. (ලකුණු 2) (iii) bits වැඩියෙන් ගන්නේ කුමක්ද? (ලකුණු 1) (5 marksලකුණු 5)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
4Compare ASCII and Unicode under: (i) number of characters (ii) languages supported (iii) storage needed. (3 marks)ASCII සහ Unicode සසඳන්න: (i) අක්ෂර ගණන (ii) සහාය දක්වන භාෂා (iii) අවශ්ය ගබඩා ඉඩ. (ලකුණු 3) (3 marksලකුණු 3)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
5A message is stored in 7-bit ASCII as: 1000011 1000001 1010100. (i) Convert each code to decimal. (2 marks) (ii) Decode the word. (1 mark)පණිවිඩයක් bit 7 ASCII වලින් ගබඩා කර ඇත: 1000011 1000001 1010100. (i) සෑම කේතයක්ම දශම වලට හරවන්න. (ලකුණු 2) (ii) වචනය විකේත කරන්න. (ලකුණු 1) (3 marksලකුණු 3)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
6A student types a Sinhala message on WhatsApp with a 😀 emoji. (i) Which coding system makes this possible? (1 mark) (ii) Give the Unicode range for Sinhala. (1 mark) (iii) Give one reason EBCDIC is not used for this. (1 mark)සිසුවෙක් WhatsApp හි 😀 emoji සහිත සිංහල පණිවිඩයක් type කරයි. (i) මෙය හැකි කරන කේතන පද්ධතිය? (ලකුණු 1) (ii) සිංහල Unicode පරාසය? (ලකුණු 1) (iii) මේ සඳහා EBCDIC භාවිත නොකරන්නේ ඇයි? (ලකුණු 1) (3 marksලකුණු 3)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
🎮 Game🎮 ක්රීඩා
Summary & Downloadsසාරාංශය සහ බාගත කිරීම්
Key pointsප්රධාන කරුණු
- A coding system gives every character a binary code.කේතන පද්ධතියක් සෑම අක්ෂරයකටම binary කේතයක් දෙයි.
- BCD codes each decimal digit in 4 bits (clocks, calculators).BCD සෑම දශම ඉලක්කමක්ම bit 4 කින් (ඔරලෝසු, calculators).
- EBCDIC: 8-bit IBM mainframe code, 256 characters.EBCDIC: bit 8 IBM mainframe කේතය, අක්ෂර 256.
- ASCII: 7 bits = 128 characters; extended ASCII 8 bits = 256.ASCII: bit 7 = අක්ෂර 128; extended ASCII bit 8 = 256.
- ASCII: ‘A’ = 65, ‘a’ = 97, ‘0’ = 48.ASCII: ‘A’ = 65, ‘a’ = 97, ‘0’ = 48.
- Unicode covers all languages and emoji; written as U+hex.Unicode සියලු භාෂා සහ emoji ආවරණය කරයි; U+hex ලෙස ලියයි.
- Sinhala Unicode block: U+0D80 – U+0DFF; stored with UTF-8.සිංහල Unicode කොටස: U+0D80 – U+0DFF; UTF-8 මගින් ගබඩා.
- Limits: BCD digits only, EBCDIC IBM only, ASCII English only, Unicode uses more space.සීමා: BCD ඉලක්කම් පමණි, EBCDIC IBM පමණි, ASCII ඉංග්රීසි පමණි, Unicode ඉඩ වැඩියි.
Downloadsබාගත කිරීම්
Full Lesson 3 PDFසම්පූර්ණ පාඩම 3 PDF: English · සිංහල
Next: Lesson 3 O/L Exam Practiceඊළඟට: පාඩම 3 O/L විභාග පුහුණුව →
