Architecture of the CPU
The CPU processes instructions needed to make a computer system work and performs FDE cycles.
Hardware: the physical components that make up a computer, e.g. RAM stick
Software: programs you can run on a computer system, e.g. Internet Browser
Embedded system: a computer system that is built inside another device, which has 1 specific function, e.g., a
washing machine. Has a microprocessor on a single circuit board. They are cheap, small and reliable because
the OS cannot be updated/modified after manufactured.
General purpose computer: multiple functions with multiple chips combined. You can update the software and it’s
a self-contained system.
Control Unit (CU):
- Controls the flow of data within the CPU
- Decodes instructions
Arithmetic Logic Unit (ALU):
- Performs arithmetic operations, e.g., addition and multiplication
- Performs logic operations, e.g., AND, OR, NOT
- Performs binary shifts
Registers: temporarily stores tiny amounts of data, located in the CPU, so it is very fast
- Accumulator: holds the results of calculation done in the ALU
- PC: stores the address of the next instruction to be run
- Memory Data Register: holds the data fetched from or to be written to memory
- Memory Address Register: holds the address of the data that is to be fetched or stored in memory
Fetch-decode-execute cycle:
- Memory address from the PC is copied into the MAR
- Data from RAM from the memory address in the MAR is fetched and copied into the MDR
- The PC increments by 1 to point to the next instruction to be executed
- The CU decodes the data in the MDR and the new value is loaded into the MDR to prepare for
execution
- The instruction is executed, e.g., a calculation is done by the ALU
- The fetch-execute cycle is repeated
Cache: small amounts of very fast memory located in the CPU, which stores frequently repeated instructions, so
the CPU doesn’t have to travel to RAM to access information, as it is further away than cache, so it takes longer
to access the instructions, thus more cache improves performance of the CPU
Clock: sends out regular pulses to synchronise the computers components. Clock speed is measured in Hz (1Hz
= 1 fetch-execute cycle)
Bus: a channel between components in the CPU, which sends control signals and data, e.g., control, data and
address bus
Cores: 2 cores = parallel processing can take place (each processor can execute a separate instruction at the
same time) which enables multitasking. HOWEVER, some software cannot be split between the processors, so it
doesn’t increase performance
Memory
Primary storage:
Built into the computer, so data can be written and read from very quickly by the CPU.
, RAM ROM
Volatile – loses its contents when the power is Non-volatile – permanently keeps all its data, even
switched off when the power is switched off
Read + write Read only
Stores programs, instructions and data that is Stores the BIOS – performs the bootstrap program,
currently in use by the computer, as it is much faster which copies the operating system into RAM, when
for the CPU to access the data in RAM than in the power is switched on.
secondary storage. Stores data that should not be changed/must be
retained when computer turns off
Virtual memory: part of the computer’s secondary storage, located in the hard disk, and is used to store programs
and data when there is no more space in RAM, to free up space. When the data is needed again by the user, any
unused data is copied into virtual memory, and it is copied back into RAM. This process is called swapping.
Swapping slows down the computer because data transfer from secondary storage is much slower than from
RAM, therefore, you can make it faster by increasing RAM capacity. Also, excessive use may cause disk
thrashing, which decreases performance.
Secondary storage:
Non-volatile, long-term storage to keep data and programs stored in a computer indefinitely. It stores software,
e.g., web browser. Without it, all our data will be erased once the power is switched off. Secondary storage can
also transfer files to other devices.
It may store files, software, applications, programs.
Magnetic – hard disk drive Optical – Blu-ray, DVD, CD Solid state – flash drive, USB
Uses magnetic fields to magnetise Uses a laser to scan the surface No moving parts, so faster
individual sections of a metal spanning of a spinning disk, divided into access speeds than others and
disk tracks of lands and pits. more durable.
It has a limited amount of read-write R media are blank and a optical Limited read-write cycles, as over
cycles because eventually the moving device shines a laser on it. This time the oxide layers will
parts (the read/write head which moves burns the disk, creating pits. deteriorate, making the transfer
across the surface of the disk) wear These burns are irreversible, of electrons through them
away. therefore, it is read-only unreliable.
Each magnetised section represents a RW however, can be written to High portability – very small and
binary bit – 0 or 1 many times durable and little power required
Cheap, high capacity, durable – but Cheap, portable, lightweight. Not Medium storage capacity, and
susceptible to damage if dropped and durable, as easily scratched. Not expensive compared to the other
data can be erased by strong magnetic much capacity. Slow access storage types. Very reliable
fields. Slow access times because of time because of moving parts. BUT more cost effective in the
moving parts. Reliable if looked after. Reliable if looked after. long term, as can be reused
many times.
Database server, because it is cheaper Photography photos, because it Phone, as it’s got no moving
than SSD, and have a high capacity will only be used once, it is very parts, so it's durable – won't
and is fast, reliable and durable. cheap (only a few pence) and break if dropped. Power efficient,
portable so longer battery life.
Binary
Why we need to convert to binary?
With just 2 states 0 and 1, computers are:
- Easier to manufacture
- Therefore cheaper
- Therefore more reliable
For example, optical disks use pits and lands, the hard disk uses magnetic fields, which have 2 poles.
Binary overflow
There will be an overflow error, if you add 2 numbers which requires a greater number of bits allowed. For
example, if there are only 8 bits and the number is greater than 255 (11111111).
, Characters
Character set: all the letters, numbers and special characters than can be recognised by a computer system.
ASCII uses 7 bits – 128 characters.
Extended ASCII uses 8 bits – 256 characters (addition of symbols)
Unicode uses 16 bits – 65536 characters (addition of emojis and other languages)
Images
A bitmap is made up of picture elements (pixels), which is the smallest identifiable area of an image, each
appearing as a square with a single colour. They are uncompressed (.bmp)
File size and quality:
- Colour depth: number of bits per pixel allows for a larger range of colours in the image
- Resolution: the density of the pixels in the same size area (PPI)
- Number of pixels * colour depth = file size (bits), divide by 8 (bytes)
Metadata: Data stored alongside the actual file data, e.g., type of image (file type), author, date created, height,
width, colour depth
Sound
The amplitude of analogue sound can be recorded at regular intervals to be converted binary digital sound
waves.
File size and quality:
- Sample rate: how often the height is recorded (Hz)
- Duration: legnth of time (seconds)
- Bit depth: the accuracy of which the height is recorded at
- CD sample rate: 44.1 KHz
Compression
Why we compress files: to remove unnecessary, repeated data, reducing the file size. This enables them to be
sent by email, where there are attachment limits and can be useful for streaming over the Internet, as smaller
files take less time to transmit, therefore, less time to download.
Lossy Lossless
JPG, MP3, WMV PNG, PDF, GIF, TIF, ZIP
Reduces file size more than lossless, less Original quality is preserved (no information is lost)
transmission time, reduces Internet traffic and
collisions
Detail is permanently lost, reduces quality, text files Less significant reduction in file size
cannot be compressed with lossy
Music streaming, image libraries on the cloud, online Text documents, electronic books, high resolution
videos and images print documents, downloading software
Networks
Definition: Two or more interconnected devices for communication.