DEC | BIN 8421 | OCT | HEX | Gray′a DCBA | BIN-P DCBA P | BIN-NP DCBA N |
---|---|---|---|---|---|---|
0 | 0000 | 0 | 0 | 0000 | 0000 0 | 0000 1 |
1 | 0001 | 1 | 1 | 0001 | 0001 1 | 0001 0 |
2 | 0010 | 2 | 2 | 0011 | 0010 1 | 0010 0 |
3 | 0011 | 3 | 3 | 0010 | 0011 0 | 0011 1 |
4 | 0100 | 4 | 4 | 0110 | 0100 1 | 0100 0 |
5 | 0101 | 5 | 5 | 0111 | 0101 0 | 0101 1 |
6 | 0110 | 6 | 6 | 0101 | 0110 0 | 0110 1 |
7 | 0111 | 7 | 7 | 0100 | 0111 1 | 0111 0 |
8 | 1000 | 10 | 8 | 1100 | 1000 1 | 1000 0 |
9 | 1001 | 11 | 9 | 1101 | 1001 0 | 1001 1 |
10 | 1010 | 12 | A | 1111 | 1010 0 | 1010 1 |
11 | 1011 | 13 | B | 1110 | 1011 1 | 1011 0 |
12 | 1100 | 14 | C | 1010 | 1100 0 | 1100 1 |
13 | 1101 | 15 | D | 1011 | 1101 1 | 1101 0 |
14 | 1110 | 16 | E | 1001 | 1110 1 | 1110 0 |
15 | 1111 | 17 | F | 1000 | 1111 0 | 1111 1 |
DEC | BIN-P DCBA P | BIN-NP DCBA N | Hamminga DCBkAlm |
---|---|---|---|
0 | 0000 0 | 0000 1 | 0000000 |
1 | 0001 1 | 0001 0 | 0000111 |
2 | 0010 1 | 0010 0 | 0011001 |
3 | 0011 0 | 0011 1 | 0011110 |
4 | 0100 1 | 0100 0 | 0101010 |
5 | 0101 0 | 0101 1 | 0101101 |
6 | 0110 0 | 0110 1 | 0110011 |
7 | 0111 1 | 0111 0 | 0110100 |
8 | 1000 1 | 1000 0 | 1001011 |
9 | 1001 0 | 1001 1 | 1001100 |
10 | 1010 0 | 1010 1 | 1010010 |
11 | 1011 1 | 1011 0 | 1010101 |
12 | 1100 0 | 1100 1 | 1100001 |
13 | 1101 1 | 1101 0 | 1100110 |
14 | 1110 1 | 1110 0 | 1111000 |
15 | 1111 0 | 1111 1 | 1111111 |
Kody BCD (Binary Coded Decimal) służą do dwójkowego zapisu cyfr dziesiętnych.
BCD8421 - podstawowy kod BCD, powszechnie stosowany. Jest to podzbiór 4-bitowego kodu binarnego w zakresie 0-9.
DEC | BCD 8421 | Aikena 2421 | Eccess3 DCBA | 1 z 10 9876543210 | 2 z 5 EDCBA | Johnsona EDCBA |
---|---|---|---|---|---|---|
0 | 0000 | 0000 | 0011 | 0000000001 | 00011 | 00000 |
1 | 0001 | 0001 | 0100 | 0000000010 | 00101 | 00001 |
2 | 0010 | 0010 | 0101 | 0000000100 | 01001 | 00011 |
3 | 0011 | 0011 | 0110 | 0000001000 | 10001 | 00111 |
4 | 0100 | 0100 | 0111 | 0000010000 | 00110 | 01111 |
5 | 0101 | 1011 | 1000 | 0000100000 | 01010 | 11111 |
6 | 0110 | 1100 | 1001 | 0001000000 | 10010 | 11110 |
7 | 0111 | 1101 | 1010 | 0010000000 | 01100 | 11100 |
8 | 1000 | 1110 | 1011 | 0100000000 | 10100 | 11000 |
9 | 1001 | 1111 | 1100 | 1000000000 | 11000 | 10000 |
Kody alfanumeryczne umożliwiają zapis liter (duże i małe), cyfr, znaków interpunkcyjnych, znaków specjalnych i innych, zawierają zwykle również zestaw kodów sterujących.
Obecnie stosowane kody pochodzą z kodu ASCII (ang. American Standard Code for Information Interchange). Jest to 7-bitowy kod przyporządkowujący liczby z zakresu 0-127 literom alfabetu angielskiego, cyfrom, znakom przestankowym i innym symbolom oraz poleceniom sterującym.
Ponieważ kod ASCII jest 7-bitowy, a większość komputerów operuje na 8-bitowych bajtach, dodatkowy bit wykorzystuje się na powiększenie zbioru kodowanych znaków. Powstało wiele różnych rozszerzeń ASCII wykorzystujących ósmy bit (np. norma ISO 8859, rozszerzenia firm IBM lub Microsoft), nazywanych stronami kodowymi. Również kodowanie UTF-8 można uważać za rozszerzenie ASCII, tutaj jednak dodatkowe znaki są kodowane na 2 i więcej bajtach.
DEC | HEX | kod | DEC | HEX | z | DEC | HEX | z | DEC | HEX | z | DEC | HEX | Win | DOS | DEC | HEX | Win | DEC | HEX | Win | DEC | HEX | Win | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | h | NUL | 32 | 20h | 64 | 40h | @ | 96 | 60h | ` | 128 | 80h | | Ç | 160 | A0h | 192 | C0h | À | 224 | E0h | à | |||||||||
1 | 01h | SOH | 33 | 21h | ! | 65 | 41h | A | 97 | 61h | a | 129 | 81h | | ü | 161 | A1h | ¡ | 193 | C1h | Á | 225 | E1h | á | |||||||
2 | 02h | STX | 34 | 22h | " | 66 | 42h | B | 98 | 62h | b | 130 | 82h | | é | 162 | A2h | ¢ | 194 | C2h | Â | 226 | E2h | â | |||||||
3 | 03h | ETX | 35 | 23h | # | 67 | 43h | C | 99 | 63h | c | 131 | 83h | | â | 163 | A3h | £ | 195 | C3h | Ã | 227 | E3h | ã | |||||||
4 | 04h | EOT | 36 | 24h | $ | 68 | 44h | D | 100 | 64h | d | 132 | 84h | | ä | 164 | A4h | ¤ | 196 | C4h | Ä | 228 | E4h | ä | |||||||
5 | 05h | ENQ | 37 | 25h | % | 69 | 45h | E | 101 | 65h | e | 133 | 85h | à | 165 | A5h | ¥ | 197 | C5h | Å | 229 | E5h | å | ||||||||
6 | 06h | ACK | 38 | 26h | & | 70 | 46h | F | 102 | 66h | f | 134 | 86h | | å | 166 | A6h | ¦ | 198 | C6h | Æ | 230 | E6h | æ | |||||||
7 | 07h | BEL | 39 | 27h | ' | 71 | 47h | G | 103 | 67h | g | 135 | 87h | | 167 | A7h | § | 199 | C7h | Ç | 231 | E7h | ç | ||||||||
8 | 08h | BS | 40 | 28h | ( | 72 | 48h | H | 104 | 68h | h | 136 | 88h | | 168 | A8h | ¨ | 200 | C8h | È | 232 | E8h | è | ||||||||
9 | 09h | HT | 41 | 29h | ) | 73 | 49h | I | 105 | 69h | i | 137 | 89h | | 169 | A9h | © | 201 | C9h | É | 233 | E9h | é | ||||||||
10 | 0Ah | LF | 42 | 2Ah | * | 74 | 4Ah | J | 106 | 6Ah | j | 138 | 8Ah | | 170 | AAh | ª | 202 | CAh | Ê | 234 | EAh | ê | ||||||||
11 | 0Bh | VT | 43 | 2Bh | + | 75 | 4Bh | K | 107 | 6Bh | k | 139 | 8Bh | | 171 | ABh | « | 203 | CBh | Ë | 235 | EBh | ë | ||||||||
12 | 0Ch | FF | 44 | 2Ch | , | 76 | 4Ch | L | 108 | 6Ch | l | 140 | 8Ch | | 172 | ACh | ¬ | 204 | CCh | Ì | 236 | ECh | ì | ||||||||
13 | 0Dh | CR | 45 | 2Dh | - | 77 | 4Dh | M | 109 | 6Dh | m | 141 | 8Dh | | 173 | ADh | | 205 | CDh | Í | 237 | EDh | í | ||||||||
14 | 0Eh | SO | 46 | 2Eh | . | 78 | 4Eh | N | 110 | 6Eh | n | 142 | 8Eh | | 174 | AEh | ® | 206 | CEh | Î | 238 | EEh | î | ||||||||
15 | 0Fh | SIL | 47 | 2Fh | / | 79 | 4Fh | O | 111 | 6Fh | o | 143 | 8Fh | | 175 | AFh | ¯ | 207 | CFh | Ï | 239 | EFh | ï | ||||||||
16 | 10h | DLE | 48 | 30h | 0 | 80 | 50h | P | 112 | 70h | p | 144 | 90h | | 176 | B0h | ° | 208 | D0h | Ð | 240 | F0h | ð | ||||||||
17 | 11h | DC1 | 49 | 31h | 1 | 81 | 51h | Q | 113 | 71h | q | 145 | 91h | | 177 | B1h | ± | 209 | D1h | Ñ | 241 | F1h | ñ | ||||||||
18 | 12h | DC2 | 50 | 32h | 2 | 82 | 52h | R | 114 | 72h | r | 146 | 92h | | 178 | B2h | ² | 210 | D2h | Ò | 242 | F2h | ò | ||||||||
19 | 13h | DC3 | 51 | 33h | 3 | 83 | 53h | S | 115 | 73h | s | 147 | 93h | | 179 | B3h | ³ | 211 | D3h | Ó | 243 | F3h | ó | ||||||||
20 | 14h | DC4 | 52 | 34h | 4 | 84 | 54h | T | 116 | 74h | t | 148 | 94h | | 180 | B4h | ´ | 212 | D4h | Ô | 244 | F4h | ô | ||||||||
21 | 15h | NAK | 53 | 35h | 5 | 85 | 55h | U | 117 | 75h | u | 149 | 95h | | 181 | B5h | µ | 213 | D5h | Õ | 245 | F5h | õ | ||||||||
22 | 16h | SYN | 54 | 36h | 6 | 86 | 56h | V | 118 | 76h | v | 150 | 96h | | 182 | B6h | ¶ | 214 | D6h | Ö | 246 | F6h | ö | ||||||||
23 | 17h | ETB | 55 | 37h | 7 | 87 | 57h | W | 119 | 77h | w | 151 | 97h | | 183 | B7h | · | 215 | D7h | × | 247 | F7h | ÷ | ||||||||
24 | 18h | CAN | 56 | 38h | 8 | 88 | 58h | X | 120 | 78h | x | 152 | 98h | | 184 | B8h | ¸ | 216 | D8h | Ø | 248 | F8h | ø | ||||||||
25 | 19h | EM | 57 | 39h | 9 | 89 | 59h | Y | 121 | 79h | y | 153 | 99h | | 185 | B9h | ¹ | 217 | D9h | Ù | 249 | F9h | ù | ||||||||
26 | 1Ah | SUB | 58 | 3Ah | : | 90 | 5Ah | Z | 122 | 7Ah | z | 154 | 9Ah | | 186 | BAh | º | 218 | DAh | Ú | 250 | FAh | ú | ||||||||
27 | 1Bh | ESC | 59 | 3Bh | ; | 91 | 5Bh | [ | 123 | 7Bh | { | 155 | 9Bh | | 187 | BBh | » | 219 | DBh | Û | 251 | FBh | û | ||||||||
28 | 1Ch | FS | 60 | 3Ch | < | 92 | 5Ch | \ | 124 | 7Ch | | | 156 | 9Ch | | 188 | BCh | ¼ | 220 | DCh | Ü | 252 | FCh | ü | ||||||||
29 | 1Dh | GS | 61 | 3Dh | = | 93 | 5Dh | ] | 125 | 7Dh | } | 157 | 9Dh | | 189 | BDh | ½ | 221 | DDh | Ý | 253 | FDh | ý | ||||||||
30 | 1Eh | RS | 62 | 3Eh | > | 94 | 5Eh | ^ | 126 | 7Eh | ~ | 158 | 9Eh | | 190 | BEh | ¾ | 222 | DEh | Þ | 254 | FEh | þ | ||||||||
31 | 1Fh | US | 63 | 3Fh | ? | 95 | 5Fh | _ | 127 | 7Fh | | 159 | 9Fh | | 191 | BFh | ¿ | 223 | DFh | ß | 255 | FFh | ÿ |
Kody podane niżej zwraca typowa klawiatura alfanumeryczna.
7 | scan DEC | scan HEX | Klawisz | podst | Shift | Ctrl |
---|---|---|---|---|---|---|
1 | 01h | Esc | 27 | 27 | 20 | (0-1) |
2 | 02h | 1 ! | 49 | 33 | 0-120 | |
3 | 03h | 2 @ | ||||
4 | 04h | 3 # | ||||
5 | 05h | 4 $ | ||||
6 | 06h | 5 % | ||||
7 | 07h | 6 ^ | ||||
8 | 08h | 7 & | ||||
9 | 09h | 8 * | ||||
10 | 0Ah | 9 ( | ||||
11 | 0Bh | 0 ) | ||||
12 | 0Ch | - _ | ||||
13 | 0Dh | = + | ||||
14 | 0Eh | BkSp | ||||
15 | 0Fh | Tab | ||||
16 | 10h | Q | ||||
17 | 11h | W | ||||
18 | 12h | E | ||||
19 | 13h | R | ||||
20 | 14h | T | ||||
21 | 15h | Y | ||||
22 | 16h | U | ||||
23 | 17h | I | ||||
24 | 18h | O | ||||
25 | 19h | P | ||||
26 | 1Ah | [ | ||||
27 | 1Bh | ] | ||||
28 | 1Ch | Enter | ||||
29 | 1Dh | Ctrl | ||||
30 | 1Eh | |||||
31 | 1Fh | |||||
32 | 20h | |||||
33 | 21h | |||||
34 | 22h | |||||
35 | 23h | |||||
36 | 24h | |||||
37 | 25h | |||||
38 | 26h | |||||
39 | 27h | |||||
40 | 28h | |||||
41 | 29h | |||||
42 | 2Ah | |||||
43 | 2Bh | |||||
44 | 2Ch | |||||
45 | 2Dh | |||||
46 | 2Eh | |||||
47 | 2Fh | |||||
48 | 30h | |||||
49 | 31h | |||||
50 | 32h | |||||
51 | 33h | |||||
52 | 34h | |||||
53 | 35h | |||||
54 | 36h | |||||
55 | 37h | |||||
56 | 38h | |||||
57 | 39h | |||||
58 | 3Ah | |||||
59 | 3Bh | |||||
60 | 3Ch | |||||
61 | 3Dh | |||||
62 | 3Eh | |||||
63 | 3Fh | |||||
64 | 40h | |||||
65 | 41h | |||||
66 | 42h | |||||
67 | 43h | |||||
68 | 44h | |||||
h | ||||||
h | ||||||
69 | 45h | |||||
70 | 46h | |||||
71 | 47h | |||||
72 | 48h | |||||
73 | 49h | |||||
74 | 4Ah | |||||
75 | 4Bh | |||||
76 | 4Ch | |||||
77 | 4Dh | |||||
78 | 4Eh | |||||
79 | 4Fh | |||||
80 | 50h | |||||
81 | 51h | |||||
82 | 52h | |||||
83 | 53h | |||||
84 | 54h |