Computer Systems

Leaving Cert Higher Level Computer Science revision notes with diagrams, key terms and self-check questions.

17 min readHigher LevelBy Studytok
Practise this topic — free →

A computer system combines hardware, software, communications, and users to process data and solve problems. Modern computing is built on the von Neumann architecture, in which program instructions and data share primary memory and are fetched, decoded, and executed sequentially by the Central Processing Unit (CPU). At the physical level, electronic components such as transistors operate as binary switches based on electrical voltage. Higher layers—including the operating system, network protocols such as TCP/IP, and application software—abstract this hardware into functional systems.

Hardware, Software, and the Four-Layer Model

A computer system relies on both physical equipment and intangible instructions to operate.

Hardware and Software

  • Hardware refers to the physical parts of a computer system that you can touch. Examples include the CPU, RAM, hard disk drives, solid-state drives, keyboards, and monitors.
  • Software refers to the programs, applications, and instructions that tell the hardware what to do. Software cannot be physically touched.
  • System software manages and runs the computer hardware itself. Examples include operating systems such as Windows, macOS, and Linux, as well as utility programs and device drivers.
  • Application software allows the end user to perform specific productive or recreational tasks. Examples include web browsers, word processors, and games.

The Four-Layer Computing Model

Computer systems use layered abstraction so users and software can interact with hardware without needing to manipulate physical circuitry directly:

  1. User: Interacts with software using graphical user interfaces (GUIs), touchscreen displays, or command-line interfaces.
  2. Application Layer: Software programs running tasks on behalf of the user.
  3. Operating System Layer: System software that manages system resources, handles input/output hardware, and provides a platform for applications.
  4. Hardware Layer: Physical electronic devices—CPU, memory, storage, and peripheral controllers.

Core Roles of the Operating System

  • Processor Management: Allocates CPU time among running processes using scheduling algorithms and handles interrupts to maintain smooth multitasking.
  • Memory Management: Allocates memory addresses to open programs so they do not overwrite each other's data, and uses virtual memory on secondary storage when RAM becomes full.
  • File System Management: Organises data into hierarchical folders and files, keeps track of storage locations, and manages access permissions.
  • Device Management: Uses device drivers to translate high-level operating system commands into specific hardware signals for peripherals.
  • Security and User Authentication: Controls access to the computer using user accounts, passwords, and file permission settings.

The von Neumann Architecture and the Fetch-Decode-Execute Cycle

Most general-purpose computers follow the von Neumann architecture. Its key principle is that program instructions and data share the same main memory and communication buses, rather than being kept in separate storage units.

The Central Processing Unit (CPU) fetches, decodes, and executes instructions. It contains three primary components:

  • Control Unit (CU): Manages the execution of instructions. It directs the flow of data within the CPU, coordinates hardware signals, and decodes instruction opcodes.
  • Arithmetic Logic Unit (ALU): Carries out arithmetic calculations (such as addition and subtraction) and logical evaluations (AND, OR, NOT, and comparisons like <, >).
  • Registers: Very fast, very small storage locations inside the CPU itself. Key registers include:
  • Program Counter (PC): Holds the memory address of the next instruction waiting to be fetched.
  • Memory Address Register (MAR): Holds the physical memory address currently being read from or written to.
  • Memory Data Register (MDR): Holds the data value or instruction just fetched from memory, or waiting to be written to memory.
  • Instruction Register (IR): Holds the instruction currently being decoded by the CU.
  • Accumulator (ACC): Holds intermediate calculation results produced by the ALU.
CPU containing CU, ALU and registers connects to shared instruction-and-data memory through address, data and control paths.
CPU containing CU, ALU and registers connects to shared instruction-and-data memory through address, data and control paths.

The Fetch-Decode-Execute (FDE) Cycle

The CPU runs instructions in a continuous cycle:

  1. Fetch: The memory address in the PC is copied into the MAR. The CU sends a read signal to RAM along the control bus. The instruction at that memory address is returned via the data bus into the MDR, and then copied into the IR. The PC increments immediately to hold the address of the next instruction in sequence.
  2. Decode: The CU decodes the opcode in the IR to determine what operation must occur and what data operands are needed.
  3. Execute: The CU directs the necessary components to complete the task. If mathematical or logical operations are required, the ALU processes them and stores the result in the Accumulator. If data must be saved to RAM, it is sent via the MDR.

Tracing the FDE Cycle with a Simple Program

Consider a program with instructions at three sequential memory addresses: address 0 holds LOAD 5, address 1 holds ADD 6, and address 2 holds STORE 7. In RAM, memory address 5 contains the value 12, and address 6 contains the value 30.

Cycle StepPCMARMDRIRACCExplanation
Start0---0CPU begins at instruction address 0.
Fetch 110LOAD 5LOAD 50Address 0 is fetched; PC increments to 1.
Execute 11512LOAD 512Contents of address 5 (12) are loaded into ACC.
Fetch 221ADD 6ADD 612Address 1 is fetched; PC increments to 2.
Execute 22630ADD 642ALU adds contents of address 6 (30) to ACC (12 + 30 = 42).
Fetch 332STORE 7STORE 742Address 2 is fetched; PC increments to 3.
Execute 33742STORE 742ACC value (42) is written to memory address 7 via the MDR.

Processor Performance and Memory Hierarchy

Factors Influencing Processor Performance

  • Clock Speed: The number of electrical pulses the CPU clock generates per second, measured in hertz (Hz). A 3 GHz processor completes three billion clock cycles each second. A higher clock speed allows more instructions to be executed per second, provided the CPU is not stalled waiting for memory.
  • Cache: A small bank of high-speed memory located directly on or beside the CPU core that stores frequently accessed instructions and data. A larger cache means the CPU finds more of its required data close by, reducing time spent waiting for slower RAM.
  • Number of Cores: A core is an independent processing unit containing its own CU, ALU, and registers. Multiple cores allow parallel processing of separate instruction streams, but overall performance doubles only if software is specifically written to divide its workload across multiple threads.

Memory and Storage Hierarchy

Computer memory balances access speed, capacity, and cost per unit.

LevelVolatilityLocationSpeedPurpose
RegistersVolatileInside the CPUFastestHolds immediate operands, addresses, and calculation values
CacheVolatileNext to the CPU coreVery fastHolds frequently repeated loop instructions and active data
RAMVolatileMain system boardFastHolds operating system files and active programs currently running
ROMNon-volatileSystem board chipModerateHolds permanent startup instructions (BIOS/UEFI bootstrap loader)
Secondary StorageNon-volatileDrive bay / internal busSlowerProvides long-term persistent storage for files, applications, and the OS

Primary Memory: RAM vs ROM

  • Random Access Memory (RAM): The computer's main working memory. The CPU can read from and write to any location directly in any order. It is volatile, meaning all stored data is erased when power is lost.
  • Read-Only Memory (ROM): Memory that can be read by the CPU but cannot be altered during standard operation. It is non-volatile, retaining its contents permanently without electrical power. It stores the bootstrap loader used to start the computer.

Secondary Storage: SSD vs HDD

Because RAM loses its data on shutdown, non-volatile secondary storage is required for long-term file retention:

  • Solid-State Drives (SSDs): Store data electronically using flash memory chips with no moving parts. They offer faster read/write speeds, lower power consumption, and greater resistance to physical shocks.
  • Hard Disk Drives (HDDs): Store data magnetically on rotating platters read by moving mechanical heads. They offer a lower cost per gigabyte for high capacities but operate much more slowly and are sensitive to physical impacts.

Basic Electronics, Logic Gates, and Binary Rationale

Electrical Fundamentals and Ohm's Law

Digital computing relies on fundamental electrical quantities:

  • Voltage (VV): The electrical potential difference driving electric charge through a circuit, measured in volts (V).
  • Current (II): The rate of flow of electric charge, measured in amperes (A).
  • Resistance (RR): The opposition to the flow of electric current, measured in ohms (Ω\Omega). Resistors limit current to protect delicate electronic components, such as LEDs.
  • Ohm's Law: Relates these three properties: V=I×RV = I \times R. For instance, if an LED circuit runs on a 3 V3\text{ V} supply and must not exceed 0.015 A0.015\text{ A} (15 mA15\text{ mA}) of current, the required resistance is R=VI=30.015=200ΩR = \frac{V}{I} = \frac{3}{0.015} = 200\,\Omega.
  • Capacitors: Store and release electrical charge to smooth out voltage spikes and build dynamic memory cells.
  • Transistors: Microscopic semiconductor switches. Applying a voltage to the control gate allows current to pass (switch ON); removing the voltage stops current flow (switch OFF).

Why Computers Use Binary

Computers use binary (bits 0 and 1) because electronic circuits function most reliably with two distinct physical states: high voltage (such as +3.3 V+3.3\text{ V} or +5 V+5\text{ V} representing 1) and low voltage (0 V0\text{ V} representing 0).

If a circuit had to differentiate between ten discrete voltage levels (one for each decimal digit), the margins between levels would be very narrow. Slight electrical noise, heat fluctuations, or component aging would easily cause one level to be misread as another. With only two states, there is a wide voltage margin, ensuring small electrical variations do not flip a 1 into a 0.

Schematic voltage scales compare two widely separated binary levels with ten closely spaced levels under equal small disturbances.
Schematic voltage scales compare two widely separated binary levels with ten closely spaced levels under equal small disturbances.

Logic Gates and Truth Tables

Transistors are combined to build logic gates, which evaluate Boolean logic rules:

Input AAInput BBNOT AAAND (ABA \cdot B)OR (A+BA + B)NAND (AB\overline{A \cdot B})NOR (A+B\overline{A + B})XOR (ABA \oplus B)
00100110
01101101
10001101
11011000
  • NOT: Inverts the single input bit.
  • AND: Outputs 1 only when both inputs are 1.
  • OR: Outputs 1 when one or both inputs are 1.
  • NAND: Outputs 0 only when both inputs are 1 (inverse of AND).
  • NOR: Outputs 1 only when both inputs are 0 (inverse of OR).
  • XOR: Outputs 1 when inputs differ; outputs 0 when they match.

Combinational Circuits: The Half-Adder and Full Adder

A half-adder sums two 1-bit binary inputs (AA and BB) to produce a Sum (SS) and a Carry (CC):

  • Carry (CC): C=A AND BC = A \text{ AND } B
  • Sum (SS): S=AB=(NOT A AND B) OR (A AND NOT B)S = A \oplus B = (\text{NOT } A \text{ AND } B) \text{ OR } (A \text{ AND NOT } B)

When A=1A = 1 and B=1B = 1, binary addition gives 1+1=1021 + 1 = 10_2, giving C=1C = 1 and S=0S = 0. Two half-adders combined with an OR gate form a full adder, which accepts an additional carry-in bit so multi-bit numbers can be added together.

Inputs A and B feed an AND carry path and two complementary AND paths joined by OR to produce the sum.
Inputs A and B feed an AND carry path and two complementary AND paths joined by OR to produce the sum.

Multi-Input Logic Circuit Truth Table

To build a truth table for an unfamiliar combinational circuit, list all 2n2^n combinations of the nn inputs in binary order, add columns for intermediate gates, and determine the final output.

For the circuit Q=(A AND B) OR (NOT C)Q = (A \text{ AND } B) \text{ OR } (\text{NOT } C):

A and B enter an AND gate; C enters a NOT gate; both intermediate outputs enter an OR gate producing Q.
A and B enter an AND gate; C enters a NOT gate; both intermediate outputs enter an OR gate producing Q.
AABBCCA AND BA \text{ AND } BNOT C\text{NOT } CQQ
000011
001000
010011
011000
100011
101000
110111
111101

Number Systems: Binary, Decimal, and Hexadecimal Conversions

While computers store and compute entirely in binary, programmers often write values in hexadecimal (base 16) because it is much more compact. One hexadecimal digit represents a 4-bit binary group (a nibble). This makes values easier to read, quicker to write, and less prone to manual transcription errors. Hexadecimal is widely used for RGB colour codes (such as #FF0000 for red), MAC addresses, and memory locations.

Hexadecimal uses digits 09 and letters AF, where A=10,B=11,C=12,D=13,E=14,F=15\text{A}=10, \text{B}=11, \text{C}=12, \text{D}=13, \text{E}=14, \text{F}=15.

1. Decimal to Binary

Repeatedly divide the decimal number by 2 and note the integer remainders. Read the remainders from bottom to top (most significant bit to least significant bit).

Example: Convert 531053_{10} to binary:

53÷2=26remainder 126÷2=13remainder 013÷2=6remainder 16÷2=3remainder 03÷2=1remainder 11÷2=0remainder 1\begin{aligned} 53 \div 2 &= 26 \quad \text{remainder } 1 \\ 26 \div 2 &= 13 \quad \text{remainder } 0 \\ 13 \div 2 &= 6 \quad \text{remainder } 1 \\ 6 \div 2 &= 3 \quad \text{remainder } 0 \\ 3 \div 2 &= 1 \quad \text{remainder } 1 \\ 1 \div 2 &= 0 \quad \text{remainder } 1 \end{aligned}

Reading bottom to top gives 5310=110101253_{10} = 110101_2 (or padded to an 8-bit byte: 00110101).

2. Binary to Hexadecimal

Group the bits into sets of four starting from the right (least significant bit). Pad the leftmost group with leading zeros if it has fewer than four bits. Convert each nibble into its hexadecimal character.

Example: Convert 11011011211011011_2 to hexadecimal:

  • Split into nibbles: 1101 and 1011
  • Left nibble: 11012=8+4+0+1=1310=D161101_2 = 8 + 4 + 0 + 1 = 13_{10} = \text{D}_{16}
  • Right nibble: 10112=8+0+2+1=1110=B161011_2 = 8 + 0 + 2 + 1 = 11_{10} = \text{B}_{16}
  • Result: DB16\text{DB}_{16}

3. Hexadecimal to Binary

Replace each hexadecimal character with its direct 4-bit binary equivalent.

Example: Convert 7F167\text{F}_{16} to binary:

  • 716=011127_{16} = 0111_2
  • F16=1510=11112\text{F}_{16} = 15_{10} = 1111_2
  • Combine the nibbles: 7F16=0111111127\text{F}_{16} = 01111111_2

4. Hexadecimal to Decimal

Multiply each digit by its power of 16 (160,161,162,16^0, 16^1, 16^2, \dots) from right to left and add the products.

Example: Convert 3C163\text{C}_{16} to decimal:

(3×161)+(12×160)=48+12=6010(3 \times 16^1) + (12 \times 16^0) = 48 + 12 = 60_{10}

5. Decimal to Hexadecimal

Divide the decimal number by 16 repeatedly, writing remainders in hex notation from bottom to top.

Example: Convert 18810188_{10} to hexadecimal:

  • 188÷16=11188 \div 16 = 11 remainder 1212 (12=C1612 = \text{C}_{16})
  • 11÷16=011 \div 16 = 0 remainder 1111 (11=B1611 = \text{B}_{16})
  • Result: BC16\text{BC}_{16}

Inputs, Embedded Systems, and Automation

Analogue vs Digital Inputs

  • Digital Inputs: Electrical signals that exist in only one of two discrete states—completely ON (1, typically 3.3 V or 5 V) or completely OFF (0, 0 V). Examples include push buttons, switches, and digital motion sensors.
  • Analogue Inputs: Signals that vary continuously over time across an electrical range. Examples include light-dependent resistors (light level), thermistors (temperature), and potentiometers (rotational angle).

Because microprocessors operate only on binary numbers, an Analogue-to-Digital Converter (ADC) must sample the continuous analogue voltage and convert it into a discrete digital integer (such as 0 to 1023 for a 10-bit converter).

Schematic plots compare a continuous analogue voltage with a two-state digital signal and show analogue samples becoming discrete ADC readings.
Schematic plots compare a continuous analogue voltage with a two-state digital signal and show analogue samples becoming discrete ADC readings.

Embedded Systems

An embedded system is a dedicated computer built into a larger mechanical or electrical system to perform a specific dedicated control function. Examples include domestic washing machines, automotive anti-lock braking systems (ABS), and smart thermostats. They rely on microcontrollers integrating a CPU, memory, and programmable input/output pins on a single chip, built for low power draw and automated operation.

Automated Embedded Program (MicroPython)

In the Applied Learning Task 4 context, students use embedded code to read sensor data, store values, and control outputs automatically. The BBC micro:bit MicroPython module uses read_analog() (using the American spelling in code) to read pin voltages between 0 and 1023.

from microbit import *

readings = []                       # list to store analogue data
for i in range(10):
    level = pin1.read_analog()      # analogue input: reads 0 to 1023
    readings.append(level)          # store the reading
    sleep(1000)                     # wait 1 second between samples

average = sum(readings) / len(readings)

if average < 300:                   # threshold check for dark conditions
    pin0.write_digital(1)           # digital output: turn LED on
else:
    pin0.write_digital(0)           # digital output: turn LED off

Execution Trace: If the ten recorded readings are [250, 260, 240, 255, 245, 250, 260, 240, 250, 250], their sum is 2500 and the average is 2500÷10=2502500 \div 10 = 250. Because 250<300250 < 300, pin 0 outputs a high voltage (1) and turns on the LED without human intervention.

Networks, the Internet, and Communication Protocols

The Internet vs The World Wide Web

These terms refer to distinct layers of computer networking:

  • The Internet: The global physical infrastructure of interconnected networks, transmission cables (undersea fibre-optic cables, copper lines), routers, switches, servers, and user devices that transports raw data packets worldwide.
  • The World Wide Web (WWW): A distributed information service running on top of the Internet infrastructure. It consists of hyperlinked multimedia documents and web applications accessed via a web browser using HTTP.

Key Network Hardware Components

  • Server: A high-capacity computer that stores network resources (web pages, files, databases) and serves them to requesting clients.
  • Client: A user device (such as a laptop or smartphone) that requests services or content from a server.
  • Router: A networking device that inspects the destination IP address on incoming data packets and directs them across different networks towards their destination.
  • Switch: A device that connects computers together within a single local area network (LAN), directing frames directly to the intended destination device using MAC addresses.
  • Network Interface Card (NIC): Hardware inside a computer that allows it to transmit and receive data over a physical cable or wireless (Wi-Fi) signal.

The TCP/IP Protocol Model

Network communication is organised into four hierarchical layers. Data passes down these layers on the sending device and back up through them on the receiving device:

  1. Application Layer: Interacts directly with software applications. Protocols like HTTP create requests for web documents, while VoIP handles audio and video streaming data.
  2. Transport Layer (TCP): Manages end-to-end communication reliability. TCP divides outgoing data into numbered packets, checks packet integrity, requests retransmission of lost packets, and reassembles them in order on the receiving computer.
  3. Internet Layer (IP): Handles packet addressing and routing across networks. IP adds the sender's and receiver's source and destination IP addresses to each packet header so routers can navigate them across different networks.
  4. Link Layer (Network Access): Converts packets into physical electrical, optical, or radio signals and transmits them over the local physical medium (Ethernet cable, Wi-Fi, or fibre).

Tracing a Client-Server Request

  1. A user enters a web address into a browser on the client computer.
  2. The browser generates an HTTP request at the Application layer.
  3. TCP at the Transport layer splits the request into numbered packets.
  4. IP at the Internet layer attaches source and destination IP addresses to each packet.
  5. The Link layer transmits the electrical or radio signals onto the local connection.
  6. Routers inspect each packet's destination IP address and route it across the Internet to the target server.
  7. The web server processes the request and sends the webpage back as an HTTP response in packets.
  8. TCP on the client machine confirms all packets arrived, reassembles them in order, and the browser renders the webpage.

Internet Protocols: HTTP, TCP, IP, and VoIP

  • HTTP (Hypertext Transfer Protocol): An application layer protocol used by web browsers to request and receive web pages. HTTPS adds encryption, ensuring that intercepted packets cannot be read or altered.
  • TCP (Transmission Control Protocol): Guarantees reliable, ordered delivery of data by requiring acknowledgements and retransmitting lost packets.
  • IP (Internet Protocol): Directs packets across network boundaries using numerical IP addresses.
  • VoIP (Voice over Internet Protocol): Transmits digitised voice calls over IP networks. Unlike TCP-based file transfers, VoIP prioritises real-time speed over absolute delivery perfection; dropped packets are skipped rather than retransmitted to prevent audible audio lag.

Key terms

Hardware
The physical, tangible components of a computer system, such as the CPU, RAM, storage drives, and input/output devices.
Software
The intangible programs, data, and instructions that control computer hardware and direct its operations.
System Software
Programs designed to run and manage computer hardware directly, including operating systems, device drivers, and maintenance utilities.
Application Software
Programs designed to help the user perform specific tasks, such as web browsers, spreadsheets, and games.
Von Neumann Architecture
A computer design in which program instructions and data share the same main memory and are fetched, decoded, and executed sequentially by the CPU.
Control Unit (CU)
The CPU component that directs instruction execution, coordinates the movement of data, and decodes instruction opcodes.
Arithmetic Logic Unit (ALU)
The CPU component that performs arithmetic operations (addition, subtraction) and Boolean logical operations.
Program Counter (PC)
A CPU register that stores the memory address of the next instruction waiting to be fetched from primary memory.
Accumulator (ACC)
A CPU register that temporarily holds intermediate arithmetic and logical results produced by the ALU.
RAM
Random Access Memory; fast, volatile main working memory directly accessible by the CPU to read and write active programs and data.
ROM
Read-Only Memory; non-volatile primary memory holding permanent startup instructions (BIOS/firmware) that cannot be modified during normal operation.
Cache
Small, high-speed volatile memory located on or close to the CPU that stores frequently accessed instructions and data to reduce latency.
Clock Speed
The frequency of electrical pulses generated by the CPU clock oscillator, measured in hertz (Hz), which governs the timing of instruction execution.
Transistor
A semiconductor component acting as an electronically controlled switch, turning current on or off to represent binary 1 and 0.
Logic Gate
A basic electronic circuit formed from transistors that takes one or more binary inputs and outputs a binary signal based on a Boolean rule.
Nibble
A group of four binary bits, represented by a single hexadecimal character.
Embedded System
A dedicated computer system built into a larger machine or device to perform a specific dedicated control task.
Analogue-to-Digital Converter (ADC)
An electronic circuit that samples continuous analogue sensor voltages and converts them into discrete binary numbers for a processor.
The Internet
The global physical infrastructure of interconnected computer networks, cables, routers, switches, and servers.
World Wide Web (WWW)
An information service of hyperlinked web pages and multimedia documents running on top of the Internet infrastructure.
Transmission Control Protocol (TCP)
A transport layer protocol that splits data into packets, ensures reliable arrival, retransmits lost packets, and reorders them upon delivery.
Internet Protocol (IP)
A network layer protocol responsible for logical addressing and routing data packets across interconnected networks.
Voice over Internet Protocol (VoIP)
An application protocol that packetises and transmits real-time voice and video communication across IP networks.

Check yourself

  1. Is a USB flash drive classified as hardware or software, and is a printer driver classified as system software or application software?

    A USB flash drive is hardware (a physical storage device). A printer driver is system software (it enables the operating system to communicate with the hardware printer).

  2. What happens to the Program Counter during the fetch stage of the FDE cycle?

    The address in the PC is copied to the Memory Address Register (MAR), and the PC immediately increments to hold the memory address of the next sequential instruction.

  3. Convert the hexadecimal number 2F to both decimal and 8-bit binary notation.

    Decimal: (2 * 16) + 15 = 47. Binary: 2 = 0010 and F = 1111, giving 00101111.

  4. Why does adding more CPU cores not automatically make every program run twice as fast?

    Software must be specifically programmed to divide tasks across multiple threads. If an algorithm is sequential, other cores sit idle waiting for preceding steps to complete.

  5. Name the four layers of the TCP/IP model in order from highest to lowest.

    1. Application layer; 2. Transport layer; 3. Internet layer (or Network layer); 4. Link layer (or Network Access layer).

  6. An LED circuit uses a 5 V supply and must carry a current of no more than 0.02 A (20 mA). Using Ohm's law, calculate the minimum resistance needed.

    R = V / I = 5 / 0.02 = 250 ohms.

You've read the theory
Now turn it into exam marks.

Practise computer systems as questions and flashcards in Studytok, with explanations when you get stuck.

Continue for free →
  1. Read the notes
    7 sections
  2. 2
    Test yourself
    Questions marked instantly
  3. 3
    Keep revising
    Flashcards and exam-style practice