DLD Week 2 Class 2 (3)
DLD Week 2 Class 2 (3)
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
3
Why do we need alphanumeric codes?
Addresses 8 bit locations
000
001
010 0101 1001
89 Dec2Bin
011
100
101
110
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
4
Why do we need alphanumeric codes?
Addresses 8 bit locations
000
001
010
89 BCD
011 1000 1001
100
101
110
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
5
Why do we need alphanumeric codes?
Addresses 8 bit locations
000
001
010 0000 1000
89 BCD
011 0000 1001
100
101
110
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
6
Why do we need alphanumeric codes?
Addresses 8 bit locations
000
001
010
Hi BCD
011
?
100
101
110
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
7
American Standard Code for Information Interchange
100
101
110
Fig: RAM
Lec Md Shadman Aadeeb, Dept. of CSE
2/6/2023
11
American Standard Code for Information Interchange
STX
ETX
Problem 1
• ASCII is well suited for English language
• It can represent a total of 256 characters
• But what about this case?
Problem 2
• You can develop your own coding scheme (mapping) for your own
language
Also emojis.
Solution? :
Unicode
Grapheme
• A single unit of human writing system.
• “J” , “ক”, “ 大”
Codepoint
• Values assigned to the Graphemes (just like they did for ASCII)
“J” = 74 “ক”= 2453 “ 大” = 12233
UTF – 8
“J” = 74 (100 1010)
“ক”= 2453 (1001 1001 1001)
“ 大” = 12233 (101111 11001001)
UTF 32
• “J” = 74 (100 1010)
• “ক”= 2453 (1001 1001 1001)
• “ 大” = 12233 (101111 11001001)
UTF 32 does not use variable number of bits.
Each character(grapheme) is converted into codepoints as usual (see
above)
Then 4 bytes are assigned for each character:
J= 00000000 00000000 00000000 01001010
Lec Md Shadman Aadeeb, Dept. of CSE 27
2/6/2023
Unicode