19/12/2025, 13:55 Program flow control
ASCII Code Range
0 – 127 → Total 128 characters
Uses 7 bits
ASCII Code Categories
1. Control Characters (0–31 and 127)
Used to control devices, not printable.
Code Character Meaning
7 BEL Beep
8 BS Backspace
9 TAB Horizontal tab
10 LF New line
13 CR Carriage return
127 DEL Delete
2. Digits (0–9)
Character ASCII
0 48
1 49
5 53
9 57
📌 Formula:
java
[Link] 15/19
19/12/2025, 13:55 Program flow control
Copy code
ASCII of digit = 48 + digit
3. Uppercase Letters (A–Z)
Character ASCII
A 65
B 66
Z 90
📌 Formula:
arduino
ASCII of uppercase letter = 65 + position − 1
Copy code
4. Lowercase Letters (a–z)
Character ASCII
a 97
b 98
z 122
📌 Formula:
arduino
ASCII of lowercase letter = 97 + position − 1
Copy code
5. Special Characters
Character ASCII
Space 32
[Link] 16/19
19/12/2025, 13:55 Program flow control
Character ASCII
! 33
@ 64
# 35
$ 36
Important ASCII Relationships (Very Important for Exams)
Relationship Example
A < a 65 < 97
Uppercase & lowercase difference a - A = 32
Digits before letters 9 (57) < A (65)
ASCII in Python
ord() → Character to ASCII
python
print(ord('A'))
print(ord('a'))
print(ord('0'))
Copy code
Output
65
97
48
Copy code
[Link] 17/19
19/12/2025, 13:55 Program flow control
chr() → ASCII to Character
python
print(chr(65))
print(chr(97))
print(chr(48))
Copy code
Output
css
A
a
0
Copy code
ASCII and Comparison in Python
python
print('A' < 'a')
print('9' < 'A')
Copy code
Output
graphql
True
True
Copy code
📌 Comparison is based on ASCII values
ASCII vs Unicode (1-line difference)
ASCII Unicode
128 characters 1,000,000+ characters
English only All languages
[Link] 18/19
19/12/2025, 13:55 Program flow control
ASCII Unicode
7-bit Variable length
One-line Exam Answers ⭐
ASCII stands for American Standard Code for Information Interchange.
It uses 7 bits and supports 128 characters.
ASCII assigns numeric values to characters.
If you want, I can also provide:
ASCII table PDF
MCQs & PYQs
Short notes for revision
Binary–ASCII conversion
Difference between ASCII, Unicode, UTF-8
Just tell me 👍
Is this conversation helpful so far?
[Link] 19/19