ASCII: Różnice pomiędzy wersjami
m (Utworzył nową stronę „'''ASCII''' (ang. '''A'''merican '''S'''tandard '''C'''ode for '''I'''nformation '''I'''nterchange) to 7-bitowy kod przyporządkowujący liczby od 0 do 127 literom ...”) |
m |
||
Linia 4: | Linia 4: | ||
Ponieważ kod ASCII jest 7-[[bit]]owy, a większość komputerów używa [[bajt]]ów 8-bitowych, dodatkowy bit wykorzystano do powiększenia zbioru kodowanych znaków do 256 symboli. <br />Powstało wiele różnych rozszerzeń ASCII wykorzystujących ósmy bit (np. rozszerzenia firm IBM lub Microsoft), nazywanych stronami kodowymi. Kodowanie [[UTF-8]] można także uznać za rozszerzenie ASCII, jednak w nim dodatkowe znaki są kodowane na 2 i więcej bajtach. | Ponieważ kod ASCII jest 7-[[bit]]owy, a większość komputerów używa [[bajt]]ów 8-bitowych, dodatkowy bit wykorzystano do powiększenia zbioru kodowanych znaków do 256 symboli. <br />Powstało wiele różnych rozszerzeń ASCII wykorzystujących ósmy bit (np. rozszerzenia firm IBM lub Microsoft), nazywanych stronami kodowymi. Kodowanie [[UTF-8]] można także uznać za rozszerzenie ASCII, jednak w nim dodatkowe znaki są kodowane na 2 i więcej bajtach. | ||
+ | |||
+ | == Tabela kodów ASCII == | ||
+ | {| class="wikitable" | ||
+ | |-align=center | ||
+ | ! DEC || HEX || Znak || DEC || HEX || Znak || DEC || HEX || Znak || DEC || HEX || Znak | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8" | 0 || 00 | ||
+ | | style="text-align:left;"| Null | ||
+ | | style="background:#e8e8e8;" | 32 || 20 || Spacja | ||
+ | | style="background:#e8e8e8;" | 64 || 40 || @ | ||
+ | | style="background:#e8e8e8;" | 96 || 60 || ` | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 1 || 01 | ||
+ | | style="text-align:left;" | Start Of Heading | ||
+ | | style="background:#e8e8e8;" | 33 || 21 || ! | ||
+ | | style="background:#e8e8e8;" | 65 || 41 || A | ||
+ | | style="background:#e8e8e8;" | 97 || 61 || a | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 2 || 02 | ||
+ | | style="text-align:left;" | Start of Text | ||
+ | | style="background:#e8e8e8;" | 34 || 22 || " | ||
+ | | style="background:#e8e8e8;" | 66 || 42 || B | ||
+ | | style="background:#e8e8e8;" | 98 || 62 || b | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 3 || 03 | ||
+ | | style="text-align:left;" | End of Text | ||
+ | | style="background:#e8e8e8;" | 35 || 23 || # | ||
+ | | style="background:#e8e8e8;" | 67 || 43 || C | ||
+ | | style="background:#e8e8e8;" | 99 || 63 || c | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 4 || 04 | ||
+ | | style="text-align:left;" | End of Transmission | ||
+ | | style="background:#e8e8e8;" | 36 || 24 || $ | ||
+ | | style="background:#e8e8e8;" | 68 || 44 || D | ||
+ | | style="background:#e8e8e8;" | 100 || 64 || d | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 5 || 05 | ||
+ | | style="text-align:left;" | Enquiry | ||
+ | | style="background:#e8e8e8;" | 37 || 25 || % | ||
+ | | style="background:#e8e8e8;" | 69 || 45 || E | ||
+ | | style="background:#e8e8e8;" | 101 || 65 || e | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 6 || 06 | ||
+ | | style="text-align:left;" | Acknowledge | ||
+ | | style="background:#e8e8e8;" | 38 || 26 || & | ||
+ | | style="background:#e8e8e8;" | 70 || 46 || F | ||
+ | | style="background:#e8e8e8;" | 102 || 66 || f | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 7 || 07 | ||
+ | | style="text-align:left;" | Bell | ||
+ | | style="background:#e8e8e8;" | 39 || 27 || ' | ||
+ | | style="background:#e8e8e8;" | 71 || 47 || G | ||
+ | | style="background:#e8e8e8;" | 103 || 67 || g | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 8 || 08 | ||
+ | | style="text-align:left;" | Backspace | ||
+ | | style="background:#e8e8e8;" | 40 || 28 || ( | ||
+ | | style="background:#e8e8e8;" | 72 || 48 || H | ||
+ | | style="background:#e8e8e8;" | 104 || 68 || h | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 9 || 09 | ||
+ | | style="text-align:left;" | Horizontal Tab | ||
+ | | style="background:#e8e8e8;" | 41 || 29 || ) | ||
+ | | style="background:#e8e8e8;" | 73 || 49 || I | ||
+ | | style="background:#e8e8e8;" | 105 || 69 || i | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 10 || 0A | ||
+ | | style="text-align:left;" | Line Feed | ||
+ | | style="background:#e8e8e8;" | 42 || 2A || * | ||
+ | | style="background:#e8e8e8;" | 74 || 4A || J | ||
+ | | style="background:#e8e8e8;" | 106 || 6A || j | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 11 || 0B | ||
+ | | style="text-align:left;" | Vertical Tab | ||
+ | | style="background:#e8e8e8;" | 43 || 2B || + | ||
+ | | style="background:#e8e8e8;" | 75 || 4B || K | ||
+ | | style="background:#e8e8e8;" | 107 || 6B || k | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 12 || 0C | ||
+ | | style="text-align:left;" | Form Feed | ||
+ | | style="background:#e8e8e8;" | 44 || 2C || , | ||
+ | | style="background:#e8e8e8;" | 76 || 4C || L | ||
+ | | style="background:#e8e8e8;" | 108 || 6C || l | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 13 || 0D | ||
+ | | style="text-align:left;" | Carriage Return | ||
+ | | style="background:#e8e8e8;" | 45 || 2D || - | ||
+ | | style="background:#e8e8e8;" | 77 || 4D || M | ||
+ | | style="background:#e8e8e8;" | 109 || 6D || m | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 14 || 0E | ||
+ | | style="text-align:left;" | Shift Out | ||
+ | | style="background:#e8e8e8;" | 46 || 2E || . | ||
+ | | style="background:#e8e8e8;" | 78 || 4E || N | ||
+ | | style="background:#e8e8e8;" | 110 || 6E || n | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 15 || 0F | ||
+ | | style="text-align:left;" | Shift In | ||
+ | | style="background:#e8e8e8;" | 47 || 2F || / | ||
+ | | style="background:#e8e8e8;" | 79 || 4F || O | ||
+ | | style="background:#e8e8e8;" | 111 || 6F || o | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 16 || 10 | ||
+ | | style="text-align:left;" | Data Link Escape | ||
+ | | style="background:#e8e8e8;" | 48 || 30 || 0 | ||
+ | | style="background:#e8e8e8;" | 80 || 50 || P | ||
+ | | style="background:#e8e8e8;" | 112 || 70 || p | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 17 || 11 | ||
+ | | style="text-align:left;" | Device Control 1 (XON) | ||
+ | | style="background:#e8e8e8;" | 49 || 31 || 1 | ||
+ | | style="background:#e8e8e8;" | 81 || 51 || Q | ||
+ | | style="background:#e8e8e8;" | 113 || 71 || q | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 18 || 12 | ||
+ | | style="text-align:left;" | Device Control 2 | ||
+ | | style="background:#e8e8e8;" | 50 || 32 || 2 | ||
+ | | style="background:#e8e8e8;" | 82 || 52 || R | ||
+ | | style="background:#e8e8e8;" | 114 || 72 || r | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 19 || 13 | ||
+ | | style="text-align:left;" | Device Control 3 (XOFF) | ||
+ | | style="background:#e8e8e8;" | 51 || 33 || 3 | ||
+ | | style="background:#e8e8e8;" | 83 || 53 || S | ||
+ | | style="background:#e8e8e8;" | 115 || 73 || s | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 20 || 14 | ||
+ | | style="text-align:left;" | Device Control 4 | ||
+ | | style="background:#e8e8e8;" | 52 || 34 || 4 | ||
+ | | style="background:#e8e8e8;" | 84 || 54 || T | ||
+ | | style="background:#e8e8e8;" | 116 || 74 || t | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 21 || 15 | ||
+ | | style="text-align:left;" | Negative Acknowledge | ||
+ | | style="background:#e8e8e8;" | 53 || 35 || 5 | ||
+ | | style="background:#e8e8e8;" | 85 || 55 || U | ||
+ | | style="background:#e8e8e8;" | 117 || 75 || u | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 22 || 16 | ||
+ | | style="text-align:left;" | Synchronous Idle | ||
+ | | style="background:#e8e8e8;" | 54 || 36 || 6 | ||
+ | | style="background:#e8e8e8;" | 86 || 56 || V | ||
+ | | style="background:#e8e8e8;" | 118 || 76 || v | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 23 || 17 | ||
+ | | style="text-align:left;" | End of Transmission Block | ||
+ | | style="background:#e8e8e8;" | 55 || 37 || 7 | ||
+ | | style="background:#e8e8e8;" | 87 || 57 || W | ||
+ | | style="background:#e8e8e8;" | 119 || 77 || w | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 24 || 18 | ||
+ | | style="text-align:left;" | Cancel | ||
+ | | style="background:#e8e8e8;" | 56 || 38 || 8 | ||
+ | | style="background:#e8e8e8;" | 88 || 58 || X | ||
+ | | style="background:#e8e8e8;" | 120 || 78 || x | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 25 || 19 | ||
+ | | style="text-align:left;" | End of Medium | ||
+ | | style="background:#e8e8e8;" | 57 || 39 || 9 | ||
+ | | style="background:#e8e8e8;" | 89 || 59 || Y | ||
+ | | style="background:#e8e8e8;" | 121 || 79 || y | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 26 || 1A | ||
+ | | style="text-align:left;" | Substitute | ||
+ | | style="background:#e8e8e8;" | 58 || 3A || : | ||
+ | | style="background:#e8e8e8;" | 90 || 5A || Z | ||
+ | | style="background:#e8e8e8;" | 122 || 7A || z | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 27 || 1B | ||
+ | | style="text-align:left;" | Escape | ||
+ | | style="background:#e8e8e8;" | 59 || 3B || ; | ||
+ | | style="background:#e8e8e8;" | 91 || 5B || [ | ||
+ | | style="background:#e8e8e8;" | 123 || 7B || { | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 28 || 1C | ||
+ | | style="text-align:left;" | File Separator | ||
+ | | style="background:#e8e8e8;" | 60 || 3C || < | ||
+ | | style="background:#e8e8e8;" | 92 || 5C || \ | ||
+ | | style="background:#e8e8e8;" | 124 || 7C || | | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 29 || 1D | ||
+ | | style="text-align:left;" | Group Separator | ||
+ | | style="background:#e8e8e8;" | 61 || 3D || = | ||
+ | | style="background:#e8e8e8;" | 93 || 5D || ] | ||
+ | | style="background:#e8e8e8;" | 125 || 7D || } | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 30 || 1E | ||
+ | | style="text-align:left;" | Record Separator | ||
+ | | style="background:#e8e8e8;" | 62 || 3E || > | ||
+ | | style="background:#e8e8e8;" | 94 || 5E || ^ | ||
+ | | style="background:#e8e8e8;" | 126 || 7E || ~ | ||
+ | |-align=center | ||
+ | | style="background:#e8e8e8;" | 31 || 1F | ||
+ | | style="text-align:left;" | Unit Separator | ||
+ | | style="background:#e8e8e8;" | 63 || 3F || ? | ||
+ | | style="background:#e8e8e8;" | 95 || 5F || _ | ||
+ | | style="background:#e8e8e8;" | 127 || 7F || Delete | ||
+ | |} |
Wersja z 20:03, 4 sty 2014
ASCII (ang. American Standard Code for Information Interchange) to 7-bitowy kod przyporządkowujący liczby od 0 do 127 literom alfabetu angielskiego, cyfrom, znakom przestankowym, poleceniom sterującym i innym symbolom.
Zbiór znaków ASCII tworzą litery, cyfry oraz inne znaki drukowane. Jest to 95 znaków o kodach 32 - 126. Pozostałe 33 kody, od 0 do 31 i 127 to tzw. kody sterujące, służące do sterowania urządzeniem odbierającym komunikat, np. drukarką czy terminalem.
Ponieważ kod ASCII jest 7-bitowy, a większość komputerów używa bajtów 8-bitowych, dodatkowy bit wykorzystano do powiększenia zbioru kodowanych znaków do 256 symboli.
Powstało wiele różnych rozszerzeń ASCII wykorzystujących ósmy bit (np. rozszerzenia firm IBM lub Microsoft), nazywanych stronami kodowymi. Kodowanie UTF-8 można także uznać za rozszerzenie ASCII, jednak w nim dodatkowe znaki są kodowane na 2 i więcej bajtach.
Tabela kodów ASCII
DEC | HEX | Znak | DEC | HEX | Znak | DEC | HEX | Znak | DEC | HEX | Znak |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 00 | Null | 32 | 20 | Spacja | 64 | 40 | @ | 96 | 60 | ` |
1 | 01 | Start Of Heading | 33 | 21 | ! | 65 | 41 | A | 97 | 61 | a |
2 | 02 | Start of Text | 34 | 22 | " | 66 | 42 | B | 98 | 62 | b |
3 | 03 | End of Text | 35 | 23 | # | 67 | 43 | C | 99 | 63 | c |
4 | 04 | End of Transmission | 36 | 24 | $ | 68 | 44 | D | 100 | 64 | d |
5 | 05 | Enquiry | 37 | 25 | % | 69 | 45 | E | 101 | 65 | e |
6 | 06 | Acknowledge | 38 | 26 | & | 70 | 46 | F | 102 | 66 | f |
7 | 07 | Bell | 39 | 27 | ' | 71 | 47 | G | 103 | 67 | g |
8 | 08 | Backspace | 40 | 28 | ( | 72 | 48 | H | 104 | 68 | h |
9 | 09 | Horizontal Tab | 41 | 29 | ) | 73 | 49 | I | 105 | 69 | i |
10 | 0A | Line Feed | 42 | 2A | * | 74 | 4A | J | 106 | 6A | j |
11 | 0B | Vertical Tab | 43 | 2B | + | 75 | 4B | K | 107 | 6B | k |
12 | 0C | Form Feed | 44 | 2C | , | 76 | 4C | L | 108 | 6C | l |
13 | 0D | Carriage Return | 45 | 2D | - | 77 | 4D | M | 109 | 6D | m |
14 | 0E | Shift Out | 46 | 2E | . | 78 | 4E | N | 110 | 6E | n |
15 | 0F | Shift In | 47 | 2F | / | 79 | 4F | O | 111 | 6F | o |
16 | 10 | Data Link Escape | 48 | 30 | 0 | 80 | 50 | P | 112 | 70 | p |
17 | 11 | Device Control 1 (XON) | 49 | 31 | 1 | 81 | 51 | Q | 113 | 71 | q |
18 | 12 | Device Control 2 | 50 | 32 | 2 | 82 | 52 | R | 114 | 72 | r |
19 | 13 | Device Control 3 (XOFF) | 51 | 33 | 3 | 83 | 53 | S | 115 | 73 | s |
20 | 14 | Device Control 4 | 52 | 34 | 4 | 84 | 54 | T | 116 | 74 | t |
21 | 15 | Negative Acknowledge | 53 | 35 | 5 | 85 | 55 | U | 117 | 75 | u |
22 | 16 | Synchronous Idle | 54 | 36 | 6 | 86 | 56 | V | 118 | 76 | v |
23 | 17 | End of Transmission Block | 55 | 37 | 7 | 87 | 57 | W | 119 | 77 | w |
24 | 18 | Cancel | 56 | 38 | 8 | 88 | 58 | X | 120 | 78 | x |
25 | 19 | End of Medium | 57 | 39 | 9 | 89 | 59 | Y | 121 | 79 | y |
26 | 1A | Substitute | 58 | 3A | : | 90 | 5A | Z | 122 | 7A | z |
27 | 1B | Escape | 59 | 3B | ; | 91 | 5B | [ | 123 | 7B | { |
28 | 1C | File Separator | 60 | 3C | < | 92 | 5C | \ | 124 | 7C | | |
29 | 1D | Group Separator | 61 | 3D | = | 93 | 5D | ] | 125 | 7D | } |
30 | 1E | Record Separator | 62 | 3E | > | 94 | 5E | ^ | 126 | 7E | ~ |
31 | 1F | Unit Separator | 63 | 3F | ? | 95 | 5F | _ | 127 | 7F | Delete |