ASCII, Unicode and Character Encoding

ASCII, Unicode and Character Encoding. Foundational Computer Awareness explanations, examples and explained practice questions for banking and recruitment exam preparation.

By Akhilesh Saini

What you will learn

  • Why text requires a way to represent characters as digital values.
  • What ASCII represents and why it is called a 7-bit character code.
  • How Unicode supports writing systems beyond basic English text.
  • The difference between a Unicode code point and an encoding such as UTF-8.

Why this topic matters

An exam may ask the full form of ASCII, the number of bits in standard ASCII, or which text standard supports multiple languages. A practical issue is equally important: if a customer's name is entered in Hindi or another script, an application needs a compatible character encoding to save and display it correctly.

Computers must encode text

People read characters such as A, 7, ? or ₹. Computers store and transmit bytes. A character encoding provides rules for representing text as stored/transmitted units. It is helpful to distinguish three ideas:

  1. The character is a textual symbol or element, such as the letter A.
  2. A character code / code point is an assigned numeric identifier for that character within a coded character set.
  3. An encoding form specifies how a code point becomes one or more units (often bytes) for storage or exchange.

At a foundational level, remember that a numeral such as the character "7" is not the same as the numeric value 7. In a text field, "7" is a character that must be encoded; in arithmetic, 7 is a number on which calculations are performed.

ASCII: American Standard Code for Information Interchange

ASCII stands for American Standard Code for Information Interchange. Standard ASCII defines a 7-bit set of 128 code values (0–127). These include English letters, digits, punctuation, spacing and control codes such as carriage return and line feed.

ExampleStandard ASCII decimal codePurpose
A65Uppercase letter
a97Lowercase letter
048Digit character zero
Space32Blank separator

Important distinction: Standard ASCII is a 7-bit code. It is often carried in 8-bit bytes, which does not make its standard character repertoire a 256-symbol set. Various historical 8-bit encodings were informally called “extended ASCII,” but there is no single universal extension of ASCII.

The fact that ASCII codes for 0–9 occupy decimal values 48–57 does not mean that the text character "5" stores the arithmetic integer 5 directly as the value 5.

Why ASCII is not enough for worldwide text

Standard ASCII has no direct representation for ordinary Hindi letters, Arabic writing, many accented letters, or emoji. Indian-language interfaces, multilingual documents and international data exchange need a much larger and more consistent character repertoire.

Unicode: character identities across languages

Unicode is a standard for assigning code points to characters used in many languages and symbol systems. A Unicode code point is commonly written in U+ notation, followed by hexadecimal digits. For example:

CharacterUnicode code pointNote
AU+0041Latin capital letter A
अU+0905Devanagari letter A
₹U+20B9Indian rupee sign

Unicode is more than a font; it provides a shared identification scheme for characters. Displaying text still depends on software that interprets the encoding and fonts that contain suitable glyphs. Some visible symbols or emoji are represented by multiple Unicode code points, so a displayed character is not always a single code point.

UTF-8, UTF-16 and UTF-32 are encoding forms

A code point must be represented as bytes or other code units. Unicode defines encoding forms, including UTF-8, UTF-16 and UTF-32. UTF stands for Unicode Transformation Format.

EncodingSimple awareness-level description
UTF-8Variable-length representation using 1 to 4 bytes per encoded Unicode code point
UTF-16Uses one or two 16-bit code units for a Unicode code point
UTF-32Uses one 32-bit code unit per Unicode code point

UTF-8 is common in web pages and text files. The basic ASCII characters retain the same one-byte values under UTF-8, which makes UTF-8 ASCII-compatible for those characters.

Worked example — Two characters, different storage lengths:

  • The character A is Unicode U+0041 and UTF-8 stores it as the single byte 41 (hexadecimal).
  • The rupee symbol ₹ is Unicode U+20B9; its UTF-8 representation uses three bytes: E2 82 B9 (hexadecimal).

The character's code point is not the same thing as its stored UTF-8 byte sequence. You do not need to memorize all byte values for recruitment-exam awareness; the conceptual distinction matters more.

A is U+0041 and one UTF-8 byte, whereas the rupee sign is U+20B9 and three UTF-8 bytes.
Character, code point and UTF-8 bytes

What is text-encoding corruption?

If text bytes are decoded using the wrong encoding, the displayed result can contain strange characters or replacement symbols. This problem is often called mojibake (garbled text). It is not necessarily caused by a missing font; incorrect decoding and missing glyphs are different issues.

For example, if a system saves a Hindi customer's name using UTF-8 and another system reads those bytes using an incompatible legacy encoding, the result may be unreadable. The solution is to agree on a compatible encoding and apply it consistently, not merely rename the file.

Character code versus a font

A code point identifies a character in the text standard; a font supplies visual shapes (glyphs) used to draw text. Two fonts can display the same code point differently. A system may correctly store a character but be unable to render it in a particular font. Unicode does not guarantee that every device has every glyph installed.

Important terms

TermMeaning
ASCIIHistorical 7-bit code for basic Latin letters, digits, punctuation and controls
UnicodeStandard that identifies characters with code points across many scripts
Code pointNumeric identifier for a character (for example, U+0041)
EncodingRules for mapping characters/code points into stored units
UTF-8Widely used variable-length Unicode encoding based on bytes
GlyphThe rendered visual form of a character or part of text
MojibakeGarbled text caused by incompatible interpretation of encoded data

Common confusions and exam traps

  • ASCII is not a complete worldwide character standard. Its standard 7-bit code has only 128 values.
  • Unicode is not necessarily “16 bits per character.” That is an outdated oversimplification and confuses Unicode with particular encodings.
  • UTF-8 is not the same as Unicode: Unicode assigns code points; UTF-8 represents them as bytes.
  • One code point is not always one visible user-perceived character. Many accents and emoji sequences combine multiple code points.
  • Encoding is not encryption. Encoding allows representation and interpretation; encryption protects confidentiality.
  • Font and encoding problems are not identical. Missing glyphs and misdecoded bytes require different fixes.

Objective-exam facts to remember

Exam clueAnswer
ASCII full formAmerican Standard Code for Information Interchange
Standard ASCII bit-width7 bits
Standard ASCII code count128
Standard ASCII code for uppercase ADecimal 65
International/multilingual character standardUnicode
U+ followed by hex digitsUnicode code-point notation
UTF expansionUnicode Transformation Format
UTF-8 bytes for each code point1 to 4

Quick revision

  1. Characters need an agreed digital representation to be stored and transmitted.
  2. ASCII has 128 values encoded with seven bits.
  3. Unicode provides code points for many scripts, including Devanagari.
  4. UTF-8 encodes Unicode code points using one to four bytes.
  5. Decoding bytes with the wrong encoding can produce garbled text.

Practice questions — CA-04-03

1. What does ASCII stand for?
A. American Standard Code for Information Interchange
B. Advanced System Code for Internal Instruction
C. Automated Symbol Conversion and Internet Interface
D. Application Standard Character Input Interface

2. How many bits define a standard ASCII code value?
A. 4
B. 7
C. 16
D. 32

3. How many distinct code values are available in standard 7-bit ASCII?
A. 64
B. 100
C. 128
D. 256

4. Which standard is designed to identify characters across many world languages?
A. MIDI
B. JPEG
C. ASCII alone
D. Unicode

5. What does U+20B9 identify?
A. A filename extension
B. A Unicode code point
C. A CPU instruction
D. An Internet protocol

6. UTF-8 uses how many bytes for an encoded Unicode code point?
A. Exactly 1
B. Exactly 2
C. 1 to 4
D. Always 8

7. Which statement about UTF-8 and ASCII is correct?
A. UTF-8 cannot represent ASCII characters
B. Basic ASCII characters retain the same one-byte values in UTF-8
C. ASCII can directly encode all emoji
D. UTF-8 always needs four bytes for English letters

8. In standard ASCII, the decimal code for uppercase A is:
A. 32
B. 48
C. 65
D. 97

9. What is a glyph?
A. A numerical code for binary ten
B. The visible shape used to render character text
C. A hard-disk storage sector
D. A gate truth table

10. What is the most accurate statement about Unicode and fonts?
A. Unicode automatically installs every font
B. A font determines whether an ASCII code has seven bits
C. Unicode code points and font glyphs serve different roles
D. Unicode is a kind of printer hardware

11. What is a likely result when UTF-8 bytes are decoded using an incompatible text encoding?
A. Guaranteed encryption
B. Faster network speed
C. Garbled characters
D. Automatic image compression

12. Which statement about the character "7" and numeric value 7 is correct?
A. They must always have identical internal representation
B. One is textual data; the other is a numerical value for arithmetic
C. Both are necessarily JPEG images
D. Neither can be stored by a computer

Answers and explanations — CA-04-03

QCorrect answerWhy it is correct
1A. American Standard Code for Information InterchangeThis is the recognized expansion of ASCII.
2B. 7Seven bits provide 128 possible standard ASCII values.
3C. 1282⁷ = 128; standard ASCII values run from 0 through 127.
4D. UnicodeUnicode assigns character identifiers across many writing systems.
5B. Unicode code pointU+ introduces a Unicode code point expressed using hexadecimal.
6C. 1 to 4UTF-8 is variable-length and can require one, two, three or four bytes.
7B. ASCII values remain compatibleThe 128 basic ASCII characters have the same byte values in UTF-8.
8C. 65Standard ASCII assigns decimal code 65 to uppercase A.
9B. Visible shapeA glyph is the drawn form used to display text in a font.
10C. Different rolesUnicode identifies characters; fonts provide renderable glyph shapes.
11C. Garbled charactersIncorrect decoding can misinterpret bytes and corrupt the displayed text.
12B. Text versus numerical valueThe digit character has an encoding, whereas arithmetic operates on a number.