An embedded system is any electronic system built around a processor that is not a general-purpose computer such as a workstation, desktop or laptop. It is designed to do one job, or a small set of jobs, inside a larger product. Embedded systems are found in cars, aircraft, trains, spacecraft, machine tools, cameras, home and office appliances, phones and other handhelds, robots and toys. Billions of microprocessors and microcontrollers are shipped every year for these uses.
What makes a system "embedded"
The processor is hidden inside a product whose user never thinks of it as a computer. A washing machine, a car's brake controller and a digital camera all run software, but the owner sees a machine with buttons, not a PC. Three things usually set an embedded system apart:
- A fixed purpose. The hardware and software are designed together for one product, so features that the job does not need are left out.
- Tight limits. Cost, power, size and memory are all constrained. A low-cost consumer product may use a chip costing under a dollar with only a small amount of program memory.
- Real-world timing. Many embedded systems must respond to sensors and events within a fixed time, for example firing an airbag or switching a motor.
What is inside
Embedded systems use microprocessors, microcontrollers, custom-designed chips, or a mix. A microcontroller puts the processor, program memory, data memory and peripherals such as timers, serial ports and analog-to-digital converters on one chip, which makes it the usual choice for small products. Larger systems, such as a car's infotainment unit or a network router, use a more powerful processor or a system on chip with external memory.
Where the software lives
In an embedded system the software, often called firmware, is stored permanently in non-volatile memory such as ROM or flash, so the product works the moment it is powered on. A general-purpose computer instead loads programs from a disk into RAM when the user starts them. Small microcontrollers usually run their code directly from on-chip flash. Larger embedded systems, for example those running embedded Linux, keep their software in flash but copy it into RAM at boot, much like a PC, while still being dedicated to one product.
On the smallest chips there may be no separate operating system at all: the control loop and the application are combined into one program. Larger products use a real-time operating system (RTOS) or an embedded version of a general operating system, such as Embedded Linux or, in the 2000s, Windows XP Embedded.
Embedded computers
Sometimes a single-board or rack-mounted general-purpose computer is called an "embedded computer" when it is dedicated to controlling one machine, such as a printer, a drill press or a test rig. The hardware is general purpose, but its use is fixed.
When you would design one
You design an embedded system whenever a product needs some intelligence but a full PC would be too large, too expensive, too power-hungry or too unreliable. The skill lies in choosing just enough processor, memory and software for the job, and making it respond on time every time.
Deep dive: the numbers and details
This part holds the figures, equations and worked examples. Skip it if the overview is all you need.
Embedded system versus general-purpose computer
| Aspect | Typical embedded system | General-purpose computer |
|---|---|---|
| Purpose | One product, fixed function | Runs any program the user installs |
| Software storage | Firmware in ROM or flash, often run in place | Programs on disk, loaded into RAM |
| Operating system | None (bare metal), an RTOS, or embedded Linux | Desktop or server OS |
| Timing | Often hard real-time deadlines | Best effort |
| User interface | Buttons, LEDs, small display, or none | Keyboard, mouse, large display |
| Update | Rare, often over the air or at service | Frequent |
Interrupt latency: how fast can it respond?
Embedded systems react to events through interrupts. The time from an interrupt request to the first instruction of its handler is the interrupt latency. Arm's beginner's guide to interrupt latency on Cortex-M processors (Joseph Yiu, April 2016) gives these figures for zero-wait-state memory:
| Processor | Interrupt latency (cycles) |
|---|---|
| Cortex-M0 | 16 |
| Cortex-M0+ | 15 |
| Cortex-M3 | 12 |
| Cortex-M4 | 12 |
Worked example: a Cortex-M4 at 100MHz has a 10ns clock period, so 12 cycles is
12 cycles x 10 ns = 120 ns to reach the handler
If the handler then needs 200 instructions at roughly one per cycle, the response completes in about 2.1 microseconds. Flash wait states, higher-priority interrupts already running, and peripheral synchronization all add to this, so real designs measure the worst case on the bench rather than trusting the best case.
Memory budget: a worked example
Suppose a small sensor node uses a microcontroller with 64KB of flash and 8KB of RAM. A typical budget might look like this (illustrative figures):
| Item | Flash | RAM |
|---|---|---|
| Start-up code and vector table | 1KB | 0 |
| Drivers (ADC, UART, timers) | 8KB | 0.5KB |
| Radio protocol stack | 30KB | 3KB |
| Application | 10KB | 1.5KB |
| Stack and buffers | 0 | 2KB |
| Total | 49KB of 64KB | 7KB of 8KB |
RAM is the tight resource here, which is common. Engineers keep constant tables in flash, size buffers carefully and measure the worst-case stack depth.
Battery life: a worked example
Many embedded products sleep most of the time. Average current is a duty-cycle-weighted sum:
I_avg = (I_active x t_active + I_sleep x t_sleep) / (t_active + t_sleep)
Take a device that wakes for 10ms every second at 5mA and sleeps the rest at 5 microamps (illustrative figures):
I_avg = (5 mA x 0.01 s + 0.005 mA x 0.99 s) / 1 s
= 0.05 + 0.00495 = about 0.055 mA
Battery life with 220 mAh = 220 / 0.055 = about 4,000 hours, roughly 5.5 months
Halving the active time nearly doubles battery life, which is why embedded firmware is written to finish its work and return to sleep as quickly as possible.
Common mistakes
- Forgetting that shared variables between an interrupt handler and the main loop must be declared volatile and protected from partial updates.
- Sizing the stack by guesswork instead of measuring worst-case depth.
- Assuming best-case interrupt latency when flash wait states or other interrupts can delay the response.
- Leaving peripherals powered during sleep, which can dominate the average current.
Interview angle
A common interview question is "What is the difference between a microprocessor and a microcontroller, and when would you use each in an embedded design?" A good answer covers on-chip memory and peripherals, cost and power, and gives an example of each, such as a microcontroller in a thermostat and an application processor running Linux in a network camera.


Your comments will be moderated before it appears here.