Javatpoint Logo
Javatpoint Logo

ASCII Code

The ASCII stands for American Standard Code for Information Interchange. The ASCII code is an alphanumeric code used for data communication in digital computers. The ASCII is a 7-bit code capable of representing 27 or 128 number of different characters. The ASCII code is made up of a three-bit group, which is followed by a four-bit code.

ASCII Code
  • The ASCII Code is a 7 or 8-bit alphanumeric code.
  • This code can represent 127 unique characters.
  • The ASCII code starts from 00h to 7Fh. In this, the code from 00h to 1Fh is used for control characters, and the code from 20h to 7Fh is used for graphic symbols.
  • The 8-bit code holds ASCII, which supports 256 symbols where math and graphic symbols are added.
  • The range of the extended ASCII is 80h to FFh.

The ASCII characters are classified into the following groups:

ASCII Code

Control Characters

The non-printable characters used for sending commands to the PC or printer are known as control characters. We can set tabs, and line breaks functionality by this code. The control characters are based on telex technology. Nowadays, it's not so much popular in use. The character from 0 to 31 and 127 comes under control characters.

Special Characters

All printable characters that are neither numbers nor letters come under the special characters. These characters contain technical, punctuation, and mathematical characters with space also. The character from 32 to 47, 58 to 64, 91 to 96, and 123 to 126 comes under this category.

Numbers Characters

This category of ASCII code contains ten Arabic numerals from 0 to 9.

Letters Characters

In this category, two groups of letters are contained, i.e., the group of uppercase letters and the group of lowercase letters. The range from 65 to 90 and 97 to 122 comes under this category.

ASCII Table

The values are typically represented in ASCII code tables in decimal, binary, and hexadecimal form.

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

Example 1: (10010101100001111011011000011010100111000011011111101001 110111011101001000000011000101100100110011)2

Step 1: In the first step, we we make the groups of 7-bits because the ASCII code is 7 bit.

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

Step 2: Then, we find the equivalent decimal number of the binary digits either from the ASCII table or 64 32 16 8 4 2 1 scheme.

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

Step 3: Last, we find the equivalent symbol of the decimal number from the ASCII table.

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 Code: JavaTpoint@123






Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA