ASCII (American Standard Code for information interchange) is a computer coding system based on Latin letters. It is mainly used to display modern English and other Western European languages. It is the most common single-byte encoding system today and is equivalent to the international standard ISO/IEC 646. Directory [hidden] Character Set Brief History ASCII international problem extended ASCII Double Byte Character Set common ASCII code algorithms on the keyboard: American Standard Code for information interchange (ASCII) in a computer, all data is stored and computed in Binary Notation (because the computer uses high power and low power to represent 1 and 0 respectively). For example, 52 letters (including uppercase letters) such as A, B, C, and D, as well as numbers such as 0 and 1, and some common symbols (such as *, #, @, etc) when stored in a computer, the binary number is also used to represent the specific binary number used to represent which symbol, of course, everyone can agree on their own set (this is called encoding ), if you want to communicate with each other without confusion, you must use the same encoding rules. Therefore, the American Standardization Organization has introduced the so-called ASCII code, it specifies which binary numbers are used to represent the above commonly used symbols. The American Standard Information Exchange Code is a standard single-byte character encoding scheme developed by the American National Standard Institute (ANSI) for text-based data. Started in the late 1950s S and finalized in 1967. It was originally a US National Standard for different computers to use for mutual communication as a standard for Spanish character encoding. It has been used by the International Organization for Standardization (ISO) it is an international standard, known as the ISO 646 standard. Applies to all Latin characters. ASCII Code uses a combination of the specified 7-bit or 8-bit binary numbers to represent 128 or 256 possible characters. The standard ASCII code is also known as the basic ASCII code. It uses 7-bit binary numbers to indicate all uppercase and lowercase letters, numbers 0 to 9, and punctuation marks, and special control characters used in American English. Where: 0 ~ 31 and 127 (33 in total) are control characters or communication special characters (others can be displayed), such as control characters: LF (line feed), Cr (Press ENTER), FF (page feed) del (delete), BS (return), BEL (zhenling), etc. Special communication characters: Soh (Text header), EOT (Text tail), Ack (OK), etc; the ASCII values are 8, 9, 10, and 13, respectively, and are converted to backspace, tabulation, line feed, and carriage return characters. They do not display specific images, but vary with applications, with different effects on text display. 32 ~ 126 (95 characters in total) is a character (32 SP is a space), of which 48 ~ 57 is 0 to 9 10 Arabic numerals; 65 ~ 90 is 26 uppercase English letters, 97 ~ There are 26 lower-case English letters, and the remaining are some punctuation marks and operator numbers. In standard ASCII, the highest bit (B7) is used as the parity bit. The so-called parity check refers to a method used to check whether an error occurs during code transfer. It is generally divided into two types: Odd checksum and even verification. Odd check rules: correct code must contain an odd number of 1 bytes. If the number is not an odd number, 1 is added to the highest bit B7. Even check rules: correct code: the number of 1 in a byte must be an even number. If the number is not an even number, 1 is added to the highest bit of B7. The last 128 are extended ASCII codes. Currently, many x86-based systems support extended (or "high") ASCII codes. The expanded ASCII code allows 8th characters of each character to be used to determine the additional 128 special characters, foreign letters, and graphical symbols. The following is a standard ASCII table: Bin dec hex Abbreviation/character explanation 00000000 0 00 NUL (null) null character 00000001 1 01 Soh (start of handling) title start 00000010 2 02 STX (start of text) body start 00000011 3 03 etx (end of text) body end 00000100 4 04 EOT (end of transm-ission) transfer end 00000101 5 05 Enq (Enquiry) Request 00000110 6 06 ack (acknow-ledge) receive notification 00000111 7 07 bel (Bell) ring 00001000 8 08 BS (backsp-Ace) backspace 00001001 9 09 HT (horizon-tal tab) Horizontal tab 0000 1010 10 0a LF (NL line feed, new line) line feed key 00001011 11 0b vt (vertical tab) Vertical tab 00001100 12 0C ff (NP form feed, new page) page feed key 00001101 13 0d Cr (carriage return) Enter key 00001110 14 0e so (shift out) do not switch 00001111 15 0f Si (shift in) Enable switch 00010000 16 10 DLE (Data Link escape) data Link escape 00010001 17 11 DC1 (Device Control 1) Device Control 1 00010010 18 12 DC2 (Device Control 2) Device Control 2 00010011 19 13 DC3 (device Co Ntrol 3) Device Control 3 00010100 20 14 dc4 (Device Control 4) Device Control 4 00010101 21 15 Nak (negati-ve acknowl-edge) reject 00010110 22 16 Syn (synchr-onous idle) Synchronization idle 00010111 23 17 etb (end of trans. block) Transfer Block end 00011000 24 18 can (cancel) Cancel 00011001 25 19 EM (end of medium) Media interrupt 00011010 26 1A sub (substit-ute) slave 00011011 27 1B ESC (escape) overflow 00011100 28 1C FS (File separat-or) file delimiter 00011101 29 1D GS (gro Up separat-or) group character 00011110 30 1E RS (record separat-or) record separator 00011111 31 1f us (Unit separat-or) unit separator 00100000 32 20 space 00100001 33 21! 00100010 34 22 "00100011 35 23 #00100100 36 24 $00100101 37 25% 00100110 38 26 & 00100111 39 27 '00101000 40 28 (00101001 41 29) 00101010 42 2a * 00101011 43 2B + 00101100 44 2C, 00101101 45 2D-00101110 46 2E. 00101111 47 2f/00110000 48 30 0 continued table 00110001 49 31 1 00110010 50 32 2 00110011 51 33 3 00110100 52 34 4 00110101 53 35 5 00110110 54 36 6 00110111 55 37 7 00111000 56 38 001110 01 57 39 9 00111010 58 3A: 00111011 59 3B; 00111100 60 3C <00111101 61 3D = 00111110 62 3E> 00111111 63 3f? 01000000 64 40 @ 01000001 65 41 A 01000010 66 42 B 01000011 67 43 C 01000100 68 44 d 01000101 69 45 e 01000110 70 46 F 01000111 71 47g 01001000 72 48 h 01001001 73 49 I 01001010 74 4A J 01001011 75 4B K 01001100 76 4C l 01001101 77 4D M 01001110 78 4E n 01001111 79 4f o 01010000 80 50 p 01010001 81 51 Q 01010010 82 52 r 01010011 83 53 s 01010100 84 54 t 01010101 85 55 U 01010110 86 56 v 01010111 87 57 W 01011000 88 58x01011001 89 59 y 01011010 90 5A Z 01011011 91 5B [01011100 92 5C \ 01011101 93 5D] 01011110 94 5E ^ 01011111 95 5f _ 01100000 96 60' 01100001 97 61 A 01100010 98 62 B continued table 01100011 99 63 C 01100100 100 64 d 01100101 101 65 E 01100110 102 66 F 01100111 103 67g 01101000 104 68 h 01101001 69 I 105 01101010 6a j 01101011 107 6B K 01101100 108 6C l 01101101 109 6D M 01101 110 110 6e n 01101111 111 6f o 01110000 112 70 p 01110001 113 71 Q 01110010 114 72 R 01110011 73 S 115 01110100 74 t 116 01110101 75 U 117 01110110 76 V 118 77 W 01111000 120 78X01111001 121 79 y 01111010 7A Z 122 01111011 7b {123 01111100 7C | 124 01111101 7d} 125 01111110 126 7E ~ 01111111 127 7f del (delete) delete common ASCII code size rules: 0 ~ 9 <~ Z <~ Z 1) numbers are smaller than letters. For example, "7" <"F"; 2) the number 0 is smaller than the number 9, and increases sequentially from 0 to 9. For example, "3" <"8"; 3) the letter A is smaller than the letter Z and increases sequentially from A to Z. For example, "a" <"Z"; 4) uppercase letters of the same letter are 32 less than lowercase letters. For example, "a" <"". Remember the ASCII size of several common letters: "A" is 65, "A" is 97, and "0" is 48. In addition, there are 128-255 ASCII characters [edit this section] A Brief History of character sets before 6000 hieroglyphics before 3000 the alphabet 1838 to 1854 Samuel F. b. morse invented the telegraph, and each character in the alphabet corresponds to a series of short and long pulses from 1821 to 1824 Louis Braille invented Braille, 6-bit code, it encodes character, common letter combinations, common word and punctuation. A special escape Code indicates that subsequent character codes should be interpreted as uppercase letters. A special shift code allows subsequent code to be interpreted as numbers. In 1931, CCITT standardized telex code, including Baudot #2 code, all of which are five-bit code including characters and numbers. In the early 1890 s, the computer's QR code was extended to 8-bit ebcdic in 1960s from the Hollerith card, 6-bit binary code system bcdic (Binary-coded decimal interchange code: Binary-encoded decimal interchange code, standard for IBM large hosts-US Information Interchange Standard Code (ASCII: American Standard Code for information interchange) for 1967) there is a lot of controversy over whether the character length is 6, 7, or 8. From the reliability point of view, replacement characters should not be used, so ASCII cannot be 6-bit encoding, however, because of the cost, the 8-bit version scheme was also ruled out (at that time, the cost of each storage space was still very expensive ). In this way, the final escape Code contains 26 lower-case letters, 26 upper-case letters, 10 digits, 32 characters, 33 handles, and a space. A total of 128 escape codes are provided. ASCII is now recorded in the ANSI X3.4-1986 character set-the 7-bit American Standard Code for information exchange (7-bit ASCII: 7-bit American National Standard Code for information interchange ), released by the American National Standards Institute. The ASCII escape code shown in Figure 2-1 is similar to the format in the ANSI file. [Edit this section] ASCII international problem ASCII is an American standard, so it cannot meet the needs of other English-speaking countries. For example, where is the British pound symbol? The Latin alphabet uses Greek, Hebrew, Arabic, and Russian for the Slavic alphabet. Chinese hieroglyphics in the Chinese character system, Japan and North Korea. In 1967, the International Organization for Standardization (ISO: International Standards Organization) recommended an ASCII variant, code 0x40, 0x5b, 0x5c, 0x5d, 0x7b, 0x7c, and 0x7d are reserved for national use ", code 0x5e, 0x60, and 0x7e are marked as "other graphical symbols can be used when special characters in China require 8, 9, or 10 space locations ". This is obviously not the best international solution because it does not guarantee consistency. However, this shows how people try their best to code different languages. [Edit this section] extended ASCII 1981 ibm pc rom256 Character Set, known as the "ANSI character set ", complies with the ANSI draft and ISO Standards (ANSI/ISO 8859-1-1987, simple "Latin 1 ". Original Version of the ANSI character set: April 1987 code page 437, character's Image Code, appearing in MS-DOS 3.3 [edit this section] dubyte Character Set dubyte character set (DBCS: double-byte character set ), solve the compatibility between Chinese, Japanese, and Korean text characters and ASCII. DBCS starts from code 256, just like ASCII. Like any well-performing code page, the first 128 codes were ASCII. However, some of the higher 128 codes always follow the second byte. These two bytes together (called the first byte and the following byte) define a character, usually a complex pictogram. [Edit this section] common ASCII code for the keyboard ESC key vk_escape (27) Enter key: vk_return (13) tab key: vk_tab (9) Caps Lock key: vk_capital (20) Shift key: vk_shift (16) ctrl key: vk_control (17) Alt key: vk_menu (18) Space key: vk_space (32) Return key: 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) direction key (Direction ): Vk_left (37) direction key (Direction): vk_up (38) direction key (→): vk_right (39) direction key (Direction): vk_down (40) F1: 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 (48) keypad 1: vk_numpad0 (49) keypad 2: vk_numpad0 (50) keypad 3: vk_numpad0 (51) Keypad 4: vk_numpad0 (52) keypad 5: vk_numpad0 (53) keypad 6: vk_numpad0 (54) keypad 7: vk_numpad0 (55) keypad 8: vk_numpad0 (56) keypad 9: vk_numpad0 (57) keypad.: vk_decimal (46) keypad *: vk_multiply (42) keypad +: vk_add (43) keypad-: vk_subtract (45) keypad/: vk_divide (47) pause break key: vk_pause (19) scroll Lock key: vk_scroll (145) [edit this segment] ASCII code algorithm: A is defined as 01000001 in ASCII, that is, decimal 65, with this standard, when we enter a, the computer can use the ASCII code to know that the binary encoding of the entered characters is 01000001. Without such a standard, we must find a way to tell the computer that we have entered a; without such a standard, we need to recode on another machine to tell the computer that we want to input. The ASCII code is binary instead of decimal. Just in decimal format, for example, in ASCII code, the binary code of A is 01000001. If it is 65 in decimal format, it is 41 h in hexadecimal format.
Reference: http://baike.baidu.com/view/15482.htm? Fr = ala0_1_1