# Number of ascii characters

### Why can 7-bit ascii represent 128 characters?

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

The 0th to 32nd and 127th (total 34) are control characters or communication-specific characters, such as control characters: LF (line feed), CR (Carriage Return), FF (Page Feed), DEL (Delete), BEL (Ringing), etc.; communication-specific characters: SOH (header), EOT (end of text), ACK (Acknowledgement), etc.

The 33rd to 126th (total 94) are characters. 94) are characters, of which No. 48 to 57 are 0 to 9 ten Arabic numerals; No. 65 to 90 are 26 uppercase English letters, No. 97 to 122 are 26 lowercase English letters, and the rest are some punctuation marks, arithmetic symbols and so on.

Note: In the computer’s memory unit, an ASCII value accounts for one byte (8 binary bits), and its highest bit (b7) is used as the parity bit. The so-called parity check is a method used to check for errors in the code transmission process, generally divided into two types of odd and even checksums. Odd parity: the correct code in a byte of the number of 1 must be odd, if not odd, in the highest bit b7 add 1; even parity: the correct code in a byte of the number of 1 must be even, if not even, in the highest bit b7 add 1.

27ESC32SPACE33!34″

35#36\$37%38&

39’ESC32SPACE33!

39’40(41)42*

43+44’45-46.

47/480491502

513524535546

55756857958:

59;60<61=62>

63? 64@65A66B

67C68D69E70F

71G72H73I74J

75K76L77M78N

79O80P81Q82R

83S84T85U86V

87W88X89Y90Z

91[92\93]94^

95_96`97a98b

99c100d101e102f

103g104h105i106j

107k108l109m110n

111o112p113q114r

115s116t117u118v

119w120x121y122z

123126~