An embedded system is a computer system designed to perform a dedicated function (or a small set of functions) within a larger mechanical or electrical device.
It is “embedded” because the hardware and software are built into the host product and are usually invisible to the end‑user. Embedded systems are required when a device must operate autonomously, reliably, and often in real‑time while meeting strict constraints on cost, size, power consumption, and durability.
All digital computers, including embedded ones, store and manipulate data in binary form. The following representations are essential for the Cambridge International AS & A Level Computer Science syllabus.
| Representation | Key Points | Typical Use in Embedded Systems |
|---|---|---|
| Binary, Octal, Hexadecimal | Base‑2, base‑8 and base‑16 notations; easy conversion using groups of 3 or 4 bits. | Memory addresses, register contents, low‑level debugging. |
| BCD (Binary‑Coded Decimal) | Each decimal digit encoded in 4‑bit nibble; simplifies conversion to human‑readable numbers. | Display drivers for digital clocks, calculators. |
| ASCII / Unicode | Standard codes for characters; ASCII uses 7‑bits, Unicode extends to 16‑ or 32‑bits. | Textual user interfaces, serial communication of commands. |
| Two’s‑Complement Integer | Represents signed integers; range –2n‑1 … 2n‑1‑1 for n‑bit word; overflow detection. | Arithmetic in control algorithms, sensor data processing. |
| Floating‑Point (IEEE‑754) | Sign, exponent, mantissa; supports very large/small real numbers; single (32‑bit) and double (64‑bit) precision. | Complex calculations in navigation, signal processing, AI inference. |
| Compression (Lossless & Lossy) | Lossless – RLE, Huffman (exact reconstruction). Lossy – JPEG, MP3 (approximate reconstruction). | Storing sensor logs (lossless) or image/video streams (lossy) on limited flash. |
Worked Example – Binary ↔ Decimal conversion
Binary 1101 1010₂ = (1·2⁷)+(1·2⁶)+(0·2⁵)+(1·2⁴)+(1·2³)+(0·2²)+(1·2¹)+(0·2⁰)
= 128+64+0+16+8+0+2+0 = 218₁₀
This section expands the earlier hardware overview to cover the internal workings of a processor, which are required knowledge for the Cambridge syllabus.
| Component | Role in an Embedded System |
|---|---|
| CPU (Microcontroller) | Executes the control program; contains on‑chip registers, ALU, and often SRAM/Flash. |
| Main Memory (RAM) | Temporary storage for variables, stack, and runtime data. |
| Secondary (Removable) Storage | Holds large firmware images, data logs, or user‑upgradable applications (e.g., SD card, USB flash). |
| Input Devices (Sensors) | Convert physical quantities (temperature, light, motion, etc.) into electrical signals readable by the CPU. |
| Output Devices (Actuators) | Convert CPU commands into physical actions (motors, valves, LEDs, speakers). |
| Peripheral Interfaces | UART, SPI, I²C, CAN, Ethernet, ADC/DAC, timers – provide specialised I/O and timing services. |
| Power Supply | Batteries, mains adapters, or energy‑harvesting circuits; includes regulation to provide stable voltages. |
| Real‑Time Operating System (RTOS) – optional | Manages deterministic task scheduling, interrupt handling and timing services. |
| Memory Type | Volatility | Typical Speed | Typical Use in Embedded Systems |
|---|---|---|---|
| RAM (Random‑Access Memory) | Volatile – loses data when power is removed | Fast (nanoseconds) | Run‑time data, stack, variables |
| ROM (Read‑Only Memory) | Non‑volatile | Slow to moderate (technology‑dependent) | Store firmware that never changes |
| SRAM (Static RAM) | Volatile | Very fast, no refresh required | On‑chip cache, small internal RAM |
| DRAM (Dynamic RAM) | Volatile | Fast but requires periodic refresh | External main memory in larger embedded boards |
| PROM / EPROM / EEPROM / Flash | Non‑volatile | Slower than RAM; EEPROM/Flash can be rewritten | Program storage, configuration data, boot code |
A buffer is a temporary storage area that holds data while it is transferred between two components that operate at different speeds or use different protocols. Buffers prevent data loss, smooth timing mismatches and allow the CPU to continue processing while I/O devices complete their operations.

Example: A thermostat reads a temperature sensor, compares it with the user‑set temperature, drives a heating element, and then re‑reads the temperature to maintain the set point.
Secondary storage provides non‑volatile space that can be added or replaced after manufacture. In embedded systems it is used for:
Modern embedded devices increasingly communicate with each other or with cloud services. The following concepts satisfy the Cambridge syllabus.
| Concept | Key Points | Typical Embedded Example |
|---|---|---|
| LAN, WAN, Internet, Cloud | LAN – local area network (e.g., Ethernet within a factory). WAN – wide area network (e.g., cellular). Cloud – remote servers offering storage/computation. | Smart‑meter sending usage data to a utility’s cloud platform. |
| Network Topologies | Bus, Star, Mesh, Hybrid – illustrated with simple diagrams. | Star topology for a home automation hub (central controller ↔ sensors). |
| OSI / TCP‑IP Model | 7‑layer OSI (Physical → Application) and 4‑layer TCP‑IP (Link → Application). Key protocols: HTTP, FTP, SMTP, TCP, UDP, ICMP. | UART → Ethernet PHY (Physical) → IP (Network) → UDP (Transport) → Custom binary protocol (Application). |
| IP Addressing & Subnetting | IPv4 – 32‑bit dotted decimal; IPv6 – 128‑bit hex groups. Subnet mask determines network vs. host portion. | Device configured with 192.168.1.45/24 on a home LAN. |
| DNS (Domain Name System) | Translates human‑readable domain names to IP addresses. | Embedded thermostat resolves api.weather.com to obtain forecast data. |
| Client‑Server vs. Peer‑to‑Peer | Client initiates requests to a server; P2P nodes communicate directly. | Firmware update client contacting a server vs. two drones exchanging telemetry directly. |
| Routing & Packet Switching | Routers forward packets based on destination IP; packets may travel via multiple hops. | Sensor node → gateway router → cloud server. |
| Aspect | Embedded System | General‑Purpose Computer |
|---|---|---|
| Purpose | Single, dedicated function (or small set) | Multiple, varied functions |
| Hardware | Optimised, often single‑chip (microcontroller) | Modular, expandable (CPU, separate RAM, HDD/SSD, etc.) |
| Operating System | RTOS or bare‑metal | Full‑featured OS (Windows, Linux, macOS) |
| Power Consumption | Low – battery or energy‑harvesting | Higher – mains powered |
| Cost per Unit | Minimised, mass‑produced | Higher, often bespoke |
| Reliability Requirement | Very high – often mission‑critical, long‑run operation | Moderate – user can reboot or reinstall |
For each periodic task the worst‑case execution time (WCET) must not exceed its deadline \(D\):
When \(n\) periodic tasks share a single processor, Liu & Layland’s bound for Rate‑Monotonic Scheduling must be satisfied:
where \(Ci\) is the computation time and \(Ti\) the period of task \(i\). The utilisation \(U\) gives a quick check of whether the set of tasks can meet all deadlines.

Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources, past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.