Alterna · учебный материал

Code tables

ASCII, Unicode, KOI-8, CP1251: code tables, coding comparison, interactive researcher.

Что в этом материале

Содержание и основные понятия

Back to the table of contents
Alterna · Chapter 11 · page 11.2
Code tables
ASCII, Unicode, KOI-8, CP1251: code tables, coding comparison, interactive researcher.
01
What is a code table?
A code table is a match between the symbols and their numerical codes.
GEF 9.2.3
OPS 3.2
Each alphabet symbol is assigned a unique number. This number is translated into a binary code for storage. Different codings use different conformity tables.
1-byte coding
- 1 byte on the symbol ~ 256 characters.
Multibyte
- 2 - 4 bytes ~ millions of symbols.
Symbol "A"
Code: 65
(tenth)
01000001
(dual, 8 bits)
02
ASCII — Basic Code
American Standard Code for Information Interchange (1963)
OGE
ASCII uses 7 bits of 128 characters (0–127). The extended ASC II (8 bits) is 256 characters. The first half (0 – 127) is the same for all codes.
Key ASCII ranges:
Range
Symbols
Example
0–31
Managers
LF(10), CR(13), TAB(9)
32–47
Puncture signs
Gap(32), !"#$%&()*+,--/
48–57
Figures 0-9
'0'=48, '9'=57
65–90
Major A-Z
'A'=65, 'Z'=90
97–122
Stick a-z
'a'=97, 'z'=122
03
Comparison of Russian alphabet coding
Different Encodings — Different Codes for Same Letters
EEG
GEF
Interactive: Coder Comparison
Enter the symbol and see its code in different codes
Codes
Byte.
Bibular
Sixteenth
04
Unicode and UTF-8
Universal coding for all languages of the world
EEG
PIF
Unicode assigns a number to each symbol of all the world's scripts. UTF-8 is the way Uncode is recorded in bytes: Latina = 1 byte, Cyrillica = 2 bytes, Asian languages = 3 - 4 bytes.
UTF-8 character size:
Unicode range
Byte in UTF-8
Examples
U+0000 – U+007F
1 byte
Latinica, numbers, signs
U+0080 – U+07FF
2 bytes
Kirilica, Arabic, Hebrew
U+0800 – U+FFFF
3 bytes
Chinese, Japanese, Korean
U+10000 – U+10FFFF
4 bytes
Emoji, rare hieroglyphs
Interactive: UTF-8 Visualizer
See how much byte each symbol takes.
05
Table ASCII
Full code table 0 - 127: management symbols (0 - 31) + printed (32 - 127)
Interactive: ASCII Table
Press the cell to see details. Gray cells are control characters (not shown as text).
Print symbols (32 - 126):
06
Graph: Text size in different codes
Enter text -- see how many bytes it takes in each code.
EEG
PIF
Interactive Graphics · Code Comparison
07
Tasks from the bank
Upload from JSON file
EEG / EEG
Book of tasks · Code tables
08
Quest test
PIF
Check yourself · 5 questions

Structural map of textbooks