Character Representation: BCD, EBCDIC, ASCII and Unicode – Grade 12 A/L ICT Notes 3.2

© 2026 schoolict.net (Ruwan Mangala Suraweera)

3.2 Character Representation: BCD, EBCDIC, ASCII and Unicodeඅක්ෂර නිරූපණය: BCD, EBCDIC, ASCII සහ යුනිකෝඩ්

Grade 12 A/L ICT · Lesson 312 ශ්‍රේණිය A/L ICT · පාඩම 3

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • A character code gives every character a unique number so text can be stored and shared.අක්ෂර කේතයක් සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන නිසා පෙළ ගබඩා කර බෙදාගත හැක.
  • BCD: each decimal digit in 4 bits (0000–1001); used in calculators and clocks.BCD: සෑම දශම ඉලක්කමක්ම බිටු 4 කින් (0000–1001); ගණක යන්ත්‍ර සහ ඔරලෝසුවල භාවිත වේ.
  • EBCDIC: 8-bit IBM mainframe code; A = C1 hex; letters not continuous.EBCDIC: බිටු 8 IBM මේන්ෆ්‍රේම් කේතය; A = C1 hex; අකුරු අඛණ්ඩ නොවේ.
  • ASCII: 7 bits, 128 codes; A = 65, a = 97, 0 = 48; small = capital + 32.ASCII: බිටු 7, කේත 128; A = 65, a = 97, 0 = 48; සිම්පල් = කැපිටල් + 32.
  • Unicode: a code point for every character in every language; UTF-8 uses 1–4 bytes.යුනිකෝඩ්: සෑම භාෂාවකම සෑම අක්ෂරයකටම කේත ලක්ෂ්‍යයක්; UTF-8 බයිට 1–4 භාවිත කරයි.
CharacterCharacter setBCDEBCDICASCIIExtended ASCIIUnicode

Notesසටහන්

Syllabus 3.2. When you press A on the keyboard, the computer does not store a picture of the letter. It stores a number code. In this part you learn the four main coding schemes – BCD, EBCDIC, ASCII and Unicode – how to convert symbols to codes and back, and the advantages and disadvantages of each.විෂය නිර්දේශය 3.2. ඔබ යතුරුපුවරුවේ A එබූ විට, පරිගණකය අකුරේ පින්තූරයක් ගබඩා නොකරයි. එය සංඛ්‍යා කේතයක් ගබඩා කරයි. මෙම කොටසින් ප්‍රධාන කේතන ක්‍රම හතර – BCD, EBCDIC, ASCII සහ යුනිකෝඩ් – සංකේත කේතවලට සහ ආපසු හරවන ආකාරය, සහ එක් එක් ක්‍රමයේ වාසි සහ අවාසි ඉගෙන ගනී.

1. What is a character code?1. අක්ෂර කේතයක් යනු කුමක්ද?

A character is any letter, digit, symbol or space, such as A, 7, ?, අ or 😀. A character set (coding scheme) is an agreed table that gives every character a unique number. Because both computers use the same table, text typed on one machine shows correctly on another.අක්ෂරයක් යනු A, 7, ?, අ හෝ 😀 වැනි ඕනෑම අකුරක්, ඉලක්කමක්, සංකේතයක් හෝ හිස්තැනකි. අක්ෂර කට්ටලයක් (කේතන ක්‍රමයක්) යනු සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන එකඟ වූ වගුවකි. පරිගණක දෙකම එකම වගුව භාවිත කරන නිසා, එක් යන්ත්‍රයක ටයිප් කළ පෙළ අනෙක් යන්ත්‍රයේ නිවැරදිව පෙනේ.

BCDBCD4 bits per digitඉලක්කමකට බිටු 4Digits 0–9 onlyඉලක්කම් 0–9 පමණිEBCDICEBCDIC8 bits, IBMබිටු 8, IBMA = C1 hexA = C1 hexASCIIASCII7 bits, 128 codesබිටු 7, කේත 128A = 65, a = 97A = 65, a = 97Unicodeයුනිකෝඩ්Over 1.1 million code pointsකේත ලක්ෂ්‍ය මිලියන 1.1 කට වැඩිSinhala, emoji, all scriptsසිංහල, ඉමෝජි, සියලු අක්ෂර
The four coding schemes in this lessonමෙම පාඩමේ කේතන ක්‍රම හතර

2. BCD – Binary Coded Decimal2. BCD – ද්වීමය කේතිත දශමය

In BCD each decimal digit is changed to its own 4-bit code (0 = 0000 … 9 = 1001). The codes 1010 to 1111 are not used. BCD is used where numbers must be shown as digits quickly and exactly: calculators, digital clocks, meters and banking.BCD හි සෑම දශම ඉලක්කමක්ම තමන්ගේම බිටු 4 කේතයකට හරවයි (0 = 0000 … 9 = 1001). 1010 සිට 1111 දක්වා කේත භාවිත නොවේ. සංඛ්‍යා ඉක්මනින් සහ නිවැරදිව ඉලක්කම් ලෙස පෙන්විය යුතු තැන්වල BCD භාවිත වේ: ගණක යන්ත්‍ර, ඩිජිටල් ඔරලෝසු, මීටර සහ බැංකු.

🧮 Worked exampleවිසඳූ උදාහරණය Write 2026 in BCD.2026 BCD වලින් ලියන්න.
Take each digit on its own: 2 → 0010, 0 → 0000, 2 → 0010, 6 → 0110. So 2026 = 0010 0000 0010 0110 (16 bits).සෑම ඉලක්කමක්ම වෙන වෙනම ගන්න: 2 → 0010, 0 → 0000, 2 → 0010, 6 → 0110. එබැවින් 2026 = 0010 0000 0010 0110 (බිටු 16).
Digitඉලක්කම22002266
BCDBCD00100010000000000010001001100110
🧮 Worked exampleවිසඳූ උදාහරණය Compare 59 in BCD and in pure binary.59 BCD සහ සාමාන්‍ය ද්වීමයෙන් සංසන්දනය කරන්න.
BCD: 5 → 0101, 9 → 1001, so 0101 1001 (8 bits). Pure binary: 59 = 32 + 16 + 8 + 2 + 1 = 111011 (6 bits). BCD needs more bits, but each digit is easy to read.BCD: 5 → 0101, 9 → 1001, එබැවින් 0101 1001 (බිටු 8). සාමාන්‍ය ද්වීමය: 59 = 32 + 16 + 8 + 2 + 1 = 111011 (බිටු 6). BCD ට වැඩි බිටු අවශ්‍ය වුවත්, සෑම ඉලක්කමක්ම කියවීමට පහසුයි.
🧮 Worked exampleවිසඳූ උදාහරණය Which decimal number is the BCD code 0111 0000 0100?BCD කේතය 0111 0000 0100 කුමන දශම සංඛ්‍යාවද?
Split into groups of 4: 0111 = 7, 0000 = 0, 0100 = 4. The number is 704. (Do not convert the whole thing as one binary number!)4 බැගින් බෙදන්න: 0111 = 7, 0000 = 0, 0100 = 4. සංඛ්‍යාව 704. (සම්පූර්ණ එක තනි ද්වීමය සංඛ්‍යාවක් ලෙස හරවන්න එපා!)

3. EBCDIC3. EBCDIC

EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit code made by IBM in the 1960s for its mainframe computers. It has 256 codes. The letters are not in one continuous run: A–I are C1–C9, J–R are D1–D9 and S–Z are E2–E9 (hex). Digits 0–9 are F0–F9. It is still used in banks and big IBM mainframes today.EBCDIC (Extended Binary Coded Decimal Interchange Code) යනු 1960 ගණන්වල IBM සිය මේන්ෆ්‍රේම් පරිගණක සඳහා සෑදූ බිටු 8 කේතයකි. එයට කේත 256 ක් ඇත. අකුරු එක දිගට පිළිවෙළින් නොවේ: A–I යනු C1–C9, J–R යනු D1–D9 සහ S–Z යනු E2–E9 (hex). ඉලක්කම් 0–9 යනු F0–F9. අදත් එය බැංකු සහ විශාල IBM මේන්ෆ්‍රේම් වල භාවිත වේ.

🧮 Worked exampleවිසඳූ උදාහරණය Write the word ICT in EBCDIC (hex and binary).ICT යන වචනය EBCDIC (hex සහ ද්වීමය) වලින් ලියන්න.
I = C9, C = C3, T = E3, so C9 C3 E3 (hex) = 11001001 11000011 11100011.I = C9, C = C3, T = E3, එබැවින් C9 C3 E3 (hex) = 11001001 11000011 11100011.

4. ASCII4. ASCII

ASCII (American Standard Code for Information Interchange, 1963) is a 7-bit code with 128 codes (0–127). It is stored in one byte. Extended ASCII uses all 8 bits for 256 codes (extra symbols such as é and £). ASCII is the base of almost all modern codes.ASCII (American Standard Code for Information Interchange, 1963) යනු කේත 128 ක් (0–127) ඇති බිටු 7 කේතයකි. එය එක් බයිටයක ගබඩා වේ. දිගු කළ ASCII කේත 256 ක් සඳහා බිටු 8 ම භාවිත කරයි (é සහ £ වැනි අමතර සංකේත). ASCII බොහෝ නූතන කේතවල පදනමයි.

CodesකේතCharactersඅක්ෂරRememberමතක තබා ගන්න
0–31, 1270–31, 127Control codes (Enter = 13, Tab = 9)පාලන කේත (Enter = 13, Tab = 9)Not printedමුද්‍රණය නොවේ
3232Spaceහිස්තැන32 = 010000032 = 0100000
48–5748–57Digits 0–9ඉලක්කම් 0–9“0” = 48“0” = 48
65–9065–90Capital A–Zකැපිටල් A–Z“A” = 65“A” = 65
97–12297–122Small a–zසිම්පල් a–z“a” = 97“a” = 97
🧮 Worked exampleවිසඳූ උදාහරණය Write the word ICT in ASCII (decimal, hex and 8-bit binary). How many bytes does it need?ICT යන වචනය ASCII (දශම, hex සහ බිටු 8 ද්වීමය) වලින් ලියන්න. බයිට කීයක් අවශ්‍යද?
I = 73, C = 67, T = 84 → hex 49 43 54 → binary 01001001 01000011 01010100. 3 characters × 1 byte = 3 bytes.I = 73, C = 67, T = 84 → hex 49 43 54 → ද්වීමය 01001001 01000011 01010100. අක්ෂර 3 × බයිට 1 = බයිට 3.
I = 73I = 7301001001C = 67C = 6701000011T = 84T = 8401010100MSB = signEach character takes one byte: 3 characters = 3 bytes
The word ICT stored in ASCIIASCII හි ගබඩා කළ ICT වචනය
🧮 Worked exampleවිසඳූ උදාහරණය Decode the ASCII codes 01000011 01000001 01010100.ASCII කේත 01000011 01000001 01010100 විකේතනය කරන්න.
67 = C, 65 = A, 84 = T. The word is CAT.67 = C, 65 = A, 84 = T. වචනය CAT.
🧮 Worked exampleවිසඳූ උදාහරණය The ASCII code of “E” is 69. Find the codes of “e” and “H” without a table.“E” හි ASCII කේතය 69. වගුවක් නැතිව “e” සහ “H” හි කේත සොයන්න.
Small letters are 32 more than capitals: “e” = 69 + 32 = 101. Letters are in order: H is 3 after E, so “H” = 69 + 3 = 72.සිම්පල් අකුරු කැපිටල්වලට වඩා 32 කින් වැඩියි: “e” = 69 + 32 = 101. අකුරු පිළිවෙළට ඇත: H යනු E ට පසු 3 වැන්නයි, එබැවින් “H” = 69 + 3 = 72.
💡 The character “7” (code 55) is not the number 7 (binary 111). Phone numbers and NIC numbers are stored as text, so each digit uses one byte.අක්ෂරය “7” (කේතය 55) සංඛ්‍යාව 7 (ද්වීමය 111) නොවේ. දුරකථන අංක සහ හැඳුනුම්පත් අංක පෙළ ලෙස ගබඩා වන නිසා සෑම ඉලක්කමක්ම බයිටයක් ගනී.

5. Unicode5. යුනිකෝඩ් (Unicode)

ASCII has no space for Sinhala, Tamil, Chinese or emoji. Unicode gives every character in every language its own code point, written U+ and a hex number. There is room for 1,114,112 code points (U+0000 to U+10FFFF). The first 128 code points are the same as ASCII. Sinhala letters are in the block U+0D80 to U+0DFF.ASCII හි සිංහල, දෙමළ, චීන හෝ ඉමෝජි සඳහා ඉඩක් නැත. යුනිකෝඩ් සෑම භාෂාවකම සෑම අක්ෂරයකටම තමන්ගේම කේත ලක්ෂ්‍යයක් දෙයි, එය U+ සහ hex අංකයකින් ලියයි. කේත ලක්ෂ්‍ය 1,114,112 කට ඉඩ ඇත (U+0000 සිට U+10FFFF). පළමු කේත ලක්ෂ්‍ය 128 ASCII ට සමානයි. සිංහල අකුරු U+0D80 සිට U+0DFF කොටසේ ඇත.

1
UTF-8UTF-8
1 to 4 bytes per character. ASCII letters use 1 byte. Used by almost all websites.අක්ෂරයකට බයිට 1 සිට 4. ASCII අකුරු බයිට 1 යි. බොහෝ සෑම වෙබ් අඩවියක්ම භාවිත කරයි.
2
UTF-16UTF-16
2 or 4 bytes per character. Used inside Windows, Java and JavaScript.අක්ෂරයකට බයිට 2 හෝ 4. Windows, Java සහ JavaScript තුළ භාවිත වේ.
3
UTF-32UTF-32
Always 4 bytes per character. Simple but uses the most space.සැමවිටම අක්ෂරයකට බයිට 4. සරල නමුත් වැඩිම ඉඩ ගනී.
🧮 Worked exampleවිසඳූ උදාහරණය Find the Unicode code point and UTF-8 bytes of the Sinhala letter “අ”.සිංහල අකුර “අ” හි යුනිකෝඩ් කේත ලක්ෂ්‍යය සහ UTF-8 බයිට සොයන්න.
“අ” is U+0D85 (decimal 3461). In UTF-8 it takes 3 bytes: E0 B6 85. In UTF-16 it takes 2 bytes.“අ” යනු U+0D85 (දශම 3461). UTF-8 හි එය බයිට 3 ක් ගනී: E0 B6 85. UTF-16 හි බයිට 2 යි.
1. Character: අඅක්ෂරය: අ2. Code point U+0D85කේත ලක්ෂ්‍යය U+0D853. UTF-8 bytes E0 B6 85UTF-8 බයිට E0 B6 854. Stored as 24 bitsබිටු 24 ලෙස ගබඩා වේ
From a Sinhala letter to stored bitsසිංහල අකුරක සිට ගබඩා වූ බිටු දක්වා
🧮 Worked exampleවිසඳූ උදාහරණය How many bytes does the word “ලංකා” need in UTF-8 and in UTF-16? Compare with “ICT” in ASCII.“ලංකා” යන වචනයට UTF-8 සහ UTF-16 හි බයිට කීයක් අවශ්‍යද? ASCII හි “ICT” සමඟ සසඳන්න.
“ලංකා” is 4 code points (ල, ං, ක, ා). UTF-8: 4 × 3 = 12 bytes. UTF-16: 4 × 2 = 8 bytes. “ICT” in ASCII is only 3 bytes. Unicode supports more languages but can need more space.“ලංකා” කේත ලක්ෂ්‍ය 4 කි (ල, ං, ක, ා). UTF-8: 4 × 3 = බයිට 12. UTF-16: 4 × 2 = බයිට 8. ASCII හි “ICT” බයිට 3 ක් පමණි. යුනිකෝඩ් තවත් භාෂා සඳහා සහාය දෙන නමුත් වැඩි ඉඩක් අවශ්‍ය විය හැක.
🧮 Worked exampleවිසඳූ උදාහරණය The emoji 😀 is code point U+1F600. How many bytes does it use in UTF-8?😀 ඉමෝජිය කේත ලක්ෂ්‍යය U+1F600. UTF-8 හි එය බයිට කීයක් භාවිත කරයිද?
Code points above U+FFFF need 4 bytes in UTF-8: F0 9F 98 80.U+FFFF ට වැඩි කේත ලක්ෂ්‍යවලට UTF-8 හි බයිට 4 අවශ්‍යයි: F0 9F 98 80.

6. Advantages and disadvantages6. වාසි සහ අවාසි

CodeකේතයBitsබිටුAdvantagesවාසිDisadvantagesඅවාසි
BCDBCD4 per digit4 per digitEasy to convert to and from decimal; exact for money; easy to show on displaysදශමයට සහ දශමයෙන් හැරවීම පහසුයි; මුදල් සඳහා නිවැරදියි; තිරවල පෙන්වීමට පහසුයිDigits only; wastes bits (1010–1111 unused); slower arithmeticඉලක්කම් පමණි; බිටු නාස්ති වේ (1010–1111 භාවිත නොවේ); අංක ගණිතය මන්දගාමී
EBCDICEBCDIC88256 codes; works with old IBM mainframe systemsකේත 256; පැරණි IBM මේන්ෆ්‍රේම් පද්ධති සමඟ ක්‍රියා කරයිLetters not continuous; not compatible with ASCII; English onlyඅකුරු අඛණ්ඩ නොවේ; ASCII සමඟ නොගැළපේ; ඉංග්‍රීසි පමණි
ASCIIASCII7 (8 extended)7 (8 extended)Simple; small (1 byte); letters in order; used everywhereසරලයි; කුඩායි (බයිට 1); අකුරු පිළිවෙළට; සෑම තැනම භාවිත වේOnly 128 (or 256) characters; no Sinhala, Tamil or emojiඅක්ෂර 128 (හෝ 256) පමණි; සිංහල, දෙමළ හෝ ඉමෝජි නැත
UnicodeUnicode8 to 32 (UTF-8/16/32)8 to 32 (UTF-8/16/32)All languages and emoji; one world standard; UTF-8 matches ASCIIසියලු භාෂා සහ ඉමෝජි; එක් ලෝක ප්‍රමිතියක්; UTF-8 ASCII ට ගැළපේNeeds more storage for non-English text; more complexඉංග්‍රීසි නොවන පෙළට වැඩි ඉඩක් අවශ්‍යයි; වඩා සංකීර්ණයි
NEW 20262026 නව Unicode 18.0 was released on 16 September 2026 and has 172,808 characters (Unicode 17.0 in 2025 had 159,801). Every new version adds scripts, symbols and a few new emoji, which reach phones in the following months.යුනිකෝඩ් 18.0 2026 සැප්තැම්බර් 16 දින නිකුත් වූ අතර එහි අක්ෂර 172,808 ක් ඇත (2025 යුනිකෝඩ් 17.0 හි 159,801). සෑම නව සංස්කරණයක්ම අක්ෂර මාලා, සංකේත සහ නව ඉමෝජි කිහිපයක් එකතු කරයි, ඒවා ඊළඟ මාසවල දුරකථනවලට පැමිණේ.
🚀 Beyond the syllabus (2026 update)🚀 විෂය නිර්දේශයෙන් ඔබ්බට (2026 යාවත්කාලීනය) Not required for the exam – read for interest.විභාගයට අවශ්‍ය නැත – දැනුම සඳහා කියවන්න. Beyond the syllabus – UTF-8 rules the web. In 2026 about 98% of all websites use UTF-8. Many emoji are really several code points joined together: a family emoji or a skin-tone emoji is built with a Zero Width Joiner (U+200D), so one emoji on screen can take 10 or more bytes. Sinhala uses the same joiner: ශ්‍රී needs ශ + ් + ZWJ + ර + ී.විෂය නිර්දේශයෙන් ඔබ්බට – වෙබය පාලනය කරන්නේ UTF-8. 2026 දී සියලු වෙබ් අඩවිවලින් 98% ක් පමණ UTF-8 භාවිත කරයි. බොහෝ ඉමෝජි ඇත්තටම කේත ලක්ෂ්‍ය කිහිපයක් එකට යා කළ ඒවාය: පවුල් ඉමෝජියක් හෝ සම් වර්ණ ඉමෝජියක් Zero Width Joiner (U+200D) එකකින් සාදයි, එබැවින් තිරයේ එක් ඉමෝජියක් බයිට 10 කට වඩා ගත හැක. සිංහලද එම joiner එක භාවිත කරයි: ශ්‍රී සඳහා ශ + ් + ZWJ + ර + ී අවශ්‍යයි.

Key Wordsප්‍රධාන පද

Characterඅක්ෂරය
Any letter, digit, symbol or space that can be stored.ගබඩා කළ හැකි ඕනෑම අකුරක්, ඉලක්කමක්, සංකේතයක් හෝ හිස්තැනක්.
Character setඅක්ෂර කට්ටලය
An agreed table that gives each character a unique number.සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන එකඟ වූ වගුවක්.
BCDBCD
A code that stores each decimal digit as its own 4 bits.සෑම දශම ඉලක්කමක්ම තමන්ගේම බිටු 4 ලෙස ගබඩා කරන කේතය.
EBCDICEBCDIC
An 8-bit IBM mainframe code with letters in separate runs.අකුරු වෙන් වෙන් කොටස්වල ඇති IBM මේන්ෆ්‍රේම් බිටු 8 කේතය.
ASCIIASCII
A 7-bit code with 128 characters, A = 65.අක්ෂර 128 ක් ඇති බිටු 7 කේතය, A = 65.
Extended ASCIIදිගු කළ ASCII
An 8-bit version of ASCII with 256 codes.කේත 256 ක් ඇති ASCII හි බිටු 8 සංස්කරණය.
Unicodeයුනිකෝඩ්
A world standard that gives every character of every language a code point.සෑම භාෂාවකම සෑම අක්ෂරයකටම කේත ලක්ෂ්‍යයක් දෙන ලෝක ප්‍රමිතිය.
Code pointකේත ලක්ෂ්‍යය
The number of a character in Unicode, written like U+0041.යුනිකෝඩ් හි අක්ෂරයක අංකය, U+0041 ලෙස ලියයි.
UTF-8UTF-8
A Unicode encoding that uses 1 to 4 bytes and matches ASCII.බයිට 1 සිට 4 භාවිත කරන, ASCII ට ගැළපෙන යුනිකෝඩ් කේතනය.
UTF-16UTF-16
A Unicode encoding that uses 2 or 4 bytes per character.අක්ෂරයකට බයිට 2 හෝ 4 භාවිත කරන යුනිකෝඩ් කේතනය.
Control codeපාලන කේතය
A code that is not printed but controls the device, such as Enter.මුද්‍රණය නොවන, Enter වැනි උපකරණය පාලනය කරන කේතය.
Encodingකේතනය
The rule for turning characters into bits.අක්ෂර බිටු බවට හරවන නීතිය.

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1Why do we need character codes?අපට අක්ෂර කේත අවශ්‍ය වන්නේ ඇයි?

Answerපිළිතුර: A computer can only store numbers in binary. A character code gives each character a number, and because everyone uses the same code, text can be shared between computers.පරිගණකයකට ගබඩා කළ හැක්කේ ද්වීමය සංඛ්‍යා පමණි. අක්ෂර කේතයක් සෑම අක්ෂරයකටම අංකයක් දෙන අතර සැමදෙනාම එකම කේතය භාවිත කරන නිසා පෙළ පරිගණක අතර බෙදාගත හැක.

2Write 2026 in BCD and say one place where BCD is used.2026 BCD වලින් ලියා BCD භාවිත වන තැනක් කියන්න.

Answerපිළිතුර: 0010 0000 0010 0110. BCD is used in calculators and digital clocks.0010 0000 0010 0110. BCD ගණක යන්ත්‍ර සහ ඩිජිටල් ඔරලෝසුවල භාවිත වේ.

3Write “ICT” in 8-bit ASCII binary.“ICT” බිටු 8 ASCII ද්වීමයෙන් ලියන්න.

Answerපිළිතුර: 01001001 01000011 0101010001001001 01000011 01010100

4Give two differences between ASCII and Unicode.ASCII සහ යුනිකෝඩ් අතර වෙනස්කම් දෙකක් දෙන්න.

Answerපිළිතුර: ASCII uses 7 bits and has 128 characters for English; Unicode has over a million code points for all languages. ASCII uses 1 byte; Unicode (UTF-8) uses 1 to 4 bytes.ASCII බිටු 7 භාවිත කර ඉංග්‍රීසි සඳහා අක්ෂර 128 ක් ඇත; යුනිකෝඩ් සියලු භාෂා සඳහා කේත ලක්ෂ්‍ය මිලියනයකට වඩා ඇත. ASCII බයිට 1 යි; යුනිකෝඩ් (UTF-8) බයිට 1 සිට 4.

5Why was Unicode important for Sinhala users?සිංහල භාවිත කරන්නන්ට යුනිකෝඩ් වැදගත් වූයේ ඇයි?

Answerපිළිතුර: Before Unicode, Sinhala text used special fonts that mapped letters onto ASCII codes, so text broke on other computers. Unicode gives Sinhala its own code points (U+0D80–U+0DFF), so Sinhala works on every phone, website and search engine.යුනිකෝඩ් ට පෙර සිංහල පෙළ ASCII කේත මත අකුරු සිතියම් කළ විශේෂ අකුරු (fonts) භාවිත කළ නිසා වෙනත් පරිගණකවල පෙළ කැඩුණි. යුනිකෝඩ් සිංහලයට තමන්ගේම කේත ලක්ෂ්‍ය (U+0D80–U+0DFF) දෙන නිසා සිංහල සෑම දුරකථනයක, වෙබ් අඩවියක සහ සෙවුම් යන්ත්‍රයක ක්‍රියා කරයි.

6Give one advantage and one disadvantage of EBCDIC.EBCDIC හි එක් වාසියක් සහ එක් අවාසියක් දෙන්න.

Answerපිළිතුර: Advantage: works with existing IBM mainframe systems (256 codes). Disadvantage: letters are not continuous and it is not compatible with ASCII.වාසිය: පවතින IBM මේන්ෆ්‍රේම් පද්ධති සමඟ ක්‍රියා කරයි (කේත 256). අවාසිය: අකුරු අඛණ්ඩ නොවන අතර ASCII සමඟ නොගැළපේ.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 20

1How many characters can standard 7-bit ASCII represent?සම්මත බිටු 7 ASCII නිරූපණය කළ හැකි අක්ෂර ගණන කීයද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

2⁷ = 128.2⁷ = 128.

2What is the ASCII code of “A”?“A” හි ASCII කේතය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

A = 65 (hex 41).A = 65 (hex 41).

3The ASCII code of “a” is 97. What is the code of “d”?“a” හි ASCII කේතය 97. “d” හි කේතය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

97 + 3 = 100.97 + 3 = 100.

4What is 59 in BCD?59 BCD වලින් කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

5 = 0101, 9 = 1001.5 = 0101, 9 = 1001.

5Which of these is NOT a valid BCD digit?පහත ඒවායින් වලංගු BCD ඉලක්කමක් නොවන්නේ කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Only 0000–1001 are used.0000–1001 පමණක් භාවිත වේ.

6The BCD code 0011 1000 stands for:BCD කේතය 0011 1000 නියෝජනය කරන්නේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

0011 = 3, 1000 = 8.0011 = 3, 1000 = 8.

7Which code was made by IBM for mainframes?මේන්ෆ්‍රේම් සඳහා IBM සෑදූ කේතය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

EBCDIC is IBM’s 8-bit code.EBCDIC යනු IBM හි බිටු 8 කේතයයි.

8In EBCDIC the letter “A” is (hex):EBCDIC හි “A” අකුර (hex):

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

A = C1 in EBCDIC.EBCDIC හි A = C1.

9Which Unicode block holds the Sinhala script?සිංහල අක්ෂර මාලාව ඇත්තේ කුමන යුනිකෝඩ් කොටසේද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Sinhala is U+0D80–U+0DFF.සිංහල U+0D80–U+0DFF.

10How many bytes does the letter “අ” (U+0D85) use in UTF-8?“අ” (U+0D85) අකුර UTF-8 හි බයිට කීයක් භාවිත කරයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

U+0800–U+FFFF need 3 bytes.U+0800–U+FFFF සඳහා බයිට 3 අවශ්‍යයි.

11Which encoding is used by almost all websites in 2026?2026 දී බොහෝ සෑම වෙබ් අඩවියක්ම භාවිත කරන කේතනය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

About 98% of sites use UTF-8.අඩවිවලින් 98% ක් පමණ UTF-8 භාවිත කරයි.

12The ASCII codes 01001001 01010100 spell:ASCII කේත 01001001 01010100 මගින් ලියවෙන්නේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

73 = I, 84 = T.73 = I, 84 = T.

13What is a main disadvantage of ASCII?ASCII හි ප්‍රධාන අවාසියක් කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

Only 128 characters, English only.අක්ෂර 128 ක් පමණි, ඉංග්‍රීසි පමණි.

14How many bytes does UTF-32 use for every character?UTF-32 සෑම අක්ෂරයක් සඳහාම බයිට කීයක් භාවිත කරයිද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

32 bits = 4 bytes, always.බිටු 32 = බයිට 4, සැමවිටම.

15The first 128 Unicode code points are the same as:පළමු යුනිකෝඩ් කේත ලක්ෂ්‍ය 128 සමාන වන්නේ:

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Unicode keeps ASCII for compatibility.ගැළපීම සඳහා යුනිකෝඩ් ASCII රඳවා ගනී.

16Which term means: “Any letter, digit, symbol or space that can be stored”?“ගබඩා කළ හැකි ඕනෑම අකුරක්, ඉලක්කමක්, සංකේතයක් හෝ හිස්තැනක්” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Character – Any letter, digit, symbol or space that can be stored.අක්ෂරය – ගබඩා කළ හැකි ඕනෑම අකුරක්, ඉලක්කමක්, සංකේතයක් හෝ හිස්තැනක්.

17Which term means: “An agreed table that gives each character a unique number”?“සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන එකඟ වූ වගුවක්” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Character set – An agreed table that gives each character a unique number.අක්ෂර කට්ටලය – සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන එකඟ වූ වගුවක්.

18Which term means: “A code that stores each decimal digit as its own 4 bits”?“සෑම දශම ඉලක්කමක්ම තමන්ගේම බිටු 4 ලෙස ගබඩා කරන කේතය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

BCD – A code that stores each decimal digit as its own 4 bits.BCD – සෑම දශම ඉලක්කමක්ම තමන්ගේම බිටු 4 ලෙස ගබඩා කරන කේතය.

19Which term means: “An 8-bit IBM mainframe code with letters in separate runs”?“අකුරු වෙන් වෙන් කොටස්වල ඇති IBM මේන්ෆ්‍රේම් බිටු 8 කේතය” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

EBCDIC – An 8-bit IBM mainframe code with letters in separate runs.EBCDIC – අකුරු වෙන් වෙන් කොටස්වල ඇති IBM මේන්ෆ්‍රේම් බිටු 8 කේතය.

20Which term means: “A 7-bit code with 128 characters, A = 65”?“අක්ෂර 128 ක් ඇති බිටු 7 කේතය, A = 65” යන්නෙන් අදහස් වන පදය කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E

ASCII – A 7-bit code with 128 characters, A = 65.ASCII – අක්ෂර 128 ක් ඇති බිටු 7 කේතය, A = 65.

MCQ answer keyMCQ පිළිතුරු

  1. A – 2⁷ = 128.2⁷ = 128.
  2. B – A = 65 (hex 41).A = 65 (hex 41).
  3. A – 97 + 3 = 100.97 + 3 = 100.
  4. C – 5 = 0101, 9 = 1001.5 = 0101, 9 = 1001.
  5. B – Only 0000–1001 are used.0000–1001 පමණක් භාවිත වේ.
  6. D – 0011 = 3, 1000 = 8.0011 = 3, 1000 = 8.
  7. A – EBCDIC is IBM’s 8-bit code.EBCDIC යනු IBM හි බිටු 8 කේතයයි.
  8. E – A = C1 in EBCDIC.EBCDIC හි A = C1.
  9. A – Sinhala is U+0D80–U+0DFF.සිංහල U+0D80–U+0DFF.
  10. B – U+0800–U+FFFF need 3 bytes.U+0800–U+FFFF සඳහා බයිට 3 අවශ්‍යයි.
  11. D – About 98% of sites use UTF-8.අඩවිවලින් 98% ක් පමණ UTF-8 භාවිත කරයි.
  12. E – 73 = I, 84 = T.73 = I, 84 = T.
  13. E – Only 128 characters, English only.අක්ෂර 128 ක් පමණි, ඉංග්‍රීසි පමණි.
  14. B – 32 bits = 4 bytes, always.බිටු 32 = බයිට 4, සැමවිටම.
  15. D – Unicode keeps ASCII for compatibility.ගැළපීම සඳහා යුනිකෝඩ් ASCII රඳවා ගනී.
  16. C – Character – Any letter, digit, symbol or space that can be stored.අක්ෂරය – ගබඩා කළ හැකි ඕනෑම අකුරක්, ඉලක්කමක්, සංකේතයක් හෝ හිස්තැනක්.
  17. D – Character set – An agreed table that gives each character a unique number.අක්ෂර කට්ටලය – සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන එකඟ වූ වගුවක්.
  18. C – BCD – A code that stores each decimal digit as its own 4 bits.BCD – සෑම දශම ඉලක්කමක්ම තමන්ගේම බිටු 4 ලෙස ගබඩා කරන කේතය.
  19. C – EBCDIC – An 8-bit IBM mainframe code with letters in separate runs.EBCDIC – අකුරු වෙන් වෙන් කොටස්වල ඇති IBM මේන්ෆ්‍රේම් බිටු 8 කේතය.
  20. E – ASCII – A 7-bit code with 128 characters, A = 65.ASCII – අක්ෂර 128 ක් ඇති බිටු 7 කේතය, A = 65.

Structured Questionsව්‍යුහගත ප්‍රශ්න

1(a) Write 59 in BCD. (b) Write it in pure binary. (c) Which needs more bits and why?(a) 59 BCD වලින් ලියන්න. (b) සාමාන්‍ය ද්වීමයෙන් ලියන්න. (c) වැඩි බිටු අවශ්‍ය කුමකටද, ඇයි? (3 marksලකුණු 3)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) 0101 1001; (b) 111011; (c) BCD needs 8 bits against 6, because each digit uses 4 bits and codes 1010–1111 are wasted.(a) 0101 1001; (b) 111011; (c) BCD ට 6 ට එරෙහිව බිටු 8 අවශ්‍යයි, සෑම ඉලක්කමක්ම බිටු 4 ගන්නා අතර 1010–1111 කේත නාස්ති වන නිසා.

2(a) Write “ICT” in ASCII decimal and binary. (b) How many bits are needed to store it in 8-bit ASCII?(a) “ICT” ASCII දශම සහ ද්වීමයෙන් ලියන්න. (b) බිටු 8 ASCII හි ගබඩා කිරීමට බිටු කීයක් අවශ්‍යද? (3 marksලකුණු 3)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) 73, 67, 84; 01001001 01000011 01010100; (b) 3 × 8 = 24 bits.(a) 73, 67, 84; 01001001 01000011 01010100; (b) 3 × 8 = බිටු 24.

3Decode the ASCII binary 01000011 01000001 01010100 and write the same word in EBCDIC hex.ASCII ද්වීමය 01000011 01000001 01010100 විකේතනය කර එම වචනය EBCDIC hex වලින් ලියන්න. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
67 = C; 65 = A; 84 = T, word CAT; EBCDIC C3 C1 E3.67 = C; 65 = A; 84 = T, වචනය CAT; EBCDIC C3 C1 E3.

4(a) What is a Unicode code point? (b) Give the code point and UTF-8 bytes of “අ”. (c) Give two advantages of Unicode.(a) යුනිකෝඩ් කේත ලක්ෂ්‍යයක් යනු කුමක්ද? (b) “අ” හි කේත ලක්ෂ්‍යය සහ UTF-8 බයිට දෙන්න. (c) යුනිකෝඩ් හි වාසි දෙකක් දෙන්න. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
(a) the unique number of a character, written U+hex; (b) U+0D85, E0 B6 85; (c) supports all languages and emoji; one world standard compatible with ASCII.(a) අක්ෂරයක අනන්‍ය අංකය, U+hex ලෙස ලියයි; (b) U+0D85, E0 B6 85; (c) සියලු භාෂා සහ ඉමෝජි සඳහා සහාය; ASCII ට ගැළපෙන එක් ලෝක ප්‍රමිතියක්.

5Compare BCD, EBCDIC, ASCII and Unicode by number of bits and one use of each.BCD, EBCDIC, ASCII සහ යුනිකෝඩ් බිටු ගණන සහ එක් එක් භාවිතයක් අනුව සසඳන්න. (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
BCD 4 bits per digit, calculators; EBCDIC 8 bits, IBM mainframes; ASCII 7 bits, English text and keyboards; Unicode 8 to 32 bits, websites and phones in all languages.BCD ඉලක්කමකට බිටු 4, ගණක යන්ත්‍ර; EBCDIC බිටු 8, IBM මේන්ෆ්‍රේම්; ASCII බිටු 7, ඉංග්‍රීසි පෙළ සහ යතුරුපුවරු; යුනිකෝඩ් බිටු 8 සිට 32, සියලු භාෂාවලින් වෙබ් අඩවි සහ දුරකථන.

🎮 Game🎮 ක්‍රීඩා

Pick a game. Each one uses words from this lesson.ක්‍රීඩාවක් තෝරන්න. හැම එකක්ම මේ පාඩමේ වචන පාවිච්චි කරනවා.

Summary & Downloadsසාරාංශය සහ බාගත කිරීම්

Key pointsප්‍රධාන කරුණු

  • A character code gives every character a unique number so text can be stored and shared.අක්ෂර කේතයක් සෑම අක්ෂරයකටම අනන්‍ය අංකයක් දෙන නිසා පෙළ ගබඩා කර බෙදාගත හැක.
  • BCD: each decimal digit in 4 bits (0000–1001); used in calculators and clocks.BCD: සෑම දශම ඉලක්කමක්ම බිටු 4 කින් (0000–1001); ගණක යන්ත්‍ර සහ ඔරලෝසුවල භාවිත වේ.
  • EBCDIC: 8-bit IBM mainframe code; A = C1 hex; letters not continuous.EBCDIC: බිටු 8 IBM මේන්ෆ්‍රේම් කේතය; A = C1 hex; අකුරු අඛණ්ඩ නොවේ.
  • ASCII: 7 bits, 128 codes; A = 65, a = 97, 0 = 48; small = capital + 32.ASCII: බිටු 7, කේත 128; A = 65, a = 97, 0 = 48; සිම්පල් = කැපිටල් + 32.
  • Unicode: a code point for every character in every language; UTF-8 uses 1–4 bytes.යුනිකෝඩ්: සෑම භාෂාවකම සෑම අක්ෂරයකටම කේත ලක්ෂ්‍යයක්; UTF-8 බයිට 1–4 භාවිත කරයි.
  • Sinhala is U+0D80–U+0DFF and takes 3 bytes per letter in UTF-8.සිංහල U+0D80–U+0DFF වන අතර UTF-8 හි අකුරකට බයිට 3 ක් ගනී.

Downloadsබාගත කිරීම්

Full Lesson 3 PDFසම්පූර්ණ පාඩම 3 PDF: English · සිංහල

Next noteඊළඟ සටහන 3.3 →

© 2026 schoolict.net (Ruwan Mangala Suraweera). All rights reserved.සියලු හිමිකම් ඇවිරිණි.