L
LLLOS.ai
Learn
L

Ask Your Tutor · Computer Science

How does a computer convert letters and numbers into bits and bytes?

General knowledge In depth Asked by Anonymous 22 Oct 2026, 8:41 AM IST Updated

In one line

A computer changes letters and numbers into bits and bytes using special codes called encoding, like ASCII or Unicode.

ASCII — Character encoding standard
ASCII — Character encoding standard
ASCII table: shows how each letter or number gets a unique code.
Image: Wikipedia
Unicode — Character encoding standard
Unicode — Character encoding standard
Unicode: the modern standard that covers all world languages and emojis.
Image: Wikipedia

The rule

Computers use encoding schemes to represent letters, numbers, and symbols as patterns of bits (0s and 1s).

For example, in ASCII: A = 01000001 (in 8 bits).

Let's understand it simply

Imagine you want to send a secret message to your friend using only yes (1) and no (0) signals. You both agree that 1 means 'yes' and 0 means 'no'. But what if you want to send the letter 'A'? You need a rule, like 'A' = 01000001. This is what computers do. They use a codebook to change every letter or number into a set of 0s and 1s. These 0s and 1s are called bits (short for binary digits). Eight bits together make a byte. So, every letter or number you type is stored as a pattern of bits inside the computer.

Bits vs Bytes
BitByte
What is it?Smallest unit (0 or 1)8 bits together
Example0 or 101000001 (for 'A')
StorageVery smallEnough for one letter (in ASCII)

How it works

  1. You type a letter or number on the keyboard (for example, 'A' or '5').
  2. The computer looks up the code for that character in its encoding table (like ASCII or Unicode).
  3. It finds the matching binary code (e.g., 'A' = 01000001).
  4. This binary code is stored in the computer's memory as bits (0s and 1s).
  5. When you want to see it again, the computer reads the bits and changes them back to the letter or number using the same codebook.
How a letter becomes bits
  1. Type a letter (e.g., 'A')
  2. Look up its code (ASCII: 65)
  3. Convert 65 to binary (01000001)
  4. Store as 8 bits in memory

The story behind it

Long ago, computers could only understand electrical signals: ON (1) and OFF (0). People needed a way to represent letters and numbers using just these two signals. In the 1960s, a code called ASCII (American Standard Code for Information Interchange) was created. It gave every letter, number, and symbol a unique 7- or 8-bit code. Later, as computers spread worldwide, Unicode was made to include letters from all languages, emojis, and more. This made it possible for computers to handle Hindi, Tamil, Chinese, and every other script.

Where you see it in real life

  • Sending a WhatsApp message: When you type 'Namaste', each letter is turned into bits using Unicode, sent over the internet, and shown as letters on your friend's phone.
  • Saving a contact's name: Your phone stores the name as a series of bytes, so it can show it later.
  • ATM PIN entry: When you type numbers, the ATM converts them into bits to check if they match your PIN.
  • Barcode scanners in shops: The numbers in a barcode are read as bits, then shown as numbers on the screen.
  • Digital clocks: The numbers you see are stored and processed as bits inside the clock's chip.
  • Typing in Hindi on a computer: Each Hindi letter is converted into a unique code (in Unicode), then into bits.

Why it matters

  • Communication: Computers can talk to each other only using bits and bytes, so encoding is the bridge between human language and computer language.
  • Data storage: All your files—text, photos, songs—are stored as bits. Knowing this helps you understand file sizes (KB, MB, GB).
  • Programming: When you write code, you often need to convert between letters, numbers, and bits.
  • Cybersecurity: Passwords and messages are encrypted as bits, so hackers can't read them easily.

Worked example

Let's see how the letter 'B' and the number '5' are converted into bits using ASCII:

Given: Letter = 'B', Number = '5'
Step 1: Look up ASCII code for 'B'      'B' = 66
Step 2: Convert 66 to binary            66 = 01000010
Step 3: Look up ASCII code for '5'      '5' = 53
Step 4: Convert 53 to binary            53 = 00110101
Step 5: Store these as bits             'B' = 01000010, '5' = 00110101

Common mistakes

  • Thinking computers store letters directly: They only store 0s and 1s, never the actual letter shapes.
  • Confusing bits and bytes: 1 byte = 8 bits. Every letter or number usually takes 1 byte (in ASCII).
  • Assuming all languages use the same code: ASCII is for English; Unicode is needed for Hindi, Tamil, etc.
  • Forgetting that numbers and letters are stored differently: The number '5' (as a digit) and the value 5 (as a number) have different codes.

Remember it

Every letter and number you see on a screen is really just a pattern of 0s and 1s inside the computer.

Check yourself

What is the binary code for the letter 'C' in ASCII?

01000011, because 'C' is 67 in ASCII and 67 in binary is 01000011.

Why do computers use codes like ASCII and Unicode?

Because computers can only store 0s and 1s, so codes are needed to represent letters and numbers as bits.

How many bits make up a byte?

8 bits make 1 byte.

What is the difference between ASCII and Unicode?

ASCII is for English characters; Unicode covers all world languages and symbols.

Quick recap

  • Computers use encoding schemes like ASCII and Unicode to turn letters and numbers into bits.
  • A bit is a 0 or 1; a byte is 8 bits.
  • Every character you type is stored as a unique pattern of bits.
  • ASCII is for English; Unicode covers all languages and symbols.
  • Bits and bytes are the real language of computers.
Written by the LLOS.ai tutor. Asked by Anonymous on 22 Oct 2026, 8:41 AM IST