ASCII Code table

Source: Internet
Author: User
Tags control characters

ASCII, American Standard Code for information interchange reads like "Aspen Key," which defines the English letters or the same results and meanings that are represented by 128 numbers from 0 to 127. Since only 7 bits (bit) are used to represent numbers from 0 to 127, most computers use 8 bits to access a character set (character set), so numbers from 128 to 255 can be used to represent another set of 128 symbols, called extended Ascii.
ASCII code Keyboard ASCII Code Keyboard ASCII code Keyboard ASCII Code Keyboard
27 Esc 32 SPACE 33 ! 34 "
35 # 36 $ 37 % 38 &
39 40 ( 41 ) 42 *
43 + 44 45 - 46 .
47 / 48 0 49 1 50 2
51 3 52 4 53 5 54 6
55 7 56 8 57 9 58 :
59 ; 60 < 61 = 62 >
63 ? 64 @ 65 A 66 B
67 C 68 D 69 E 70 F
71 G 72 H 73 I 74 J
75 K 76 L 77 M 78 N
79 O 80 P 81 Q 82 R
83 S 84 T 85 U 86 V
87 W 88 X 89 Y 90 Z
91 [ 92 \ 93 ] 94 ^
95 _ 96 ` 97 A 98 B
99 C 100 D 101 E 102 F
103 G 104 H 105 I 106 J
107 K 108 L 109 M 110 N
111 O 112 P 113 Q 114 R
115 S 116 T 117 U 118 V
119 W 120 X 121 Y 122 Z
123 { 124 | 125 } 126 ~

The most widely used character set and its encoding in the current computer are ASCII codes developed by the United States National Standards Agency (ANSI) (American Standard Code for information interchange, US Standards Information Interchange Code), It has been established as an international standard by the International Organization for Standardization (ISO), known as ISO 646. Applies to all Latin letters, ASCII code has 7-bit code and 8-bit code two forms.

Because 1-bit binary numbers can represent (21=) 2 states: 0, 1, while the 2-bit binary number can represent (22) = 4 states: 00, 01, 10, 11, and so on, 7-bit binary number can represent (27=) 128 states, each State is uniquely compiled into a 7-bit binary code, corresponding to a character (or control code), these codes can be arranged into a decimal ordinal 0~127. Therefore, the 7-bit ASCII code is encoded with a seven-bit binary number, which can represent 128 characters.

No. 0 to 32nd and 127th (total 34) are control characters or communication-specific characters, such as: LF (line feed), CR (carriage return), FF (page feed), DEL (delete), BEL (ringing), etc.; Communication special characters: SOH (Wen tou), EOT (end), ACK (confirmation), etc.

33rd to 126th (a total of 94) is a character, of which 48th to 57th is 0~9 10 Arabic numerals; 65~90 is 26 uppercase English letters, 97~122 is 26 lowercase English letters, the remainder is some punctuation marks, arithmetic symbols, etc.

Note: In the computer's storage unit, an ASCII value occupies one byte (8 bits) and its highest bit (B7) is used as the parity bit. The so-called parity check, refers to the code in the process used to verify whether there is a method of error, the general sub-parity check and parity two. Odd check rules: The correct code in one byte of the number of 1 must be odd, if not odd, the highest bit B7 Tim 1; Parity rule: The correct code in a byte of 1 must be an even number, if not even, the highest bit B7 add 1.

Report:

ASCII table

ASCII value Control characters ASCII value Control characters ASCII value Control characters ASCII value Control characters
0 NUT 32 (space) 64 @ 96
1 SOH 33 65 A 97 A
2 STX 34 66 B 98 B
3 ETX 35 # 67 C 99 C
4 EOT 36 $ 68 D 100 D
5 ENQ 37 % 69 E 101 E
6 Ack 38 & 70 F 102 F
7 BEL 39 , 71 G 103 G
8 Bs 40 ( 72 H 104 H
9 HT 41 ) 73 I 105 I
10 LF 42 * 74 J 106 J
11 Vt 43 + 75 K 107 K
12 Ff 44 , 76 L 108 L
13 CR 45 - 77 M 109 M
14 So 46 . 78 N 110 N
15 SI 47 / 79 O 111 O
16 DLE 48 0 80 P 112 P
17 Dci 49 1 81 Q 113 Q
18 DC2 50 2 82 R 114 R
19 DC3 51 3 83 X 115 S
20 DC4 52 4 84 T 116 T
21st NAK 53 5 85 U 117 U
22 Syn 54 6 86 V 118 V
23 TB 55 7 87 W 119 W
24 CAN 56 8 88 X 120 X
25 Em 57 9 89 Y 121 Y
26 SUB 58 : 90 Z 122 Z
27 Esc 59 ; 91 [ 123 {
28 Fs 60 < 92 \ 124 |
29 Gs 61 = 93 ] 125 }
30 Rs 62 > 94 ^ 126 ~
31 US 63 ? 95 127 Del

NUL VT Vertical Tabulation SYN-Idling synchronization
SOH Title starts FF Paper Control ETB Message Group Delivery end
STX Body Start CR return CAN void
ETX Body End So shift output EM paper to do
EOY Transfer End SI Shift Input SUB replacement
ENQ Inquiry character DLE spaces ESC Exchange Code
ACK admits DC1 Device Control 1 FS literal delimiter
BEL Alarm DC2 Device Control 2 GS Group Separator
BS Back one grid DC3 Device Control 3 RS Record delimiter
HT Landscape List DC4 Device Control 4 US Cell delimiter
LF line break NAK negation DEL Delete

Keyboard commonly used ASCII code
ESC key Vk_escape (27)
Enter: Vk_return (13)
TAB Key: Vk_tab (9)
Caps Lock key: Vk_capital (20)
SHIFT Key: Vk_shift ($ $)
CTRL key: Vk_control (17)
ALT key: Vk_menu (18)
Space bar: Vk_space ($20/32)
BACKSPACE: Vk_back (8)
Left logo key: Vk_lwin (91)
Right logo key: Vk_lwin (92)
Right mouse shortcut key: Vk_apps (93)

INSERT Key: Vk_insert (45)
HOME Key: Vk_home (36)
Page Up:vk_prior (33)
Pagedown:vk_next (34)
END Key: Vk_end (35)
DELETE Key: Vk_delete (46)

Arrow keys (←): Vk_left (37)
Arrow keys (↑): Vk_up (38)
direction keys (→): vk_right (39)
Arrow keys (↓): Vk_down (40)

F1 key: vk_f1 (112)
F2 key: Vk_f2 (113)
F3 key: Vk_f3 (114)
F4 key: Vk_f4 (115)
F5 key: Vk_f5 (116)
F6 key: Vk_f6 (117)
F7 key: Vk_f7 (118)
F8 key: Vk_f8 (119)
F9 Key: Vk_f9 (120)
F10 Key: VK_F10 (121)
F11 Key: vk_f11 (122)
F12 key: Vk_f12 (123)

NUM LOCK key: Vk_numlock (144)
Keypad 0:VK_NUMPAD0 (96)
Keypad 1:VK_NUMPAD0 (97)
Keypad 2:VK_NUMPAD0 (98)
Keypad 3:VK_NUMPAD0 (99)
Keypad 4:vk_numpad0 (100)
Keypad 5:VK_NUMPAD0 (101)
Keypad 6:VK_NUMPAD0 (102)
Keypad 7:VK_NUMPAD0 (103)
Keypad 8:VK_NUMPAD0 (104)
Keypad 9:VK_NUMPAD0 (105)
Keypad.: Vk_decimal (110)
Numpad *: vk_multiply (106)
Keypad +: vk_multiply (107)
Numpad-: vk_subtract (109)
Numpad/: Vk_divide (111)

Pause Break key: Vk_pause (19)
Scroll Lock key: Vk_scroll (145)

ASCII Code table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.