Welcome to Information Coding Systems!

Hello there! In this chapter, we are going to explore how computers actually understand the things we type, like the letter 'A' or the number '5'. Since computers only really speak the language of binary (0s and 1s), we need a special "secret code" system to translate our world into theirs. This is what Information Coding Systems are all about!

Don't worry if this seems a bit abstract at first. By the end of these notes, you'll see that it's just like using a decoder ring from a cereal box. Let's dive in!

1. Character vs. Pure Binary: The Digit Dilemma

One of the first things to understand is that a computer sees the number 5 in two very different ways depending on how it's being used.

Pure Binary Representation

When you want to do math (like 5 + 2), the computer uses pure binary. The decimal number 5 is stored simply as its binary equivalent: \( 101_{2} \). It treats this as a numerical value.

Character Code Representation

When you type "5" in a text message or a Word document, the computer doesn't see it as a "value" to add or subtract. It sees it as a symbol or a shape to draw on the screen. To do this, it uses a character code (like ASCII). For example, in ASCII, the character '5' is actually represented by the binary code \( 00110101 \).

The Analogy: Imagine the number 10. If it's on a football jersey, it’s a character (a label). If it’s the number of goals scored, it’s a pure binary value (a quantity).

Common Mistake to Avoid: Don't assume that the binary for the character '1' is just \( 00000001 \). Characters have their own unique "index" codes in a table that are different from their mathematical values!

Quick Review:
Pure Binary: Used for calculations and quantities.
Character Code: Used for displaying text and symbols.

2. ASCII and Unicode: The World's Alphabets

How do we decide which binary pattern stands for which letter? We use coding systems. The two most important ones you need to know are ASCII and Unicode.

ASCII (American Standard Code for Information Interchange)

ASCII was the original "gold standard." It uses 7 bits to represent characters.
• With 7 bits, you can have \( 2^{7} = 128 \) different characters.
• This is enough for the English alphabet (capitals and lowercase), numbers, and basic punctuation.

Unicode

As the internet went global, 128 characters weren't enough. What about Chinese, Arabic, or even Emojis? Unicode was introduced to solve this.
• Unicode uses a much larger number of bits (often 16 or 32 bits).
• It can represent over 1 million different characters!
Did you know? The first 128 codes in Unicode are exactly the same as ASCII. This makes Unicode "backwards compatible."

Why was Unicode introduced?
ASCII was too limited. It couldn't represent all the languages of the world or the vast array of symbols we use today. Unicode provides a universal standard so that a message sent from Tokyo looks the same when opened in London.

Memory Aid:
ASCII = American (Limited)
Unicode = Universal (Huge!)

Key Takeaway: ASCII is small and efficient for English, but Unicode is necessary for a global, multi-lingual digital world.

3. Error Checking and Correction

When data is sent across a network (like over Wi-Fi), sometimes a 1 accidentally flips to a 0 because of electrical interference. We need ways to spot these mistakes!

Parity Bits

A parity bit is an extra bit added to the end of a binary string to make the total number of 1s either Even or Odd.

How it works (Even Parity):
1. Count the 1s in your data.
2. If you have \( 1011001 \), there are four 1s (which is even).
3. To keep it even, the parity bit is 0. Total: \( 10110010 \).
4. If you have \( 1011000 \), there are three 1s (odd). To make it even, the parity bit is 1. Total: \( 10110001 \).

If the receiver gets a byte with an odd number of 1s in an "Even Parity" system, it knows an error occurred!

Majority Voting

This is a clever way to not just detect an error, but fix it too.
Instead of sending each bit once, the computer sends it three times.
Example: To send a '1', the computer sends '1 1 1'.
• If the receiver gets '1 0 1', it sees that the majority is '1' and assumes the '0' was an error. It automatically corrects the bit to '1'.

Check Digits

You see these every day on barcodes and ISBN numbers on books. A check digit is a final number calculated from all the previous digits using a specific mathematical formula.
When a scanner reads a barcode, it re-calculates the formula. If its answer doesn't match the check digit on the label, it beeps to tell the cashier the scan failed.

Common Mistake: Students often think Parity Bits can fix errors. They can't! They only detect that something is wrong. Only Majority Voting in this list can actually correct the error on the fly.

Quick Review Box:
Parity Bit: Adds a bit to make the count of 1s Even or Odd. Detects single-bit errors.
Majority Voting: Sends data multiple times. Detects AND corrects errors.
Check Digit: A calculated value at the end of a string (like a barcode) to verify the data is correct.

Summary: The Big Picture

In this chapter, we've learned that computers are essentially massive translation machines. They use binary to store values, ASCII/Unicode to turn those values into the text we read, and error checking (like parity and majority voting) to make sure that translation doesn't get corrupted as it moves around the world. Keep practicing those parity bit calculations, and you'll have this mastered in no time!