📜  数字电子学中的ASCII代码

📅  最后修改于: 2020-12-30 04:26:11             🧑  作者: Mango

ASCII码

ASCII代表美国信息交换标准代码。 ASCII码是用于数字计算机中数据通信的字母数字代码。 ASCII是一个7位代码,能够表示2 7或128个不同字符。 ASCII代码由一个三位组组成,后跟一个四位代码。

  • ASCII码是7或8位的字母数字代码。
  • 此代码可以表示127个唯一字符。
  • ASCII码从00h到7Fh开始。在这种情况下,从00h到1Fh的代码用于控制字符,而从20h到7Fh的代码用于图形符号。
  • 8位代码包含ASCII,它支持256个符号,其中添加了数学和图形符号。
  • 扩展ASCII的范围是80h至FFh。

ASCII字符分为以下几类:

控制字符

用于向PC或打印机发送命令的不可打印字符称为控制字符。我们可以通过此代码设置制表符和换行功能。控制字符基于电传技术。如今,它的使用并不那么流行。从0到31和127字符来得到控制字符。

特殊字符

所有既不是数字也不是字母的可打印字符都位于特殊字符之下。这些字符包含带空格的技术,标点和数学字符。从32到47、58到64、91到96和123到126的字符属于此类别。

数字字符

此类ASCII代码包含从0到9的十个阿拉伯数字。

字母字符

在此类别中,包含两组字母,即,大写字母组和小写字母组。从65到90和97到122的范围属于此类别。

ASCII表

这些值通常在ASCII码表中以十进制,二进制和十六进制形式表示。

Binary Hexadecimal Decimal ASCII Symbol Description Group
0000000 0 0 NUL The null character encourage the device to do nothing Control Character
0000001 1 1 SOH The symbol SOH(Starts of heading) Initiates the header. Control Character
0000010 2 2 STX The symbol STX(Start of Text) ends the header and marks the beginning of a message. Control Character
0000011 3 3 ETX The symbol ETX(End of Text) indicates the end of the message. Control Character
0000100 4 4 EOT The EOT(end of text) symbol marks the end of a completes transmission Control Character
0000101 5 5 ENQ The ENQ(Enquiry) symbol is a request that requires a response Control Character
0000110 6 6 ACK The ACK(Acknowledge) symbol is a positive answer to the request. Control Character
0000111 7 7 BEL The BEL(Bell) symbol triggers a beep. Control Character
0001000 8 8 BS Lets the cursor move back one step (Backspace) Control Character
0001001 9 9 TAB (HT) A horizontal tab that moves the cursor within a row to the next predefined position (Horizontal Tab) Control Character
0001010 A 10 LF Causes the cursor to jump to the next line (Line Feed) Control Character
0001011 B 11 VT The vertical tab lets the cursor jump to a predefined line (Vertical Tab) Control Character
0001100 C 12 FF Requests a page break (Form Feed) Control Character
0001101 D 13 CR Moves the cursor back to the first position of the line (Carriage Return) Control Character
0001110 E 14 SO Switches to a special presentation (Shift Out) Control Character
0001111 F 15 SI Switches the display back to the normal state (Shift In) Control Character
0010000 10 16 DLE Changes the meaning of the following characters (Data Link Escape) Control Character
0010001 11 17 DC1 Control characters assigned depending on the device used (Device Control) Control Character
0010010 12 18 DC2 Control characters assigned depending on the device used (Device Control) Control Character
0010011 13 19 DC3 Control characters assigned depending on the device used (Device Control) Control Character
0010100 14 20 DC4 Control characters assigned depending on the device used (Device Control) Control Character
0010101 15 21 NAK The negative response to a request (Negative Acknowledge) Control Character
0010110 16 22 SYN Synchronizes a data transfer, even if no signals are transmitted (Synchronous Idle) Control Character
0010111 17 23 ETB Marks the end of a transmission block (End of Transmission Block) Control Character
0011000 18 24 CAN Makes it clear that transmission was faulty and the data must be discarded (Cancel) Control Character
0011001 19 25 EM Indicates the end of the storage medium (End of Medium) Control Character
0011010 1A 26 SUB Replacement for a faulty sign (Substitute) Control Character
0011011 1B 27 ESC Initiates an escape sequence and thus gives the following characters a special meaning (Escape) Control Character
0011100 1C 28 FS File separator. Control Character
0011101 1D 29 GS Group separator. Control Character
0011110 1E 30 RS Record separator. Control Character
0011111 1F 31 US Unit separator. Control Character
0100000 20 32 SP Blank space Special Character
0100001 21 33 ! Exclamation mark Special Character
0100010 22 34 Only quotes above Special Character
0100011 23 35 # Pound sign Special Character
0100100 24 36 $ Dollar sign Special Character
0100101 25 37 % Percentage sign Special Character
0100110 26 38 & Commercial and Special Character
0100111 27 39 Apostrophe Special Character
0101000 28 40 ( Left bracket Special Character
0101001 29 41 ) Right bracket Special Character
0101010 2A 42 * Asterisk Special Character
0101011 2B 43 + Plus symbol Special Character
0101100 2C 44 , Comma Special Character
0101101 2D 45 Dash Special Character
0101110 2E 46 . Full stop Special Character
0101111 2F 47 / Forward slash Special Character
0110000 30 48 0 Numbers
0110001 31 49 1 Numbers
0110010 32 50 2 Numbers
0110011 33 51 3 Numbers
0110100 34 52 4 Numbers
0110101 35 53 5 Numbers
0110110 36 54 6 Numbers
0110111 37 55 7 Numbers
0111000 38 56 8 Numbers
0111001 39 57 9 Numbers
0111010 3A 58 : Colon Special characters
0111011 3B 59 ; Semicolon Special characters
0111100 3C 60 < Small than bracket Special characters
0111101 3D 61 = Equals sign Special characters
0111110 3E 62 > Bigger than symbol Special characters
0111111 3F 63 ? Question mark Special characters
1000000 40 64 @ At symbol Special characters
1000001 41 65 A Capital letters
1000010 42 66 B Capital letters
1000011 43 67 C Capital letters
1000100 44 68 D Capital letters
1000101 45 69 E Capital letters
1000110 46 70 F Capital letters
1000111 47 71 G Capital letters
1001000 48 72 H Capital letters
1001001 49 73 I Capital letters
1001010 4A 74 J Capital letters
1001011 4B 75 K Capital letters
1001100 4C 76 L Capital letters
1001101 4D 77 M Capital letters
1001110 4E 78 N Capital letters
1001111 4F 79 O Capital letters
1010000 50 80 P Capital letters
1010001 51 81 Q Capital letters
1010010 52 82 R Capital letters
1010011 53 83 S Capital letters
1010100 54 84 T Capital letters
1010101 55 85 U Capital letters
1010110 56 86 V Capital letters
1010111 57 87 W Capital letters
1011000 58 88 X Capital letters
1011001 59 89 Y Capital letters
1011010 5A 90 Z Capital letters
1011011 5B 91 [ Left square bracket Special character
1011100 5C 92 \ Inverse/backward slash Special character
1011101 5D 93 ] Right square bracket Special character
1011110 5E 94 ^ Circumflex Special character
1011111 5F 95 _ Underscore Special character
1100000 60 96 ` Gravis (backtick) Special character
1100001 61 97 A Lowercase letters
1100010 62 98 B Lowercase letters
1100011 63 99 C Lowercase letters
1100100 64 100 D Lowercase letters
1100101 65 101 E Lowercase letters
1100110 66 102 F Lowercase letters
1100111 67 103 G Lowercase letters
1101000 68 104 H Lowercase letters
1101001 69 105 I Lowercase letters
1101010 6A 106 J Lowercase letters
1101011 6B 107 K Lowercase letters
1101100 6C 108 L Lowercase letters
1101101 6D 109 M Lowercase letters
1101110 6E 110 N Lowercase letters
1101111 6F 111 O Lowercase letters
1110000 70 112 P Lowercase letters
1110001 71 113 Q Lowercase letters
1110010 72 114 R Lowercase letters
1110011 73 115 S Lowercase letters
1110100 74 116 T Lowercase letters
1110101 75 117 U Lowercase letters
1110110 76 118 v Lowercase letters
1110111 77 119 w Lowercase letters
1111000 78 120 x Lowercase letters
1111001 79 121 y Lowercase letters
1111010 7A 122 z Lowercase letters
1111011 7B 123 { Left curly bracket Special characters
1111100 7C 124 l Vertical line Special characters
1111101 7D 125 } Right curly brackets Special characters
1111110 7E 126 ~ Tilde Special characters
1111111 7F 127 DEL The DEL(Delete) symbol deletes a character. This is a control character that consists of the same number in all positions. Control characters

示例1:(10010101100001111011011000011010100111000011011111101001 110111011101001000000011000101100100110011)2

步骤1:第一步,我们将7位分组,因为ASCII码是7位。

1001010 1100001 1110110 1100001 1010100 1110000 1101111 1101001 1101110 1110100 1000000 0110001 0110010 0110011

步骤2:然后,我们从ASCII表或64 32 16 8 4 2 1方案中找到二进制数字的等效十进制数。

Binary Decimal
64 32 16 8 4 2 1
1   0   0   1 0 1 0
64+8+2=74
64 32 16 8 4 2 1
1    1   0   0 0 0 1
64+32+1=94
64 32 16 8 4 2 1
1   1   1   0 1 1 0
64+32+16+4+2=118
64 32 16 8 4 2 1
1   1   0   0 0 0 1
64+32+1=97
64 32 16 8 4 2 1
1   0   1   0 1 0 0
64+16+4=84
64 32 16 8 4 2 1
1   1   1   0 0 0 0
64+32+16=112
64 32 16 8 4 2 1
1   1   0   1 1 1 1
64+32+8+4+2+1=111
64 32 16 8 4 2 1
1   1   0   1 0 0 1
64+32+8+1=105
64 32 16 8 4 2 1
1   1   0   1 1 1 0
64+32+8+4+2=110
64 32 16 8 4 2 1
1   1   1   0 1 0 0
64+32+16+4=116
64 32 16 8 4 2 1
1   0   0   0 0 0 0
64
64 32 16 8 4 2 1
0   1   1   0 0 0 1
32+16+1=49
64 32 16 8 4 2 1
0   1   1   0 0 1 0
32+16+2=50
64 32 16 8 4 2 1
0   1   1   0 0 1 1
32+16+2+1=51

步骤3:最后,我们从ASCII表中找到十进制数字的等效符号。

Decimal Symbol
74 J
94 a
118 v
97 a
84 T
112 p
111 o
105 i
110 n
116 t
64 @
49 1
50 2
51 3

ASCII码: JavaTpoint @ 123