# 1. Analog vs Digital Signal

### 1.1 Analog Signals

**Analog signals** are signals that are **continuous** — meaning their values can change smoothly without jumps, representing physical quantities from the real world such as temperature, light, sound, and pressure.

Characteristics of analog signals:

- Values can be **any real value** within a range.
- Sensitive to **noise** (electromagnetic interference, heat, etc.).
- Interact directly with the real world (sensors, microphones, photodiodes).

![image](https://hackmd.io/_uploads/HyeIE3OhWe.png)

### 1.2 Digital Signals

**Digital signals** are signals that are **discrete** — their values can only be in two conditions: HIGH (1) or LOW (0), usually in the form of a _square wave_.

Characteristics of digital signals:

- Only have **two values**: 0 and 1 (LOW and HIGH).
- Nearly **immune to noise**.
- Used in data transmission and processing within electronic devices.
- Use less energy.

![image](https://hackmd.io/_uploads/S1WdNhO2Zg.png)

### 1.3 Comparison of Analog and Digital

| Aspect | Analog Signal | Digital Signal |
| :--- | :--- | :--- |
| **Nature** | Continuous | Discrete |
| **Values** | All real values | 0 or 1 |
| **Noise Resistance** | Low | Very high |
| **Primary Use** | Sensors, real-world actuators | Data processing, computing |
| **Examples** | Microphone sound, LDR output, sensor temperature | Serial data, clock signals, PWM |
| **Energy Consumption** | Relatively larger | More efficient |

Both complement each other: analog signals capture real-world phenomena accurately, then are converted to digital so they can be processed by computers/microcontrollers.