Long Description

At the top left is the circular orange logo with text: MY REVISION NOTES and the Hodder Education logo beneath it. At the top right, an orange banner contains the text O C R. Below that is the heading: A Level. Title: COMPUTER SCIENCE SECOND EDITION appears in bold grey text in the centre. Underneath, three bullet points in orange read: Plan and organise your revision, Reinforce skills and understanding, and Practise exam-style questions. The main graphic is a grey microchip with a 3-D metallic cityscape emerging from its surface. Circuit-like lines extend outward from the microchip in all directions. At the bottom right, the authors’ names–Jason Pitt, George Rouse, and Sean O’Byrne–are listed in black. The left margin of the cover displays the rotated text: MY REVISION NOTES O C R A Level COMPUTER SCIENCE. At the bottom are the Boost logo and the Hodder Education logo with the tagline: LEARN MORE.

Long Description

Promotional poster from Hodder Education with the heading: Looking to boost your learning, in bold white text on a dark blue background. Subheading in turquoise reads: Ensure you’re on track to excel in your studies with trusted A-level study and revision resources from Hodder Education. The poster is divided into four coloured sections: My Revision Notes: Text describes these resources as structured guides across various subjects to test knowledge and improve written answers through topic summaries and exam-style questions. Includes covers of Geography and Politics revision notes. Link: w w w dot hodder education dot c o dot u k forward slash m r n. Label: Also available as eTextbooks Student Guides: These offer clear topic-by-topic course summaries and sample questions. Covers of Religious Studies and Media Studies guides are shown. Link: w w w dot hodder education dot c o dot u k forward slash student guides. Label: Also available as eTextbooks. Student Workbooks: Emphasises building independent learning with write-in exercises and activities. Covers shown include A Q A Computer Science and Pearson Edexcel Economics. Link: w w w dot hodder education dot c o dot u k forward slash student workbooks. Label: Answers to workbook questions available online at hodder plus dot c o dot u k.

Magazines: Described as resources for deepening subject understanding with expert-written articles and exam advice. Covers of Chemistry Review and English Review magazines are displayed. Link: w w w dot hodder education dot c o dot u k forward slash magazines. Label: Also available as e Magazines. At the bottom, a blue banner reads: For more information about all our revision titles and series across a wide range of subjects, visit: w w w dot hodder education dot c o dot u k forward slash revision. Bottom right features the Hodder Education logo with the slogan LEARN MORE.

Long Description

At the top left is a circular orange logo containing the text: MY REVISION NOTES, with the word NOTES in orange and the rest in black. Next to it is an orange banner containing O C R in white text. Below that is A-level written in orange. Main title is COMPUTER SCIENCE SECOND EDITION. The authors' names–George Rouse, Jason Pitt and Sean O’Byrne–are listed in smaller black text below. At the bottom, the Boost logo appears on the left and the Hodder Education logo with the tagline AN HACHETTE U K COMPANY appears on the right.

Every effort has been made to trace all copyright holders, but if any have been inadvertently overlooked, the Publishers will be pleased to make the necessary arrangements at the first opportunity.

Although every effort has been made to ensure that website addresses are correct at time of going to press, Hodder Education cannot be held responsible for the content of any website mentioned in this book. It is sometimes possible to find a relocated web page by typing in the address of the home page for a website in the URL window of your browser.

Hachette UK’s policy is to use papers that are natural, renewable and recyclable products and made from wood grown in well-managed forests and other controlled sources. The logging and manufacturing processes are expected to conform to the environmental regulations of the country of origin.

Orders: please contact Hachette UK Distribution, Hely Hutchinson Centre, Milton Road, Didcot, Oxfordshire, OX11 7HH. Telephone: +44 (0)1235 827827.
Email education@hachette.co.uk. Lines are open from 9 a.m. to 5 p.m., Monday to Friday. You can also order through our website: www.hoddereducation.co.uk

ISBN: 978 1 3983 2547 0
eISBN: 978 1 3983 2525 8

© George Rouse, Jason Pitt and Sean O’Byrne 2021

First published in 2021 by

Hodder Education,

An Hachette UK Company

Carmelite House

50 Victoria Embankment

London EC4Y 0DZ

www.hoddereducation.co.uk

Impression number      10 9 8 7 6 5 4

Year    2025 2024

All rights reserved. Apart from any use permitted under UK copyright law, no part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or held within any information storage and retrieval system, without permission in writing from the publisher or under licence from the Copyright Licensing Agency Limited. Further details of such licences (for reprographic reproduction) may be obtained from the Copyright Licensing Agency Limited, www.cla.co.uk

Cover photo © Holmessu - stock.adobe.com

Illustrations by Aptara, Inc.

Typeset by Aptara, Inc.

Printed in India

A catalogue record for this title is available from the British Library.

Long Description

On the left, the F S C logo shows a stylised tree symbol. Text reads: MIX. Paper, supporting responsible forestry. F S C trademark, C 1 0 4 7 4 0. On the right, the C L A logo contains a check mark and the following text: Schools have a licence to copy one chapter or 5 percent for teaching. Below that is the C L A logo with the words: C L A. Copyright Licensing Agency.

Get the most from this book

Everyone has to decide his or her own revision strategy, but it is essential to review your work, learn it and test your understanding. These Revision Notes will help you to do that in a planned way, topic by topic. Use this book as the cornerstone of your revision and don’t hesitate to write in it — personalise your notes and check your progress by ticking off each section as you revise.

Tick to track your progress

Use the revision planner on pages 4 and 5 to plan your revision, topic by topic. Tick each box when you have:

•  revised and understood a topic

•  tested yourself

•  practised the exam questions and gone online to check your answers and complete the quick quizzes

You can also keep track of your revision by ticking off each topic heading in the book. You may find it helpful to add your own notes as you work through each topic.

Long Description

Left page is titled: My Revision Planner, and lists revision topics in a numbered outline format, covering sections such as systems architecture, memory, storage, wired and wireless networks, system security, algorithms, programming, and logic. Each topic is followed by coloured columns filled with dots, representing the learner’s self-assessed confidence or completion. These columns are colour-coded–blue, orange, and green–likely corresponding to levels such as not started, in progress, and completed.

The right page is titled: Countdown to my exams, and contains several coloured boxes offering study advice and planning tips. The top blue box titled: Learning tips, offers revision techniques. The red box titled: Prioritise what to revise, suggests focusing on weaker areas. A green box below titled: Exam techniques provides strategies for answering questions effectively. Another box outlines a sample plan with a short, focused revision structure.

Each section is designed to support student organisation, motivation, and success in the lead-up to exams. Page numbers are visible at the bottom corners: 120 on the left and 121 on the right. Tab-like navigation marks are present along the page edges.

Long Description

Left page is titled: Algorithms, followed by a subheading: Purpose and design of algorithms for a given situation. The content discusses why algorithms are used and how to design them appropriately, using structured explanations and definitions. Text boxes appear throughout in different colours for emphasis–one blue box is titled: Know it! and contains a brief definition; Exam tip! box gives exam-specific guidance. A diagram or box with pseudocode appears lower on the left page.

The right page continues with a focus on: Measurable methods to determine the efficiency of different algorithms. Several boxed notes and tips provide highlights and reminders, such as runtime performance or memory considerations. There are examples of code fragments and short tables comparing algorithms in terms of inputs, steps, or complexity. Highlighted elements include green, yellow, and blue boxes to distinguish learning points and tips.

The page numbers are 118 and 119, and small navigation tabs on the page edges show that this is part of a larger section in a revision guide or educational workbook.

Features to help you succeed

Exam tips

Expert tips are given throughout the book to help you polish your exam technique in order to maximise your chances in the exam.

Typical mistakes

The authors identify the typical mistakes candidates make and explain how you can avoid them.

Now test yourself

These short, knowledge-based questions provide the first step in testing your learning. Answers are at the back of the book.

Definitions and key words

Clear, concise definitions of essential key terms are provided where they first appear.

Key words from the specification are highlighted in bold throughout the book.

Making links

This feature identifies specific connections between topics and tells you how revising these will aid your exam answers.

Exam skills

These summaries highlight how to specific skills identified or applicable in that chapter can be applied to your exam answers.

Revision activities

These activities will help you to understand each topic in an interactive way.

Exam practice

Practice exam questions are provided for each topic. Use them to consolidate your revision and practise your exam skills.

Summaries

The summaries provide a quick-check bullet list for each topic.

Online

Go online to find answers to the exam practice questions and try out the extra quick quizzes at www.hoddereducation.co.uk/myrevisionnotesdownloads

My revision planner

1  The characteristics of contemporary processors, input, output and storage devices

Structure and function of a processor

Types of processor

Input, output and storage

2  Software and software development

Systems software

Applications generation

Software development

Types of programming language

3  Exchanging data

Compression, encryption and hashing

Databases

Networks

Web technologies

4  Data types, data structures and algorithms

Data types

Data structures

Boolean algebra

5  Legal, moral, cultural and ethical issues

Computing-related legislation

Moral and ethical issues

6  Elements of computational thinking

Thinking abstractly

Thinking ahead

Thinking procedurally

Thinking logically

Thinking concurrently

7  Problem solving and programming

Programming techniques

Computational methods

8  Algorithms

Algorithms

Now test yourself answers

Countdown to my exams

6–8 weeks to go

•  Start by looking at the specification — make sure you know exactly what material you need to revise and the style of the examination. Use the revision planner on pages 4 and 5 to familiarise yourself with the topics.

•  Organise your notes, making sure you have covered everything on the specification. The revision planner will help you to group your notes into topics.

•  Work out a realistic revision plan that will allow you time for relaxation. Set aside days and times for all the subjects that you need to study, and stick to your timetable.

•  Set yourself sensible targets. Break your revision down into focused sessions of around 40 minutes, divided by breaks. These Revision Notes organise the basic facts into short, memorable sections to make revising easier.

2–6 weeks to go

•  Read through the relevant sections of this book and refer to the exam tips, summaries, typical mistakes and key terms. Tick off the topics as you feel confident about them. Highlight those topics you find difficult and look at them again in detail.

•  Test your understanding of each topic by working through the ‘Now test yourself’ questions in the book. Look up the answers at the back of the book.

•  Make a note of any problem areas as you revise, and ask your teacher to go over these in class.

•  Look at past papers. They are one of the best ways to revise and practise your exam skills. Write or prepare planned answers to the exam practice questions provided in this book. Check your answers online and try out the extra quick quizzes at www.hoddereducation.co.uk/myrevisionnotesdownloads

•  Use the revision activities to try out different revision methods. For example, you can make notes using mind maps, spider diagrams or flash cards.

•  Track your progress using the revision planner and give yourself a reward when you have achieved your target.

One week to go

•  Try to fit in at least one more timed practice of an entire past paper and seek feedback from your teacher, comparing your work closely with the mark scheme.

•  Check the revision planner to make sure you haven’t missed out any topics. Brush up on any areas of difficulty by talking them over with a friend or getting help from your teacher.

•  Attend any revision classes put on by your teacher. Remember, he or she is an expert at preparing people for examinations.

The day before the examination

•  Flick through these Revision Notes for useful reminders, for example the examiners’ tips, examiners’ summaries, typical mistakes and key terms.

•  Check the time and place of your examination.

•  Make sure you have everything you need — extra pens and pencils, tissues, a watch, bottled water, sweets.

•  Allow some time to relax and have an early night to ensure you are fresh and alert for the examinations.

My exams

Paper 1 Computer systems

Date:…………………………………………….

Time:…………………………………………….

Location:………………………………………….

Paper 2 Algorithms and programming

Date:…………………………………………….

Time:…………………………………………….

Location:………………………………………….

Assessing A level Computer Science

As a student of Computer Science, it is important that you understand three things in relation to the A level examinations:

•  assessment objectives

•  the command words used

•  the nature of the examination papers.

Assessment objectives

•  AO1 You should be able to demonstrate knowledge and understanding of the principles and concepts of computer science, including abstraction, logic, algorithms and data representation.

•  AO2 You must be able to apply your knowledge and understanding to the principles and concepts of computer science, including analysing problems in computational terms.

•  AO3 You must be able to design, program and evaluate computer systems that solve problems, making reasoned judgements about these systems and presenting conclusions.

Command words

Familiarity with the relevant command words is important and helps you to avoid wasting time in the exam room, for example trying to evaluate when there is no requirement for it. The most frequently used command words in the A level papers, along with number of marks for associated questions, are:

•  Calculate: requires you to work out the value of something. A correct final answer, to the required degree of accuracy and with the correct units is required. Working is not always required, but there may be credit for correct working even when the answer is incorrect. (AO1, AO2)

•  Compare: requires you to describe the differences and similarities between two situations. (AO1, AO2)

•  Describe: requires you to set out the characteristics or features of something. (AO1)

•  Discuss: requires you to identify and expand upon points related to different aspects of the situation/system/issue, looking at both sides of the argument. (AO1, AO2)

•  Evaluate: requires you to reach a conclusion based on evidence for all aspects of the situation. (AO1, AO2, AO3)

•  Explain: requires you to provide evidence to explain how a system works or to support a proposition about a situation. In some cases, an appropriate diagram may be used to support your explanation. (AO1, AO2)

The A level exam papers

The Computer Science A level specification is examined through two equally weighted examination papers of 2 hours and 30 minutes duration sat at the end of the course, and a programming project. The papers are each worth 40% of the marks, with the project worth 20%.

Paper 1 Computer systems

There will be a mix of short and long answer questions.

Questions may cover any of the content in section 1 of the specification, computer systems, which includes:

•  computer architecture (including the structure of the central processing unit, memory and storage)

•  software and its development

•  storing and exchanging data (including databases, networks and web technologies)

•  data representation, logic and algorithms

•  legal and ethical issues.

Paper 2 Algorithms and programming

There are two sections and in both sections there will be a mix of short and long answer questions.

Questions may cover any of the content in section 2 of the specification, algorithms and programming, which includes:

•  computational thinking

•  problem solving

•  algorithms (including knowledge of key algorithms and their efficiency).

The two sections are:

•  Section A, worth 100 marks, will contain a mixture of questions, similar in style to paper one.

•  Section B, worth 40 marks, will be based on a scenario that contains information to be used when answering the questions that follow.

Long answer questions

Both papers will contain longer answer questions worth 9 or 12 marks. These questions may require you to link a number of topics together or look at contrasting approaches.

When tackling a longer answer question:

•  Read through the question carefully to ensure you understand what is being asked.

•  Take a moment to consider which part or parts of the specification the question is testing you on and to plan your answer.

•  If there is a scenario, make sure your answer relates the points you are making to it.

•  If you are asked to discuss two approaches, make sure you pay roughly equal attention to both.

•  Where relevant, ensure you give a clear conclusion.

•  Make sure you use technical terminology appropriately.

Programming questions

Both papers will include programming questions. These may require you to write or follow code. The code presented in the exam will be in pseudocode (with the exception of any question in paper one specifically on JavaScript).

The exam board’s style of pseudocode has been used throughout this book. There is a full description of it in the appendix of the specification. It is worth taking a little time to familiarise yourself with it.

When writing pseudocode in answers, you are free to use whatever style you wish and may want to stick with one similar to the language with which you have learned to program.

You should always use sensible variable names and indentation in your pseudocode. Where the meaning of code is not immediately obvious, add comments. In some questions, there may be marks for ensuring your code is easily readable.

Programming project

The project is submitted as a report, containing the details about the process of identifying, analysing, designing, developing, testing and evaluating a solution to a problem using a suitable programming language.

1 The characteristics of contemporary processors, input, output and storage devices

Structure and function of a processor

The central processing unit (CPU) carries out the instructions in computer programs. Essentially it’s what makes a computer a computer! Inside a processor there are billions of transistors (effectively electronic switches). This section looks at how CPUs work and different developments in CPU technology.

Central processing unit (CPU) The central processing unit ‘runs programs’ by continually fetching, decoding and executing instructions.

The arithmetic logic unit, control unit and registers

The main components of the CPU are the arithmetic logic unit, control unit and registers. These are connected to the system’s main memory using pathways called buses.

Arithmetic logic unit

The arithmetic logic unit (ALU) carries out the calculations and logical decisions. The results of its calculations are stored in the accumulator.

Control unit

The control unit (CU) sends out signals to co-ordinate how the processor works. It controls how data moves around parts of the CPU and how it moves between the CPU and memory. Instructions are decoded in the control unit.

Registers

Registers are areas of memory within the processor itself. They can be accessed at extremely fast speeds so can be used by the processor without causing a bottleneck. Registers in the processor that have a specific use are called special purpose registers.

Register A discrete piece of memory built onto the CPU that holds a single piece of data.

The special purpose registers you need to know are listed below.

Register
Purpose

Program counter (PC)
Keeps track of the memory location of the line of machine code being executed. With each iteration of the fetch–decode–execute cycle, it gets incremented to point to the next instruction, allowing the program to be executed in sequence, instruction by instruction. The program counter can also be changed by instructions that alter the flow of control (for example, branch like BRA, BRP and BRZ)

Memory data register (MDR)
Stores the data or instructions that are to be fetched from or sent to memory

Memory address register (MAR)
Stores the address of the data or instructions that are to be fetched from or sent to memory

Current instruction register (CIR)
Stores the most recently fetched instruction, which will be decoded and executed

Accumulator (ACC)
Stores the results of calculations made by the ALU

Processors may also have general purpose registers. These can temporarily store data being used rather than sending data to and from memory. (Memory data access times are slow compared to special purpose registers but still much faster than secondary storage.)

Exam tip

A common mistake is to talk about the control bus carrying instructions around the processor. This is not the case. Instructions are sent to and from memory via the data bus. The control bus carries the signals orchestrating the fetch–decode–execute signal.

Buses

Buses are the communication channels through which data can be sent around the computer. You need to know about three buses:

1  The data bus carries data between the processor and memory.

2  The address bus carries the address of the memory location being read from or written to.

3  The control bus sends control signals from the control unit.

Now test yourself

1  Describe the purpose of the control unit.

2  State the names of the three buses used by the CPU.

3  State the name of the part of the CPU responsible for calculations.

Answers on p. 209

The fetch–decode–execute cycle, including its effects on registers

Making links

In order to fully understand this section you need to know about the Little Man Computer instruction set. You should revisit this section after studying Chapter 2, Assembly language.

The processor works by continually fetching, decoding then executing instructions. You need to be aware of how the registers are used during the process.

Fetch

1  The contents of the PC are copied to the MAR.

2  The read signal is sent across the control bus and the contents of the MAR are sent across the address bus.

3  The contents of the memory location stored in the MAR are then sent across the data bus and stored in the MDR.

4  The contents of the MDR are then copied to the CIR.

5  The PC is incremented by one.

Figure 1.1 Fetch–decode–execute cycle

Decode

6  The contents of the CIR are sent to the control unit.

7  The control unit then decodes the instruction.

Execute

8  The registers can be changed in different ways during the execution phase, depending on the instruction.

For instance, if the instruction is for a memory location to be read from or written to (that is, LDA or STA), then the address stored within the instruction will be loaded into the MAR. In the case of STA, the data stored in the ACC is sent to memory. In the case of LDA, the data is loaded from memory into the ACC.

If the instruction is to carry out a calculation (that is, ADD or SUB) then the contents of the MDR and ACC are sent to the ALU and the result sent back to the ACC.

Now test yourself

4  Give an example of when the contents of the ACC might be changed.

5  State the name of the bus that carries the contents of memory to the MDR.

6  Explain why the PC is incremented by 1 in each cycle.

Answers on p. 209

The factors affecting the performance of the CPU

•  clock speed

•  number of cores

•  amount of cache memory

•  use of pipelining.

Clock speed

Processors work at incredible speeds, dictated by the clock signal. The speed of this signal, known as the clock speed, is measured in hertz (Hz).

Unit | Pulses per second
1 Hertz (Hz) | 1
1 Kilohertz (kHz) | 1 000
1 Megahertz (MHz) | 1 000 000
1 Gigahertz (GHz) | 1 000 000 000

Modern desktop processors tend run in the order of Gigahertz. The processor on the computer being used to write this chapter runs at a speed of 2.8 GHz. That means its processor has a clock producing 2.8 billion pulses per second.

Number of cores

A core is a processing unit within the CPU. Modern CPUs have multiple cores that can operate independently.

•  Each core is a distinct processing unit on the CPU that can run independently.

•  When multitasking, different cores can run different applications.

•  It is also possible for multiple cores to work on the same problem.

•  The more cores you have, the easier it is to run more things simultaneously. More cores also mean that tasks that can have their work shared will run more quickly.

Core A core is a processing unit within the CPU.

Cache memory A fast memory that is built on or close to the CPU and is designed to reduce the need to access RAM, which has slower access speeds.

Cache

Random access memory’s (RAM’s) access speed is significantly slower than the speed at which the CPU operates. To compensate for this, processors have a small amount of fast memory called cache memory:

•  Cache memory is a temporary store.

•  Cache memory is built into the processor itself, reducing the distance data has to travel to it. Data and instructions that are likely to be regularly accessed are kept in cache memory, ready for fast access.

•  By allowing the processor to access cache, the overall speed at which it operates is less likely to be limited by RAM’s access speed.

•  Because cache memory is faster when it is smaller, different levels of cache are used.

•  Level one cache is the smallest and built directly into the CPU. Often each core will have its own level one cache.

•  Each subsequent cache level is larger and further away from the heart of the CPU and is therefore slower to access.

•  Modern CPUs tend to have three or four levels of cache.

Making links

Having a cache is a common concept in computing, and isn’t just used in the CPU. Web browsers cache files on your computer to avoid them having to be repeatedly downloaded. You can find out more about caches in Chapter 6.

The use of pipelining in a processor to improve efficiency

The processor works by repeatedly fetching, decoding and executing instructions. If it does this one instruction at a time, then parts of the processor are potentially left sitting idle. To overcome this, using pipelining in the CPU means that different parts of the CPU performing different parts of the fetch–decode–execute cycle on a sequence of instructions. While one instruction is being executed, the next can be decoded and the one after that fetched.

Pipelining When discussing a CPU, it means different parts of the CPU performing different parts of the fetch–decode–execute cycle on a sequence of instructions.

| Fetch | Decode | Execute
Step 1 | Instruction 1 |  |
Step 2 | Instruction 2 | Instruction 1 |
Step 3 | Instruction 3 | Instruction 2 | Instruction 1
Step 4 | Instruction 4 | Instruction 3 | Instruction 2

This works as long as subsequent instructions can be predicted. This isn’t always the case. For example, if there is a branch instruction, the CPU may not be able to tell it should fetch the instruction immediately after it, or needs to jump to a different part of the program until it is time to execute the branch instruction. If the wrong instruction is chosen to be fetched in advance, it has to be thrown away and the correct one fetched.

Making links

Pipelining can be seen as a more general process, not just specific to the CPU. You can read about how pipelining can be applied to other problems when looking at computational methods in Chapter 7.

Now test yourself

7  Explain why CPUs have cache memory.

8  Explain how pipelining improves the performance of a processor.

9  Describe a situation in which more cores will improve the performance of a CPU.

Answers on p. 209

Von Neumann, Harvard and contemporary processor architecture

A computer’s architecture is the approach taken to its design. Computers with the same architecture aren’t necessarily identical but will follow a specific design philosophy.

Architecture When discussing computers, this refers to the approach taken in a computer’s design.

Von Neumann architecture

The Von Neumann architecture has:

•  a single control unit

•  a single arithmetic logic unit

•  a single memory store that contains both instructions and data.

Storing data and instructions in the same memory unit and having them travel along the same bus can hold things up.

If an instruction is being read, then because memory and the data bus are in use, it is not possible to read and write data at the same time.

Harvard architecture

Harvard architecture differs from Von Neumann in that it has separate memory units and buses for data and instructions and therefore doesn’t suffer from the restriction of having a single memory store.

Contemporary processors

While modern processors have many of the features of the model described at the start of the chapter, in practice, they are many times more complex. Over time, processor designers have come up with many ideas to improve performance and efficiency. A number are described below but there are many more, with new ones being developed all the time.

Simultaneous multithreading

•  A ‘thread’ is the sequence of instructions that have been sent to the CPU to be processed.

•  Simultaneous multithreading allows two threads to run on each core at one time.

•  The core is designed so that the part of it that fetches and decodes, the ‘front end’, is duplicated. This means that it is capable of fetching and decoding two threads at once.

•  As the execution part of the core is not continuously being used, it can switch between the two threads.

•  It should be noted that while simultaneous multithreading will improve performance, two cores that are not multithreading will outperform one similar core with two threads.

Out of order execution

•  In the model you have studied, each instruction is fetched, decoded then executed.

•  In reality, some instructions may take longer than others to execute, leaving other parts of the CPU idle.

•  Out of order execution allows instructions to be executed ahead of when they usually would be if the required resources are available, preventing delays. This requires the CPU to check that the instruction to be executed out of order isn’t dependent on data yet to be processed.

Branch prediction

•  We have seen that one issue with pipelining is that the pipeline has to be cleared if the prediction is wrong, costing time.

•  Modern CPUs use branch prediction to try and work out where a program will go at a decision point. This reduces how often the pipeline has to be cleared, improving overall speed of execution.

Variable clock speed

•  Modern processors are able to change their clock speeds. They may temporarily be able to increase it during intensive tasks to give a performance boost

•  There is, however, a limit as to how long this can be done for before overheating means it has to return to its normal speed.

•  Some CPUs can also reduce their clock speed to reduce power consumption and extend battery life in portable devices.

Exam tip

You may come across the term Hyper-Threading. This is the processor manufacturer Intel’s proprietary name for their version of simultaneous multithreading. In an exam you should always give generic and not proprietary names. Therefore always use the term simultaneous multithreading not Hyper-Threading.

Power conservation

As well as adjusting clock speed to conserve power, modern CPUs are able to shut off parts of their circuity that aren’t being used at a given point in time. This might, for example, be parts dedicated to video processing. All this helps to reduce power consumption.

Now test yourself

10  Describe one difference between the Von Neumann and Harvard architectures.

11  Give one example of a feature a contemporary processor might have.

Answers on p. 209

Types of processor

The differences between and uses of CISC and RISC processors

There are two main approaches to CPUs – reduced instruction set computing (RISC) and complex instruction set computing (CISC). An instruction set is the list of instructions a CPU is able to decode.

•  RISC processors have a smaller range of instructions than CISC processors.

•  The smaller instruction set means fewer transistors are needed. Therefore, they generally require less power and cost less to produce.

•  The instructions in a CISC processor may take several clock cycles to execute. RISC instructions usually take a single clock cycle, meaning they are better suited to pipelining.

•  Compilers for RISC processors tend to be more complicated, so for a given program more instructions are likely to be generated.

•  RISC processors have fewer addressing modes than CISC processors but more general-purpose registers.

Reduced instruction set computing (RISC) A design approach where a CPU uses a small set of instructions. While this means a loss of some of the more specialised instructions, it allows for efficiencies in the processor design.

Complex instruction set computing (CISC) This was a term retroactively coined for non-RISC processors. CISC processors tend to have a larger instruction set, including very specialised instructions.

Making links

Because RISC and CISC CPUs have different instruction sets, a program that runs on one type of CPU will not run on the other. This means different compilers need to be used for programs targeted to run on RISC or CISC devices. You can find out more about compilers in Chapter 2.

You should also keep in mind that just because two CPUs are both RISC (or both CISC) designs, this does not mean they necessarily have the same instruction set. The terms RISC and CISC simply describe the philosophy for the design of the instruction set.

Now test yourself

12  State which has more addressing modes: a CISC or a RISC processor.

13  State which processor type is likely to be made of more transistors, RISC or CISC.

14  Explain why some laptop manufacturers have started to produce laptops with RISC CPUs rather than the CISC approach they have previously used.

Answers on p. 209

GPUs and their uses (including those not related to graphics)

A graphics processing unit (GPU) is specifically designed to perform the calculations associated with displaying graphics. GPUs:

•  have instruction sets specifically designed for the sorts of calculations required in graphics processing

•  have the ability to process these pieces of data in parallel, referred to as single instruction multiple data (SIMD)

•  can either be placed on a graphics card with access to their own dedicated memory …

•  … or can be embedded within a CPU.

•  GPUs require additional software to convert CPU functions to GPU functions.

Graphics processing unit (GPU) A type of processor designed with the purpose of drawing graphics on the screen.

It should be remembered that GPUs cannot themselves run programs. A computer still needs a CPU to run a program, but if there is a GPU, the CPU can pass on certain processing of data (traditionally the rendering of graphics) to it.

While designed for graphics (for example for gaming animation and graphic design), because of their special capabilities GPUs are increasingly being used in many other fields. Examples include:

•  modelling physical systems

•  audio processing

•  breaking passwords

•  machine learning.

Now test yourself

15  Describe one way a GPU is different from a CPU.

16  Give an example of how a GPU might be used other than for drawing three dimensional (3D) graphics.

Answers on p. 209

Multicore and parallel systems

Parallel processing is when a computer carries out multiple computations simultaneously to solve a given problem. There are different approaches to this:

•  One is SIMD, where the same operation is carried out on multiple pieces of data, at one time. This type of parallel processing is often carried out by GPUs.

•  The other approach is multiple instructions multiple data (MIMD); here, different instructions are carried out concurrently on different pieces of data.

Parallel processing could take place within a single CPU by sharing computation across its cores. This is a multicore approach.

If we need a higher degree of parallelisation, then multiple CPUs (each with their own multiple cores) may be used. An example of this is a supercomputer. The top supercomputers in the world have tens of thousands of CPUs and GPUs, with millions of cores able to work on a problem simultaneously.

Some things are easy to parallelise. If we have a batch of one billion numbers to add together, it is easy to see that 100 processors could divide the workload to come to a total, quicker than a single CPU. On the other hand, if we want to work out the 10 000th term of the Fibonacci sequence, where each term is the calculated by adding the two previous terms (e.g. 0, 1, 1, 2, 3, 5, 8 …) there is no benefit to be gained by having more than one CPU. Most programs have some parts that can be parallelised and others that cannot.

The extent to which parallel processing speeds up the solving of a problem depends on how much of the problem is parallelisable. If only half of a program is parallelisable, then the best case that can be achieved by adding more processors is getting close to the program running in half the time of one processor.

Now test yourself

17  Explain what is meant by MIMD.

18  Explain what is meant by SIMD.

Answers on p. 209

Input, output and storage

How different input, output and storage devices can be applied to the solution of different problems

Hardware is the description given to the physical components of a computer system:

•  A computer system has a CPU and memory.

•  There is usually some form of storage.

•  There are usually devices to input data into and output information from the computer.

•  ‘Peripheral’ is the term given to hardware attached to and used with a computer, but that are not an integral part of it.

Hardware The physical components of a computer system. For example the CPU, RAM, motherboard, mouse, monitor etc.

Input devices and output devices

•  Input devices allow data to be entered into a computer. Examples include keyboards, mice, microphones, scanners and joysticks.

•  Output devices allow information to be retrieved from a computer. Examples include printers, speakers, monitors and actuators (devices that cause movement).

Storage devices

Storage devices can use magnetic, optical or flash technology. This is covered in more detail in the next section.

To make an informed decision as to what device is best for a given scenario:

•  You need to have a good feel for how much storage is taken up by different types of files.

•  As a rough guide, documents and photographs require several megabytes, audio requires a couple of megabytes per minute and video tens of megabytes per minute. The number can vary depending on the quality and compression used. You should a look around your own computer and see how much space different files take up.

Exam tip

HDDs and SSDs can be external or internal. If the device needs to be moved between devices or stored away safely, then you should state the device is either ‘external’ or ‘portable’ (the latter can run without being plugged into a power supply). If the terms hard disk drive or solid state drive are used on their own they are usually assumed to be internal.

Device | Type | Capacity
CD | Optical | 650 MB
DVD | Optical | 4.7 GB
Blu-ray | Optical | 25–100 GB
Hard disk drive (HDD) | Magnetic | 1–20 TB
Solid state drive (SSD) | Flash | 500 GB–5 TB
Tape | Magnetic | 10–30 TB
USB flash drive | Flash | 16 GB–1 TB

Now test yourself

19  List ten different input devices.

20  List ten different output devices.

Answers on p. 209

The uses of magnetic, optical and flash storage devices

Storage devices fall into three categories: magnetic, optical and flash.

Type of storage device
Description
Examples

Magnetic
Uses a magnetisable material. Patterns of magnetisation are then used to represent binary sequences. Magnetic storage tends to have a high capacity at a low cost. Their moving parts tend to make them unsuitable for portable devices as sudden movements can cause them to malfunction. They consume more power than flash media
Hard disk drive

Magnetic tape (often used to back up servers)

Optical
Uses a laser and by looking at its reflection, determines where there are pits on a surface, which represent 1s and 0s. Optical media tend to be cheap to distribute and fairly resilient
Compact disc (CD)

Digital versatile disc (DVD)

Blu-ray disc™

Flash
Uses a special type of read-only memory that can be overwritten. While expensive, it can be read from and written to at high speeds and, as it has no moving parts, has lower power consumption. It is unaffected by sudden movements
USB memory stick

Camera memory card

Solid state drive

Now test yourself

21  Find out and describe the storage devices your school or college uses to store and back up students’ data.

22  State what type of media a DVD is: magnetic, optical or flash.

23  Explain why backups are usually carried out on magnetic media (e.g. tapes).

24  Explain why software tends to be distributed on DVDs rather than USB memory sticks.

Answers on p. 209–210

Exam tip

If an answer requires an optical medium that can be written to, ensure you use the R or RW suffix and not ROM. ROM indicates it is read-only, R means it can be written to once and RW can be written to many times. It is no use, therefore, suggesting a person backs up their computer onto a DVD-ROM.

RAM and ROM

Primary memory is memory the CPU can access directly.

There are two forms of primary memory: random access memory (RAM) and read-only memory (ROM).

RAM:

•  is volatile (that is, loses its contents when electrical power is lost)

•  can be read from or written to (any location is accessed at equal speed to any other location)

•  stores the parts of the operating system, programs and data that are currently in use by the computer.

ROM:

•  is non-volatile (that is, retains its contents when electrical power is lost)

•  is read-only and so cannot be written to

•  is often used to store the computer’s boot program.

Random access memory (RAM) A type of primary memory that the CPU uses for programs and data in use. It loses its contents when power is lost.

Read-only memory (ROM) A type of primary memory that can only be read from. It retains its contents even when electrical power is lost. It is often used to store start-up instructions on a computer.

Now test yourself

25  State one difference between RAM and ROM.

26  State which of the following types of primary memory is volatile: RAM, ROM or both.

Answers on p. 210

Virtual storage

•  It is increasingly common for computers to make use of remote external storage, that is, storage not directly connected to the computer

•  Often this can be done in such a way that the operating system presents it to the user as part of the actual system.

•  This virtual storage may be stored elsewhere on a local area network or even in a data centre somewhere on the other side of the world.

•  This means that storage can be added to your computer without physically installing new hardware. Depending on your set-up, this storage can be automatically backed up, shared among multiple people and available anywhere in the world.

•  In order to access the storage, the computer needs to be connected to the network on which it resides, or the internet. This makes virtual storage unsuitable for scenarios in which a computer will be without a connection for extended periods.

Now test yourself

27  Describe an advantage of using virtual storage over traditional storage inside a computer.

Answers on p. 210

Exam tip

The specification requires you to be able to know how input, output and storage devices are ‘applied to the solution of different problems’. It is, therefore, likely that questions on this topic will be given in the context of a scenario. You should take time to look at the scenario for clues as to what devices are most appropriate. For example, if the context requires portability you are likely to choose a storage device that uses flash storage such as an SSD (low power consumption and no moving parts) over one that uses magnetic storage such as an HDD.

Summary

Structure and function of a processor

•  The central processing unit (CPU) carries out the instructions in programs. The faster the clock speed (measured in GHz), the more instructions it can execute per second.

•  The CPU contains a control unit (CU), arithmetic logic unit (ALU) and registers. It is linked to memory by address, data and control buses.

•  Processor performance can be improved by increasing the clock speed, the number of cores and increasing the amount of cache memory.

•  Pipelining will also have a beneficial effect on the performance of a CPU.

•  Pipelining is when different parts of the CPU can fetch, decode and execute instructions simultaneously.

•  The Von Neumann architecture follows the fetch–decode–execute cycle and uses one ALU and one CU.

•  In the Von Neumann architecture, data and instructions are stored together in memory; in the Harvard architecture, programs and data are stored in separate memory units.

•  Modern processors have features to improve performance and power efficiency. These include out of order execution, branch prediction and power conservation.

Types of processor

•  Reduced instruction set computing (RISC) is an alternative processor architecture, which has a reduced instruction set. These instructions require fewer clock cycles to execute and mean that the processor requires fewer transistors to build. Non-RISC processors are referred to as complex instruction set computing (CISC) processors.

•  A graphics processing unit (GPU) is a specialist processor that is primarily designed for drawing 3D graphics to the screen, but can be applied to other tasks.

•  Parallel processing is the processing of multiple pieces of data at the same time. This could be with the same instruction being applied to all the data (single instruction multiple data, SIMD) or different instructions (multiple instructions multiple data, MIMD).

Input, output and storage

•  Input devices allow data to be entered into a computer; output devices allow computers to give out information; storage devices are used to permanently store data.

•  Storage devices can use magnetic, optical or flash storage.

•  Random access memory (RAM) is volatile and stores the programs and data in use.

•  Read-only memory (ROM) is non-volatile and is often used to store the computer’s boot program.

•  Storage is often separate to the computer, located elsewhere on a network or even in a remote data centre. This virtual storage can be treated as part of the computer itself.

Exam practice

1  Explain why smartphones use flash memory.

[2]

2  Describe the purpose of the address bus.

[1]

3  Give two differences between RISC and CISC processors.

[2]

4  Describe the Von Neumann architecture.

[2]

5  Explain what is meant by a GPU.

[2]

6  State two output devices a programmer might have, justifying your choices.

[4]

7  Discuss the differences between a CPU in a smartwatch and one in a PC designed for gaming.

[9]

Answers available online