Hardware

Computer Architecture

CPU

The central processing unit processes instructions and data that are inputted into the computer to produce an output.

Microprocessor

A microprocessor is a type of integrated circuit on a single chip.

Von Neumann Architecture

Von Neumann architecture is the concept used to build nearly all computers.

  • Data and instructions are stored in the same memory (RAM) as binary
  • CPU fetches instructions from memory and executes them serially (one at a time)
  • CPU stores results in memory

Registers

The CPU contains many units and registers.

Component Abbreviation Function
Current Instruction RegisterCIRStores the current instruction being decoded and executed
Arithmetic Logic UnitALUPerforms calculations inside the CPU
AccumulatorACCStores data temporarily for ALU calculations
Memory Address RegisterMARStores the address of the data that needs to be fetched
Memory Data RegisterMDRStores data that has been fetched from memory
Program CounterPCStores the address for the next instruction

Buses

Components within the CPU and wider computer system are connected by buses. Electronic signals and data travel down these wires. Collectively, these buses are called the system bus.

Bus Function Bidirectional
Data Bus Transmits data from the CPU to memory or IO controllers check
Address Bus Transfers addresses from the CPU to memory close
Control Bus Transfers control signals from the CU to other components like IO controllers check

CPU Cycle

CPUs perform the fetch-decode-execute cycle to process data.

  1. Memory is fetched from RAM into CPU
  2. CPU reads instructions and data from MDR
  3. CIR stores current instruction
  4. CU decodes instruction and executes it by sending control signals to other components
  5. ALU executes instruction by performing arithemetic and logic operations
  6. Data is written to RAM

CPU Performance

CPUs can have multuple cores. Each core runs separate fetch-decode-execute cycles independently.

  • Multiple cores allows multitasking due to parallel processing
  • More cores means more instructions can be executed per second

Each core has a clock speed.

  • Clock speed is how many instructions the core can execute each second measured in Hertz
  • Greater clock speed improves CPU performance
  • Overclocking is the act of increasing the clock speed beyond the recommended speed which may damage components

Cache is a small amount of memory situated within or close to the CPU with very fast read and write speeds.

  • Used for storing frequently used instructions and data or instructions that need to be executed next
  • Increasing cache size increases CPU performance because more data can be stored in cache and fetched quicker

Instruction Sets

An instruction set is a list of all the commands that can be processed by a CPU. Each command has a unique binary code.

Embedded Systems

An embedded system is a computer system used to perform a dedicated function. This is different to a general purpose computer like a personal computer. Some examples of embedded systems include:

  • lighting systems
  • vending machines
  • security systems

Embedded systems run on firmware and do not have any additional peripheral devices. Some of these are microcontrollers which are integrated circuits with built in memory.

Process

Most embedded systems follow a simmilar process or pattern.

  1. Sensor continually sends digitised data to microprocessor
  2. Microprocessor checks data against stored values
  3. Microprocessor sends signal to perform action if value is outisde range
  4. Output device is used to perform action
  5. Whole process is repeated until stopped

Input and Output Devices

Input Devices

Computers use input devices to receive data or instructions from the real world. Input devices convert real world inputs into digital data that can be processed.

Barcode Scanner

  • Barcodes are a series of black and white bars which represent a code
  • A barcode reader shines a red laser at the barcode to read the data it represents
  • The light from the white lines is reflected back
  • Black lines reflect less light than the white lines
  • The different levels of reflection are converted into a binary value (by photoelectric cells) which can be processed by a microprocessor
  • Barcodes can be used in many ways such as identifying a product being sold in a supermarket or tracking a package through the delivery process

QR Code Scanner

  • QR codes are made of many black and white squares which represent a code
  • A QR code can hold over 7000 digits while a barcode can only store up to 30 digits
  • A QR code scanner shines a red laser onto the QR code to read its data
  • The corner squares are used for alignment and orientation
  • The light from the white squares is reflected back
  • Black squares reflect less light than the white squares
  • The different levels of relfection are converted into a binary value (by photoelectric cells) which can be processed by a microprocessor
  • Using QR codes is a popular method for storing website addresses and URLs

2D Scanner

  • 2D scanners usually convert visual data stored on paper into a digital image that can be processed by a microprocessor
  • A bright light illuminates the document
  • A scan head moves across the document until the whole page has been scanned
  • An image is produced and sent to a lens
  • The lens focuses the image ontp a charge couple device (CCD)
  • Each pixel generates an electric charge when light falls on it
  • Software produces a digital image and may make use of optical character recognition (OCR) to convert the scanned text in the digital image into a text file format

Output Devices

Output devices are used to display or emit processed data usually in the form light and sound. The current syllabus no longer candidates to know the working of these devices.

Sensors

Multiple sensors can be used to perform the same task. Sensors convert real-world data into electrical signals that can be processed by a microprocessor.

Sensors usually have a dedicated purpose. Common sensors include:

  • pressure: measures pressure, weight, or mass
  • infra-red: detects movement
  • temperature: measures temperature
  • light: measures brightness
  • proximity: detects nearby objects without touching them
  • level: determines whether a container is empty or contains liquid

Storage Devices

Primary Storage

  • Primary storage is directly accessed by the CPU
  • Examples include:
    • random access memory (RAM)
    • read only memory (ROM)

RAM and ROM

Memory Volatile Actions
RAM check Read & Write
ROM close Read

RAM stores currently running:

  • data
  • instructions
  • application software
  • parts of the OS

Secondary Storage

The purpose of secondary storage is to permanently store files that are not currently required by the CPU. It allows data to be transferred to another computer.

  • Secondary storage is not directly accessed by the CPU
  • Examples include:
    • hard disk drive (HDD)
    • solid state drive (SSD)
    • compact disc (CD)
    • digital versatile disc (DVD)
Storage Device Technology Moving Parts Speed Power Consumption
HDD Electromagnets check Slower High
SSD NAND & NOR Logic Gates close Faster Low
Blu-ray Blue Lasers check Slower High
DVD Red Lasers check Slower High

Solid State

A solid state storage device does not have moving parts. Instead, it is made of transistors arranged in a grid layout. It uses NAND and NOR gates in electrical circuits to persistently control the flow of electrons.

Magnetic

A magnetic hard disc is made up of many magnetic discs called platters. Each platter is divided into sectors and concentric tracks.

The hard disc spins the platters at a high speed and the read-write arm moves the read-write heads over the surface of the disc to the location of the data. The read-write heads have electromagnets which are used to read or write data. The iron particles on each platter can be magnetised to represent a binary value (0 or 1).

Optical

An optical storage device uses a laser to read and write memory from a disc. The disc contains pits and lands that can be converted into binary by shining a laser and analysing the reflection. An arm moves the laser across the surface of the disc to perform read and write operations. In some optical drives, lasers can burn new pits to overwrite the data.

The colour of the laser affects the amount of data that can be stored in the disc. Blu-ray uses blue lasers and can store more data than a CD or DVD which use red lasers because blue light has a higher frequency.

Virtual Memory

Virtual memory is used when there is not enough RAM to run complex software. Virtual memory:

  • is allocated inside the hard disk to extend RAM capacity
  • prevents software from crashing
  • allows the computer to process large amounts of data required for complex software

Pages of data are transferred between virtual memory and RAM when needed. Inactive RAM resides in virtual memory until it is required for processing again.

  1. Secondary storage is partitioned to make space for virtual memory
  2. Inactive page is moved from RAM to virtual memory
  3. This frees space for a page in virtual memory that is immediately required for processing
  4. Required page is moved from virtual memory to RAM
  5. Inactive page can be swapped back into RAM when the CPU has finished processing a page

Cloud Storage

Cloud storage stores data in physical servers managed by a third party.

  • Can be accessed remotely from any device with a network connection
  • No need to maintain physical server
  • Server crash can cause data loss
  • No control over security

Network Hardware

NIC

A network interface card is a hardware component in a device that enables it to connect to a network.

MAC Address

A media access control address uniquely identifies a device.

IP Address

An internet protocol address uniquely identifies a device on a network. IP addresses:

  • can be public or private
  • can be static (fixed) or dynamic (changing)
  • are made of 4 bytes (0 to 255) separated by full stops

IPv4 and IPv6

IPv6 is a newer version of IPv4. IPv4 is made of 4 denary numbers ranging from 0 to 255 separated by dots. IPv6 is made of 8 hexadecimal numbers ranging from 0 to FF separated by colons.

Address Bits Digits Separator Possible Addresses
IPv432denary.232 possible addresses
IPv6128hexadecimal:2128 possible addresses

Static and Dynamic

A static IP address does not change when a device connects to the same network. Static IPs:

  • have a consistent location
  • are fully traceable
  • can reduce network traffic because the website resources can be accessed directly

A dynamic IP address can change every time a device connects to a network. Dynamic IPs:

  • are automatically addigned by the Dynamic Host Configuration Protocol (DHCP)
  • have greater privacy and security