Skip to content
BoKSA

Foundations

Introduction to Computer Systems

Introduction

Every program you write — whether a web API or firmware on a microcontroller — ultimately runs on hardware that fetches instructions from memory and operates on data. Understanding that global model helps you debug performance problems, memory limits, and mysterious crashes that look like software bugs but originate in the machine.

This article explains the basic building blocks of a computer system: the CPU, memory, and input/output. It is the starting point for the knowledge section and matches the foundational questions from Computersystemen en embedded systemen (Van Moergestel).


The heart of the system: CPU and memory

At minimum, a computer system contains:

  1. CPU (Central Processing Unit) — executes instructions.
  2. Memory — holds both instructions and data.
  3. Input/Output (I/O) — connects the system to sensors, displays, disks, networks, and other peripherals.

The CPU repeatedly:

  1. Fetches an instruction from memory.
  2. Decodes what the instruction means.
  3. Executes it (arithmetic, logic, load/store, branch, I/O request).
  4. Writes back results to registers or memory.

This fetch–decode–execute cycle is the same whether you use a laptop, a server, or an embedded MCU — only speed, word size, and peripherals differ.

flowchart LR CPU[CPU] <-->|Address + data buses| MEM[Memory] CPU <-->|I/O bus| IO[Input / Output]

Instructions and data in memory

Programs are stored as machine instructions — binary patterns the CPU understands. High-level languages (C, Python, Java) are translated into these instructions by a compiler or interpreter (see Compilers and toolchains).

Data (variables, buffers, configuration) lives in the same address space as instructions in most systems (von Neumann architecture). The CPU does not philosophically distinguish "code" from "data" — it is all bit patterns in memory. Security and operating systems add rules later about which regions are executable.


Why digitize?

Physical quantities (sound, temperature, light) are often analog in the real world. Computers work with digital values. Converting and processing digitally has advantages:

Advantage Explanation
Easy storage Copy, checksum, and back up bit patterns reliably
Complex processing Filters, compression, ML — hard in pure analog hardware
Predictable behaviour Same input → same output (if designed correctly)
Lossless long-distance transport Regenerate digital signals; analog noise does not accumulate

Trade-off: conversion introduces quantization (limited resolution) and sampling limits (see Sampling and A/D conversion).


General-purpose vs embedded

Aspect General-purpose computer Embedded system
Purpose Many tasks (browser, IDE, games) Usually one dedicated function
Resources GB of RAM, expandable storage Often KB–MB; fixed hardware
User interface Screen, keyboard, rich OS Buttons, LEDs, serial, or none
Global operation Same fetch–execute model Same fetch–execute model
Software Often high-level languages Often C/C++ close to hardware

Similarities matter: both use CPUs, memory, buses, and I/O. Differences matter for design constraints — see Embedded systems overview.


Relevant topics


Starting points

  1. Draw the three blocks — CPU, memory, I/O — and label the buses between them.
  2. Run a "Hello World" on your board and find where the binary lands in flash vs RAM (toolchain map file).
  3. Read your MCU datasheet "block diagram" page — match terms to CPU, memory, peripherals.
  4. Compare your laptop's RAM size to your development board's SRAM — orders of magnitude apart.

Focus points

  • Instructions and data share memory in classic von Neumann designs — buffer overflows can overwrite code if unchecked.
  • The global model is universal — embedded is not a different kind of computing, but a constrained deployment.
  • I/O is part of the system — sensors and actuators are how embedded software touches the world.
  • Digitization is a design choice with trade-offs, not a free improvement.

Key points

  • A computer system's core is CPU + memory + I/O.
  • The CPU runs a fetch–decode–execute cycle on instructions stored in memory.
  • Digital data enables storage, processing, and reliable communication.
  • Embedded and general-purpose systems share the same global operation but differ in purpose and resources.