Table of Contents
ToggleWhat is ASCII?
ASCII is a character encoding standard developed in the 1960s. It assigns numeric values from 0-127 to represent English characters, including the ASCII VALUE OF A TO Z in uppercase and lowercase forms. Originating from earlier telegraph codes, ASCII was designed to represent 128 different characters, encompassing letters, numbers, punctuation marks, and control characters.
What’s the full form of ASCII?
The full form of ASCII is “American Standard Code for Information Interchange.” It is a character encoding standard used for representing text and control characters in computers and other devices that use text. ASCII assigns a unique numeric value to each character, allowing computers to understand and display text characters.
ASCII Value of A to Z
The ASCII values for uppercase letters ‘A’ to ‘Z’ range from 65 to 90, while the ASCII values for lowercase letters ‘a’ to ‘z’ range from 97 to 122.
Here are the ASCII value of A to Z :
Uppercase | ASCII Value | Lowercase | ASCII Value |
---|---|---|---|
A | 65 | a | 97 |
B | 66 | b | 98 |
C | 67 | c | 99 |
D | 68 | d | 100 |
E | 69 | e | 101 |
F | 70 | f | 102 |
G | 71 | g | 103 |
H | 72 | h | 104 |
I | 73 | i | 105 |
J | 74 | j | 106 |
K | 75 | k | 107 |
L | 76 | l | 108 |
M | 77 | m | 109 |
N | 78 | n | 110 |
O | 79 | o | 111 |
P | 80 | p | 112 |
Q | 81 | q | 113 |
R | 82 | r | 114 |
S | 83 | s | 115 |
T | 84 | t | 116 |
U | 85 | u | 117 |
V | 86 | v | 118 |
W | 87 | w | 119 |
X | 88 | x | 120 |
Y | 89 | y | 121 |
Z | 90 | z | 122 |
As shown, ASCII value of A to Z (uppercase)is from 65 to 90 and ascii value of a to z(lower case) is from 97 to 122.
What is the ASCII value of 0 to 9?
The ASCII values for digits ‘0’ to ‘9’ range from 48 to 57.
The ASCII value of 0 to 9 is:
Digit | ASCII Value |
---|---|
0 | 48 |
1 | 49 |
2 | 50 |
3 | 51 |
4 | 52 |
5 | 53 |
6 | 54 |
7 | 55 |
8 | 56 |
9 | 57 |
As shown, ASCII value of 0 to 9 number is from 48 to 57
What is the ASCII Value Of Special Characters?
Special Character | ASCII Value |
---|---|
Space | 32 |
! | 33 |
“ | 34 |
# | 35 |
$ | 36 |
% | 37 |
& | 38 |
‘ | 39 |
( | 40 |
) | 41 |
* | 42 |
+ | 43 |
, | 44 |
– | 45 |
. | 46 |
/ | 47 |
: | 58 |
; | 59 |
< | 60 |
= | 61 |
> | 62 |
? | 63 |
@ | 64 |
As Shown ASCII Value Of Special Characters ranges from 32 to 64.
What’s the Difference Between ASCII and Unicode?
ASCII | Unicode | |
---|---|---|
Overview | ASCII uses 7 bits to represent 128 characters. It covers English letters, numbers, punctuation and control codes. | Unicode uses 21 bits to represent over 100,000 characters covering most global scripts. |
Pros | – Backward compatible with ASCII – Ubiquitous encoding – Simple and compact 7-bit code | – Covers almost all languages and symbols – Cross-platform and universal – Flexible 32-bit encoding |
Cons | – Limited to English characters – No support for international text | – More complex variable width encoding – Not backward compatible with ASCII |
Use Cases | – English language text – Communication protocols – Basic data interchange | – International/multilingual text – Complex writing systems – Modern software and web apps |
ASCII only covers English while Unicode supports global text. ASCII is simpler while Unicode is more flexible. ASCII is suitable for basic English data while Unicode handles complex multilingual text.
How ASCII is Used in Programming
ASCII plays a fundamental role in most programming languages that deal with text data. Languages like C, Java, Python etc use ASCII values to represent characters internally. This enables common encoding of English letters, digits and symbols used in source code.
String manipulation functions rely on ASCII values to process textual data. Programming languages define their own native string types, but ASCII provides the reference mapping to numeric codes. Output text streams and files also use ASCII encoding to render human-readable contents.
So while languages build their own abstractions, ASCII serves as the foundational layer that enables working with textual data in a standard way across different systems.
ASCII in Python
Python uses ASCII extensively for representing, processing and transmitting textual data. Here are some examples of how ASCII is used in Python:
- Character literals – Characters in Python source code are encoded using ASCII values:
# ascii value of A char = 'A' # ASCII 65
- ord() function – Returns ASCII value of a character:
# ord() function print(ord('A')) # 65
- chr() function – Returns character for an ASCII value:
# chr() function print(chr(65)) # 'A'
- String operations – Functions like upper(), lower(), isalpha() rely on ASCII values:
# String operations print('a'.upper()) # 'A' print('A'.lower()) # 'a'
- File I/O – Text files use ASCII encoding by default for reading and writing:
# File I/O operations with open('file.txt','w') as f: f.write('Hello') # ASCII encoding
- Networking – Protocols like HTTP use ASCII for communication and data transfer.
ASCII in Java
ASCII in java has various use cases like:
- Character Encoding – Java uses UTF-16 encoding which is compatible with ASCII for code points 0-127.
- char Data Type – The char data type in Java uses 16-bit Unicode encoding to represent ASCII characters.
- String Class – Strings use UTF-16 encoding but can be converted to ASCII using getBytes(“ASCII”).
- Character Methods – Methods like Character.isLetter(), Character.getNumericValue() rely on ASCII values.
- I/O Streams – Byte streams use ASCII encoding by default for reading/writing text.
- Networking – Protocols like HTTP that use ASCII can be implemented in Java.
- Third Party Libraries – Apache Commons has implementations for ASCII-based encoding like Hex, Base64.
ASCII in C++
- Char Data Type – The char data type in C++ is defined as 1 byte which matches the 7-bit size of ASCII characters.
- Character Literals – Characters in C++ source code files are stored using ASCII encoding. For example ASCII value of small a is 97.
- Standard Library – Functions like isalpha(), isdigit(), toupper() etc in cctype header use ASCII values.
- I/O Operations – Text input/output streams by default use ASCII encoding for reading and writing files.
- C-style Strings – Null-terminated strings defined as char arrays contain ASCII encoded characters.
- STL Strings – Though std::string uses wider encodings, it can be converted to ASCII using c_str().
- Networking – Socket programming uses ASCII for communication over protocols like HTTP and SMTP.
- Third Party Libraries – Libraries like OpenSSL leverage ASCII for encoding schemes like Base64
Common Applications of ASCII Codes
Here are some real-world applications where ASCII is commonly used:
- Web Applications – HTTP protocol uses ASCII for communication between browsers and servers. HTTP headers and HTML documents contain ASCII text.
- Network Devices – Routers, switches and other network devices use ASCII control codes for management and configuration.
- Legacy Systems – Older legacy systems designed before Unicode rely on ASCII for data storage and exchange.
- Embedded Systems – Microcontrollers and other memory constrained devices use compact ASCII encoding.
- Data Transmission – Communication protocols like SMTP for email rely on ASCII for transmitting data between servers.
- Data Storage – Plain text file formats like CSV and TXT store data encoded in ASCII characters.
- Command Line Tools – Most command line programs and scripts accept input and display output using ASCII.
- Barcodes and QR Codes – Some barcode formats use ASCII values to store data. QR codes can contain ASCII text.
- Documentation – Readme files, code comments and other documentation involve extensive use of ASCII text.
Conclusion
- ASCII assigns numeric values from 0 to 127 for standard characters.
- Ascii value of A to Z have sequential ASCII values from 65 to 90.
- The binary values represent the decimal ASCII values in 7-bit form.
- ASCII encoding allows textual data to be stored and communicated digitally.
- Learning ASCII values empowers you to work with encoded character data.
Even in the age of Unicode, ASCII remains highly relevant. It provides compatibility with legacy systems and protocols. ASCII’s first 127 codes are universal across different encodings. Knowledge of ASCII enables manipulating text at the fundamental level. It establishes baseline for more complex abstractions. ASCII’s simplicity and ubiquity cement its continued importance in computing and programming.
This guide provided those key ASCII value of A To Z in an easy to reference format.Try out our free resume checker service where our Industry Experts will help you by providing resume score based on the key criteria that recruiters and hiring managers are looking for.
Additional Resources
Books on ASCII and Character Encoding
- “ASCII: The Character Set That Changed Computing” by Manfred Klein – Traces the history and impact of ASCII code on computing. A good overview.
- “Understanding ASCII Code” by David Brailsford – Concise handbook covering ASCII in detail along with implementation examples.
- “The Unicode Standard” – Technical reference published by Unicode Consortium documenting the Unicode standard.
- “Unicode Explained” by Jukka K. Korpela – A thorough guide explaining the need for Unicode and how it builds upon ASCII.
ASCII Converters and Calculators
- Online ASCII converters – There are many free online sites like ascii.cl or ascii-code.com that allow you to easily convert text to ASCII codes and vice versa. These can be useful for quick conversions
- CLI tools like xxd – Linux/Unix systems come with command line tools like xxd that can convert between ASCII and hex representations. Useful for manipulation via scripts/automation.
- ASCII tables – Simple text/HTML tables with ASCII codes and characters listed can be handy quick references for looking up ASCII values. Several are available online.
- bc calculator – The bc calculator command in Linux/Unix provides an arbitrary precision numeric processing language that can do many math calculations from the command line using ASCII digit characters.
- awk/sed – These Unix text processing programs can parse and manipulate ASCII text in powerful ways. Useful for batch editing/conversion of ASCII data.
FAQ Related To ASCII
What is ascii code table?
The ASCII code table is a character encoding standard that assigns unique decimal values from 0 to 127 for letters, numbers, punctuation marks, and other characters.
What has an ASCII value of 9?
The ASCII value of 9 represents the horizontal tab character. It is used to advance the cursor to the next tab stop, typically at every multiple of 8 spaces. In many programming languages and text editors, the horizontal tab character is used to create indentation or to separate content in a visually organized manner.
What is the 4 character code?
A 4 character code, also sometimes referred to as a 4CC, is a 4 byte alphanumeric code used to identify data formats, codecs, interfaces, and other components in computing and programming.
It is a unique 4 byte identifier used mainly to recognise data formats and components in programming. The short length makes them easy to embed within files and protocols. Understanding how to identify and use 4CCs is useful for multimedia and system programming.
What is the 4 character code?
The ASCII character encoding standard assigns integer values from 0 to 127 to represent text characters. The space character, represented as ‘ ‘, is assigned the decimal number 32 in the ASCII table.