The idea that computers should be able to be easily and quickly reprogrammed, developed by Alan Turing and John von Neumann in the 1940s
Computer architecture

The structure of a computer system - the hardware components it has and how they work together to execute programs
Von Neumann architecture

A new computer architecture for a programmable machine, devised by Von Neumann
Main memory

Short-term, working memory that holds the program instructions and data the CPU is currently using
Main memory

Consists of a collection of storage locations, each with its own unique address
Storage locations can hold a program instruction or an item of data
Often referred to as RAM (random access memory)
Is volatile and needs power to retain its contents
Modern laptops, tablets and phones typically have between 4 and 32 GiB of RAM
Central processing unit (CPU)

The hardware component that decodes and executes program instructions
Components of the CPU
Fetch program instructions from main memory one at a time, decode them and direct the operations of the other parts of the system to execute them
Synchronise the actions of the CPU
Perform arithmetic and logic operations on data
Provide direct-access storage for instructions, intermediate results and data within the CPU
Clock

A tiny quartz crystal that vibrates at a constant rate, triggering the CPU to carry out one action per tick
Modern CPUs have clock speeds of around 3 gigahertz (GHz)
Buses

Collections of wires used to transfer data between components of a computer system
Types of buses

Control bus carries signals between the CPU and other parts of the computer system
Address bus holds the address of the memory location the CPU will read from or write to
Data bus transfers program instructions and data between memory and the CPU
The number of wires in the address bus determines how much addressable memory there is
Fetch-decode-execute cycle

1. Fetch the next instruction from memory
2. Decode the instruction by looking it up in the CPU's instruction set
3. Execute the instruction, coordinating the actions of the CPU components
Secondary storage

Provides long-term storage for programs and data when they are not in use
Differences between primary and secondary storage
Primary storage is volatile and power dependent, secondary storage is non-volatile
Primary storage provides fast, direct access to the CPU, secondary storage requires transfer to memory first
Primary storage has limited capacity, secondary storage has much larger capacity
Types of secondary storage
Magnetic (hard disk drives), optical (CDs, DVDs), solid-state (SSDs, USB drives)
Magnetic storage

Data is stored by magnetising areas on metal platters
Read/write heads detect/change the magnetic state to read/write data
Optical storage

Data is stored as reflective 'lands' and less reflective 'pits' on a disk
A laser is used to read the lands and pits and translate them into 1s and 0s
Solid-state storage

Data is stored by trapping electrons in transistors, with full pools representing 0 and empty pools representing 1
Solid-state storage is very robust, unlikely to be damaged, and consumes very little power
Disk surface

A point reflects light more than a line
Light reflected off surface
Detected by a light sensor and translated into 1s and 0s
Storage technologies

Magnetic (internal/external hard drives, tape drives)
Optical (CD, DVD, Blu-ray drives)
Solid-state (solid-state drives, USB sticks)
Magnetic storage

Has moving parts that will eventually fail
Noisy
Slow to access
Prone to scratches
Relatively expensive
Optical storage

Very fast data access
No moving parts
Low power
Quiet
Solid-state storage

Has a limited number of read-write cycles
An embedded system is a small computer on a chip, that performs a dedicated task within a larger system
Most embedded systems work in real-time - they must respond immediately to a triggered event or request
Features of embedded systems
Single purpose-designed for a specific task
Customised hardware and software
Limited memory and processing power
Low power consumption
Some connectivity
Minimal or no userinterface
Small physical size
Responsive to their environment
Low maintenance
Usually operate in real-time
Microcontroller
The brain of an embedded system
Embedded system operation

1. Sensors receive inputs from the outside world
2. Microcontroller processes the inputs
3. Actuators convert the output commands into mechanical actions
Embedded system software - the program that tells the device what to do - is installed on the device and does not need to be modified
Devices that use embedded systems
Washingmachine that regulates water usage
Drinksdispenser that sends reorder request
Insulinpump that monitors blood glucose levels
Anti-lock braking system
Burglaralarm that sends message to homeowner
The Internet of Things (IoT) is a network of physical objects that use embedded systems and wireless technology to collect and exchange data with little or no human interaction
There are several privacy and security issues associated with the IoT, such as devices being dispatched with default passwords that can be easily hacked
Operating system

The program that acts as an interface between hardware and other software, enabling them to communicate
Main tasks of an operating system

Process management
File management
User management
Peripheral management
Process management
Overseeing execution of programs by CPU and allocating memory and CPU time