Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Computer Science
  3. ›A1 Computer fundamentals
  4. ›A1.1 Computer hardware and operation

IB Computer Science · A1 · Computer fundamentals

A1.1 Computer hardware and operation

Describe the main components of a computer system, explain how the CPU runs instructions, compare RAM and ROM, and identify common input, output and storage devices.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A computer system is built from a few core components
  1. 1A computer system is built from a few core components
  2. 2The CPU contains a control unit, an ALU and registers
  3. 3Each instruction passes through fetch, decode and execute
  4. 4RAM and ROM differ in volatility and purpose
  5. 5Devices move data into, out of and around a computer
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: A computer system is built from a few core components

When you type a message, several parts of a computer work together. Some take in data, one processes it, and others store or show the result. The physical parts make up the hardware. Software, meaning the programs, tells the hardware what to do.

The central processing unit (CPU) carries out program instructions. It reads them from main memory, which holds the programs and data currently in use. Input devices send data in, and output devices present results. Storage keeps data when the power is off.

Key terms · tap one for its definition

hardware

Hardware is the set of physical components of a computer system, such as the processor, memory and devices.

central processing unit

The central processing unit (CPU) is the component that fetches, decodes and executes program instructions.

Part 1 done

2

Part 2 of 5: The CPU contains a control unit, an ALU and registers

Now look inside the CPU, where three parts do most of the work. The control unit directs the flow of data and signals the other parts when to act. The arithmetic logic unit (ALU) carries out calculations and logical comparisons.

Each small storage location inside the CPU is called a register. Registers hold the instruction, data or address being used at that moment. Registers are much faster than main memory, but there are very few of them.

Exam tip

Name the part and its job together. ‘The ALU performs arithmetic and logic operations’ earns more than ‘the ALU does the maths’.

Key terms · tap one for its definition

control unit

The control unit is the part of the CPU that directs the fetching, decoding and execution of instructions.

arithmetic logic unit

The arithmetic logic unit (ALU) is the part of the CPU that performs arithmetic operations and logical comparisons.

register

A register is a very small, very fast storage location inside the CPU that holds an instruction, data or an address.

Part 2 done

Quick check

One question on the part you just read

Easy

Identify the component that keeps programs and files when the power is switched off.
Show answer and explanation

Answer: D · Worked explanation

Secondary storage, such as a solid-state drive, keeps programs and files without power. RAM is volatile, so its contents are lost when power is removed. A register holds only a few values for immediate use, and the control unit directs operations rather than storing files.
3

Part 3 of 5: Each instruction passes through fetch, decode and execute

Now that the parts are named, follow one instruction through them. The fetch–decode–execute cycle is how the CPU runs a program, one instruction at a time. A register called the program counter holds the address of the next instruction.

  • Fetch: the instruction at that address is copied from memory into the CPU, and the counter moves on.
  • Decode: the control unit works out which operation is needed and which data it uses.
  • Execute: the ALU or another part carries out the operation and stores the result.
Figure 1. Each instruction passes through the same three steps, and the loop then starts again.
Go deeperCache, cores and clock speed

Cache is a small, very fast memory between the CPU and RAM. It keeps copies of recently used instructions and data, so the CPU waits less often.

A CPU with several cores has several processing units, and each can run instructions. Clock speed, measured in hertz, sets how many cycles each core can attempt every second. A higher figure does not always mean a faster computer.

Key terms · tap one for its definition

fetch–decode–execute cycle

The fetch–decode–execute cycle is the repeated sequence in which the CPU fetches an instruction from memory, decodes it and executes it.

program counter

The program counter is a register that holds the memory address of the next instruction to be fetched.

Part 3 done

4

Part 4 of 5: RAM and ROM differ in volatility and purpose

The CPU needs somewhere to find its instructions, which brings us to memory. RAM is the main memory that holds programs and data while they are in use. It can be read and written quickly, but it is volatile, so it loses its contents when power is removed.

ROM holds instructions that must stay in place, such as the code that starts a computer. Its contents survive when power is removed, and they are not normally changed during use.

RAM compared with ROM

FeatureRAMROM
Contents when power is removedLostKept
Normal useRead and writtenRead only
Typical contentsPrograms and data in useStart-up instructions
Feature
Contents when power is removed
RAM
Lost
ROM
Kept
Feature
Normal use
RAM
Read and written
ROM
Read only
Feature
Typical contents
RAM
Programs and data in use
ROM
Start-up instructions

Common mistake

A document you have typed but not saved exists only in RAM. If the power fails, it is lost.

Key terms · tap one for its definition

RAM

RAM (random-access memory) is the main memory that holds the programs and data currently in use and can be read and written.

volatile

Volatile memory is memory that loses its stored contents when the power supply is removed.

ROM

ROM (read-only memory) is non-volatile memory that holds fixed instructions, such as start-up code, and is not normally written to during use.

Part 4 done

Quick check

One question on the part you just read

Easy

State which part of the CPU performs arithmetic operations and logical comparisons.
Show answer and explanation

Answer: C · Worked explanation

The arithmetic logic unit carries out calculations and logical comparisons. The control unit is often confused with it, but it directs the other parts instead of calculating. A register only holds values, and the program counter holds the address of the next instruction.
5

Part 5 of 5: Devices move data into, out of and around a computer

Data has to reach the computer, and results have to come back out. An input device sends data to the computer, such as a keyboard, mouse, microphone or camera. An output device presents results to the user, such as a monitor, speaker or printer.

Long-term data lives in secondary storage, which keeps programs and files when the power is off. Examples are a hard disk drive, a solid-state drive and an optical disc.

Exam tip

Link each device to its role. Say what data it sends in, shows or keeps.

A solid-state drive has no moving parts and reads quickly. A hard disk drive uses spinning magnetic platters and usually costs less per gigabyte.

Key terms · tap one for its definition

input device

An input device is a hardware device that sends data from the user or the environment into a computer.

output device

An output device is a hardware device that presents the results of processing to the user.

secondary storage

Secondary storage is non-volatile storage, separate from main memory, that keeps programs and files for long-term use.

Note read

Check your recall[15 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Describe[2 marks]

    Describe the roles of the control unit and the arithmetic logic unit in the CPU.

    Show mark schemeHide mark scheme

    Model answer

    The control unit directs the fetching, decoding and execution of instructions and signals the other parts. The ALU carries out arithmetic operations and logical comparisons.

    • 1 mark for stating that the control unit directs or coordinates the steps of processing
    • 1 mark for stating that the ALU performs calculations and logical comparisons
  2. 2.Outline[3 marks]

    Outline the fetch–decode–execute cycle.

    Show mark schemeHide mark scheme

    Model answer

    The instruction at the address held in the program counter is fetched from memory. The control unit decodes it to find the operation needed. The operation is then executed, for example by the ALU.

    • 1 mark for stating that the instruction is fetched from memory using the address in the program counter
    • 1 mark for stating that the instruction is decoded to work out the operation and data needed
    • 1 mark for stating that the operation is then executed
  3. 3.Distinguish[3 marks]

    Distinguish between RAM and ROM.

    Show mark schemeHide mark scheme

    Model answer

    RAM holds programs and data in use, can be read and written, and is volatile. ROM holds fixed instructions such as start-up code, is normally read only, and keeps its contents when power is removed.

    • 1 mark for stating that RAM is volatile but ROM keeps its contents without power
    • 1 mark for stating that RAM is read and written but ROM is normally only read
    • 1 mark for giving the typical contents of each, such as programs in use for RAM and start-up instructions for ROM
  4. 4.Explain[3 marks]

    Explain why a computer needs secondary storage as well as RAM.

    Show mark schemeHide mark scheme

    Model answer

    RAM is volatile, so it loses its contents when power is removed. Secondary storage keeps programs and files without power. The computer can then load them into RAM again when it is next used.

    • 1 mark for stating that RAM loses its contents when power is removed
    • 1 mark for stating that secondary storage keeps programs and files without power
    • 1 mark for linking this to files being available again after the computer is switched off
  5. 5.Identify[3 marks]

    Identify one input device, one output device and one secondary storage device.

    Show mark schemeHide mark scheme

    Model answer

    Input device: a keyboard. Output device: a monitor. Secondary storage device: a solid-state drive.

    • 1 mark for identifying a correct input device such as a keyboard, mouse or microphone
    • 1 mark for identifying a correct output device such as a monitor, speaker or printer
    • 1 mark for identifying a correct secondary storage device such as a hard disk drive or solid-state drive
  6. 6.State[1 mark]

    State the role of the program counter.

    Show mark schemeHide mark scheme

    Model answer

    It holds the address of the next instruction to be fetched.

    • 1 mark for stating that it holds the memory address of the next instruction

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy·Identify[1 mark]

Identify the output device.
Show answer and explanation

Answer: B · Worked explanation

A speaker presents sound to the user, so it is an output device. A microphone, a camera and a keyboard all send data into the computer, which makes them input devices. Judge a device by the direction in which the data travels.
4.

Medium·Predict[1 mark]

The program counter holds 120 and each instruction occupies one address. Predict the value it holds once the instruction has been fetched.
Show answer and explanation

Answer: C · Worked explanation

After the fetch, the counter moves on to the address of the next instruction. With one address per instruction, that is 121. The value 120 is what the counter held before the fetch, and 119 would mean it had moved backwards, which does not happen in normal running.
5.

Medium[1 mark]

Which statement about RAM is correct?
Show answer and explanation

Answer: A · Worked explanation

RAM is the main memory for programs and data in use, and it is volatile. The claim that it keeps its contents without power is false for exactly that reason. Read-only start-up code describes ROM, and calculations are done by the ALU, not by memory.
6.

Medium·Identify[1 mark]

Identify the memory type best suited to holding the instructions that start a computer.
Show answer and explanation

Answer: B · Worked explanation

ROM holds fixed instructions, such as start-up code, and keeps them when power is removed. RAM would lose the start-up instructions every time the power was switched off. A register is too small and temporary, and the ALU performs calculations instead of storing instructions.
7.

Medium·Predict[1 mark]

A student types an essay but has not saved it. The power fails. Predict what happens to the essay.
Show answer and explanation

Answer: D · Worked explanation

An unsaved document exists only in RAM, which is volatile, so it is lost when the power fails. Saving would have copied it to secondary storage. The control unit does not store copies, and ROM is not normally written to during use.
8.

Hard[2 marks]

Which statement correctly compares registers with RAM?
Show answer and explanation

Answer: A · Worked explanation

Registers are inside the CPU, very fast and very few, so each holds only a value or address in use. RAM is larger but slower. The claim that registers hold more than RAM is wrong because there are so few, and registers are not part of main memory.
9.

Hard·Deduce[2 marks]

Deduce which sequence describes one cycle in which an instruction is copied from memory, found to be an addition, and then carried out.
Show answer and explanation

Answer: C · Worked explanation

The instruction is fetched from memory, the control unit decodes it to find that an addition is needed, and the ALU executes it by adding the values. Swapping the roles is tempting but wrong, because the ALU calculates and does not direct the fetching or decoding.
10.

Hard[2 marks]

A company must store a large archive of rarely used files as cheaply as possible. Which choice is most suitable?
Show answer and explanation

Answer: D · Worked explanation

A hard disk drive is secondary storage that usually costs less per gigabyte, so it suits a large archive. RAM is volatile and loses data without power. ROM is not normally written to during use, and registers are very few and tiny.

Keep going

Next topicA1.2 Data representation and logic

More in A1 · Computer fundamentals

  1. A1.1Computer hardware and operationNotes · 10 questions
  2. A1.2Data representation and logicNotes · 10 questions
  3. A1.3Operating and control systemsNotes · 10 questions
  4. A1.4TranslationNotes · 10 questions· HL only

All IB Computer Science topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1A computer system is built from a few core components
  2. 2The CPU contains a control unit, an ALU and registers
  3. 3Each instruction passes through fetch, decode and execute
  4. 4RAM and ROM differ in volatility and purpose
  5. 5Devices move data into, out of and around a computer
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe