Hardware
The physical components that make up a computer system, including processors, memory, storage and input + output devices
Software
The programs that run on a computer, including operating systems, utility programs, library programs and application software (which includes mobile apps)
System software
Programs that are needed for effective communication with the hardware, and for launching application software
Examples: Operating systems (e.g. Windows, Android) and utility software (e.g. browsers and word processing packages)
Operating system (OS)
A piece of system software that acts as an interface between the user and the hardware, managing all hardware and all other software
What is managed by the operating system?
Processors, Memory, Input/Output devices, Applications, Security
Processors
The operating system decides:
which processes will be carried out by which processors
if multiples processes are running, which one the processor should handle next
how long a time slice the process is given, i.e. how long before the processor's attention switches to the next process
Memory
The operating system
loads programs and data from backup store to main memory
removes programs that are not needed to make room for more
manages virtual memory
Input/Output devices
The operating system
acts as a go-between between application software and I/O devices
manages device drivers, which are programs telling the operating system how to communicate with attached I/O devices
Applications
The operating system
communicates between application software and hardware
processes requests from application software for resources, such as a network connection or a remotely stored file
Security
The operating system can
manage multiple user accounts, keeping users' data seperate
automatically back up data, increasing security
handle usernames and passwords to prevent unauthorised access
recognise a user as administrator, giving them greater access rights
Utility software
Programs that keep the computer functioning efficiently
Compression
Reducing the size of a file so that it can be stored using less space or transmitted more quickly
Defragmentation
Moving seperate parts of a file physically together, to speed up disk access
Backing up
Creating a copy of files, either on the same disk, on a backup device or in the cloud
Encryption
Allowing for data to be scrambled in order to prevent unauthorised individuals from understanding any files that they see. This might be for secure storage or secure transmission
Von Neumann Architecture
Data is input, processed by the CPU, and outputted. There is also memory, allowing data to be stored
CPU
Central Processing Unit. Executes program instructions, performing calculations and comparisons, as well as coordinating the behaviour of other hardware.
Arithmetic Logic Unit (ALU)
Performs various operations:
Arithmetic operations (+ - * /)
Relational operations (< > =)
Logic operations (AND, OR, NOT)
Control Unit (CU)
Manages the execution of instructions by coordinating the activities of the other hardware
Buses
Collections of wires that transmit data between computer components
Data bus
Moves back and forth between the CPU and memory
Address bus
Transmits memory locations. Any data retrieved from or placed into memory belongs in a specific address or memory location
Control bus
Transmits commands to other components, such as read or write
Registers
Short-term storage for small, specific pieces of data, within the CPU itself
Clock
Synchronises activities within the CPU. Every action performed by the CPU must begin during the clock pulse.
Main memory
The main working area for data currently being used and programs currently running
RAM (Random Access Memory)
Smaller but faster than a hard disk. A programs data and instructions are loaded from a computer's hard disk into RAM. It is volatile. More RAM means that the computer can run more applications at the same time
ROM (Read Only Memory)
The content is not volatile - it cannot be edited or deleted. ROM stores data or instructions that will not need to be updated, such as bootstrapping instructions
Cache
Stores copies of data or instructions from RAM that are regularly accessed. These can be accessed very quickly from cache, although a computer's cache memory is usually very small.
Factors affecting CPU performance
Number of cores
Clock speed
Size of cache
Type of cache
Core
A single unit, comprising an ALU and a control unit, which can execute instructions. More cores means that more instructions per second can be processed
Clock speed
The number of clock pulses per seond, typically measured in gigahertz (GHz)
Fetch-execute cycle
A continual sequence of tasks that results in instructions being fetched from main memory, decoded so that the CPU knows what to do with them, and then executed
Stage 1 - Fetch
The clock pulses
One of the registers (program counter) contains the location in memory where the next instruction is to be found
This location (address) is transmitted along the address bus to memory
Memeory sends the content of the address along the data bus back to the processor. The instruction is stored in a register (Instruction Register)
Stage 2 - Decode
The instructions is read by the control unit, which prepares the registers for whatever date they will be storing.
Stage 3 - Execute
The instrction is carried out. The program counter is updated because the current instrction has been executed, and the cycle begins again
Secondary Storage
Long-term storage in a computer system. It is necessary because main memory is volatile (loses its contents when powered down) and will also run out of storage space
Optical Storage
Written to and read from using lasers - the disks spin to allow the laser to read the data from the correct location. The surface of these disks have billions of pits and lands to represent either 0s or 1s
Examples: CDs, DVDs, Blu-Ray disks
Advantages of Optical Storage
One optical disk is very cheap
Is often read-only, so it is difficult to accidentally overwrite data
Disadvantages of Optical Storage
An unprotected disk is vulnerable to being scratched
Low data capacity
Magnetic Storage
Round disks divided into tracks and sectors. The disk spins to allow a read-write head to access the data in a particular segment. Contains magnetic particles that are either magnetised (1) or not magnetised (0)
Advantages of Magnetic Storage
Cheapest storage medium per magabyte
Less cumbersome than multiple optical disks
Disadvantages of Magnetic Storage
Slower access speeds than solid state
The data is all on one device, which could be lost
Solid State Drives (SSDs)
Use electronic circuits to store data electronically, and can retain data without a power supply
Advantages of SSDs
Faster acess speeds than both optical and magnetic
Harder to damage because there are no moving parts
Disadvantages of SSDs
Most expensive form of storage per megabyte
Limited number of times each bit can be written to
Cloud storage
Involves storage on remote computers, managed by other organisations. When a file is saved or loaded , it is transmitted across the internet. Multiple backups exist across the world. Uses magnetic and SSD storage
Advantage of Cloud Storage
Less likely to be damaged or misplaced
Capacity on your local machine is freed, giving you more storage space
Disadvantages of Cloud Storage
Often comes with a subscription fee
Limited by your internet connection
Embedded System
A computer that exists within a larger mechanical or electrical device
Examples of embedded systems
ATMs
Printers
Utility smart meters
Petrol pumps
Examples of non-embedded systems
Personal computers
Laptops
Tablets
Smartphones
Low Level Language
close to binary code
Machine Code
low level language
easily executed by computers
each processor has unique code so not portable
high risk of human error
Assembly Language
low level language
one to one machine code relationship
direct manipulation of registers
no compiler, converted by assembler to object code
Object Code
A program translated into machine code
High Level Language
resembles human language
one to many machine code relationship
needs translation
portable and easy to maintain
Imperative (procedural) language
lists of instructions
subroutines or procedures
eg. C
Object Oriented Language
created objects that contain instructions, eg. C++
Declarative Language
describes what the program needs to accomplish, eg. SQL
Logic Programming
facts and rules interrogate data
commonly used in AI
eg. Prolog
Functional Lanuage
treats procedures like mathematical functions, eg. Haskell
Interpreter
reads source code statement and carries out immediately
every iteration the statement is read again
used will developing a program
source code must be given to users
computers must use the same interpreter
Compiler
converts source code to object code
unless changed, source code no longer needed
code will run on computer with same platform
can be translated