Welcome to the World of Signals!

Ever wondered how your voice travels from your phone to a friend's across the country? Or how a vinyl record sounds different from a Spotify stream? It all comes down to analogue and digital signals. In this chapter, we are going to explore how we take "real-world" information and turn it into the 1s and 0s that computers love. Don't worry if this seems a bit "techy" at first—we'll break it down step-by-step!

1. Analogue vs. Digital: The Big Picture

Before we dive into the electronics, let's understand the two ways information can exist.

Analogue Signals

An analogue signal is continuous. It can take any value within a range. Think of a slide on a playground—you can be at any height as you slide down.
Example: A traditional mercury thermometer. The mercury rises smoothly, and it could technically be 20.1°C, 20.11°C, or 20.1115°C.

Digital Signals

A digital signal is discrete. It consists of stepped values, usually just two levels: High (on) and Low (off). Think of a staircase—you are either on one step or the next; you can't hover in between.
Example: A digital clock. It jumps from 12:01 to 12:02. There is no "in-between" displayed.

Quick Review:
Analogue: Continuous (the "Real World").
Digital: Steps/Levels (the "Computer World").

2. Bits and Bytes

Computers speak a language called binary.
• A Bit (short for Binary Digit) is the smallest unit of information. It is either a 1 or a 0.
• A Byte is a group of 8 bits.
Memory Aid: Think of 8 small "bits" of food making one big "byte" (bite)!

Did you know? Even though computers use millions of bits, you only need to know binary numbers from 1 to 10 for this course!
1 = 0001
2 = 0010
3 = 0011
4 = 0100
...and so on.

3. Analogue-to-Digital Conversion (ADC)

How do we turn a beautiful, curvy analogue sound wave into a jagged digital signal? We use an Analogue-to-Digital Converter (ADC). This process involves a few key steps:

Step 1: Sampling

We can't record every single moment of an analogue wave, so we take "snapshots" of its voltage at regular intervals. This is called sampling.

Step 2: Sampling Rate

The sampling rate is how many snapshots we take per second (measured in Hertz, Hz).
Analogy: Imagine a flip-book animation. If you only draw 2 pictures per second, the movement looks jerky. If you draw 60 pictures per second, it looks perfectly smooth!

Step 3: Quantisation

Each sample's voltage is rounded to the nearest available digital level. This "rounding" is called quantisation.
The number of levels available depends on the number of bits per sample.
• If you use 1 bit, you only have 2 levels (0 or 1).
• If you use 2 bits, you have 4 levels (\(2^2\)).
• If you use 3 bits, you have 8 levels (\(2^3\)).

Key Takeaway: Quality of Conversion

To get a high-quality digital signal that sounds or looks like the original:
1. Increase the Sampling Rate: Take more snapshots per second.
2. Increase the Number of Bits per Sample: Have more levels to choose from so the "rounding error" is smaller.

4. Why Go Digital? (Advantages and Disadvantages)

Most modern technology is digital. Here is why:

Advantages

Noise Immunity: This is the biggest plus! In an analogue signal, noise (random interference) gets added to the wave and stays there. In digital, as long as we can tell the difference between a "high" and a "low," we can perfectly regenerate the original signal.
Processing: Digital data can be easily encrypted, compressed, and stored.
Data Capacity: We can send much more information down the same wire using digital techniques.

Disadvantages

Quantisation Error: Because we are "rounding" the values, we lose a tiny bit of the original detail.
Bandwidth: Digital signals often require a higher bandwidth to transmit the same information as analogue.

Common Mistake to Avoid: Don't say digital signals "don't have noise." They do pick up noise, but we can remove it more easily because we only care if the signal is a 1 or a 0.

5. Dealing with Noise: Regeneration

Imagine a digital signal sent down a long, messy wire. By the time it reaches the end, the "1s" might look like 4.2V instead of 5V, and the "0s" might look like 0.8V instead of 0V.
A regenerator circuit looks at the messy signal and says:
"4.2V is closer to High than Low, so I'll make it a perfect 5V again."
This process is called recovery of original data. Analogue signals cannot be recovered this way because every "bump" in the wave could be part of the actual music or just noise—there's no way to know!

6. Pulse Code Modulation (PCM)

Pulse Code Modulation is the fancy name for the standard method of converting analogue data into digital form. It basically follows the steps we discussed: Sample -> Quantise -> Encode into binary. It is used in everything from your telephone calls to the audio on a Blu-ray disc.

7. Sensors and the Real World

Electronics often start with a sensor. Most sensors collect analogue data because the physical world is analogue.
LDR (Light Dependent Resistor): Collects analogue light levels.
Thermistor: Collects analogue temperature levels.
Microphone: Collects analogue sound pressure.

We then use an ADC to turn that sensor data into something a computer or microcontroller can understand.

Quick Review Box

Key Terms to Remember:
Bit: A single 0 or 1.
Sampling Rate: Snapshots per second. Higher = better quality.
Quantisation: Assigning a numerical value to a sample. More bits = more levels = less error.
Regeneration: Cleaning up a noisy digital signal to make it perfect again.
Noise: Unwanted interference that affects signals.

Don't worry if this feels like a lot of definitions! The most important thing is to understand the "Why"—we go digital because it's reliable and noise-resistant, even if the "rounding" (quantisation) makes it a tiny bit less perfect than a pure analogue wave.