2023.
M110AB 2023L219A1EL
2022L219A1EL
Coimisiún na Scrúduithe Stáit
State Examinations Commission
Leaving Certificate Examination 2023
Computer Science
Sections A & B
Higher Level
Wednesday 24 May Morning 9:30 - 11:00
130 marks
Examination Number
For example, 3rd February
Day and Month of Birth is entered as 0302
For Examiner use only
Section Question Mark Section Question Mark Section Question Mark
1 7 13
2 8 B 14
3 9 15
A A
4 10 Section B Total:
5 11 C 16
6 12 Section C Total:
Section A Total: Total:
Instructions
There are three sections in this examination. Section A and B appear in this booklet. Section C is in
a separate booklet that will be provided for the computer-based element.
Section A Short Answer Questions Attempt any nine questions 54 marks
All questions carry equal marks
Section B Long Questions Attempt any two questions 76 marks
All questions carry equal marks
Section C Programming Answer all question parts 80 marks
Calculators may not be used during this section of the examination.
The superintendent will give you a copy of page 78 (Logic gates) of the Formulae and Tables
booklet on request. You are not allowed to bring your own copy into the examination.
Write your answers for Section A and Section B in the spaces provided in this booklet. There is
space for extra work at the end of the booklet. Label any such extra work clearly with the question
number and part.
Leaving Certificate 2023 2
Computer Science, Sections A & B – Higher level
Section A Short Answer Questions 54 marks
Answer any nine questions.
Question 1
Enter the appropriate data type in Column B to match the values in Column A.
Column A Column B
Value Data Type
Ciara
255
083-1234567
1.5, 1.7, 1.2, 0.9, 1.3
False
99.99
Question 2
Information systems can represent numbers in decimal, binary and hexadecimal format. Many
software developers use hexadecimal numbers.
(a) Explain one advantage of using hexadecimal numbers.
(b) Convert the hexadecimal number C9 into a decimal number.
Leaving Certificate 2023 3
Computer Science, Sections A & B – Higher level
Question 3
The diagram in Figure 1 below, shows the Cartesian plane divided into four quadrants by an x-y
axis, centred on the point (0, 0).
Figure 1
(a) A point P(x, y) is plotted inside the top right quadrant, as shown. Complete the truth
table below to verify that P is inside the top right quadrant.
x > 0 y > 0 x > 0 and y > 0
False False False
False True
True False
True True
(b) Construct a Boolean expression in the space below that will evaluate to True for all points
(x, y) inside the shaded area shown in Figure 2.
Figure 2
Leaving Certificate 2023 4
Computer Science, Sections A & B – Higher level
Question 4
User interfaces have evolved constantly over the past 40 years to become more user-friendly and
accessible.
(a) What is meant by the term ‘user interface’?
(b) Name and describe one type of user interface that a computer system might use.
Name:
Description:
Question 5
Transmission Control Protocol / Internet Protocol (TCP/IP) refers to a suite of
protocols used to send and receive messages over the internet. The TCP/IP
protocol suite contains a number of different layers. Name one of these layers
and describe what happens within this layer.
Layer Name:
Layer Description:
Leaving Certificate 2023 5
Computer Science, Sections A & B – Higher level
Question 6
Smart homes make use of embedded systems to make living spaces more enjoyable and
convenient for home owners.
(a) State two examples of embedded systems you might find in a smart home.
1.
2.
(b) Describe two characteristics of embedded systems that distinguish them from general
computer systems.
1.
2.
Question 7
Complete the trace table for the Python code shown below.
1 x = 10
2 y = 5
3
4 while x >= y:
5 x = x - 1
6 y = y + 1
x y
10 5
Leaving Certificate 2023 6
Computer Science, Sections A & B – Higher level
Question 8
A farmer needs to ferry a wolf, a goat and a cabbage from one side of a
river to the other in a boat, as shown in Figure 3. However, the boat only
has room for the farmer and one other item, either the wolf, the goat or
the cabbage. If left alone without the farmer present, the wolf would eat
the goat, and the goat would eat the cabbage.
The state of the system at any given point in time can be represented using
an ordered list of four values as follows:
Figure 3
(<side for farmer>, <side for wolf>, <side for goat>, <side for cabbage>)
By using the letter E to represent the east side of the river, and the letter W to represent the west
side of the river, the state (E, E, E, E) means that all four are on the east side of the river.
(E, E, E, E) is the initial state of the system.
(a) Using this notation, what is the desired final state of the system?
(b) The state (W, E, E, W) is considered a loss state because the wolf will eat the goat (as
the farmer and the cabbage are both on the west side).
(i) Using this notation, name any other two loss states.
1.
2.
(ii) Using this notation, name any one non-loss state, other than the initial and final states.
Leaving Certificate 2023 7
Computer Science, Sections A & B – Higher level
Question 9
Chop Cup is a magic routine which involves three cups face down and one ball underneath one of
the cups. In any single move the position of two cups can be swapped using one of three possible
moves, A, B or C as shown in Figure 4 below.
Figure 4
Each cup is identified by its position. Initially the leftmost cup is at position 1, the middle cup is at
position 2 and the right cup is at position 3.
(a) Given that the ball starts under the leftmost cup (position 1) and always remains under the
same cup, state the ball position after the sequence of moves, ABCBCA.
(b) Without knowing which cup the ball is under, construct a sequence involving at least three
moves which results in the ball ending in the same position as it started from.
Leaving Certificate 2023 8
Computer Science, Sections A & B – Higher level
Question 10
Quicksort is widely recognised as one of the most efficient sorting algorithms. It works by
recursively partitioning a list about one of the elements known as the pivot. Consider the unsorted
list of integers shown in Figure 5 below and answer the questions that follow.
60 30 80 40 10 50 20 70 90
Figure 5
(a) Using the leftmost element as the pivot, show the contents of the list after the initial
partition by the quicksort algorithm. You should assume that the elements in the left and
right sub-lists are not re-ordered.
(b) Explain why 90 would have been a poor choice of pivot to partition the list shown in Figure 5.
Leaving Certificate 2023 9
Computer Science, Sections A & B – Higher level
Question 11
Figure 6 depicts a flowchart of a Python algorithm which can be used to generate new usernames
for students. You can assume that the date is in the format: ddmmyyyy.
Figure 6
(a) Name one input and one output of the algorithm.
Input:
Output:
(b) Referring to the relevant step(s) in the flowchart explain how the algorithm uses string
slicing and string concatenation.
String slicing:
String concatenation:
Leaving Certificate 2023 10
Computer Science, Sections A & B – Higher level
Question 12
A Software Development Lifecycle (SDLC) such as the one shown in Figure 7 below, is usually
followed when creating information systems.
Figure 7
(a) Outline briefly two reasons why the SDLC is important.
Reason 1:
Reason 2:
(b) Distinguish between functional and non-functional testing.
Leaving Certificate 2023 11
Computer Science, Sections A & B – Higher level
Section B Long Questions 76 marks
Answer any two questions.
Question 13
The National Hub Network is an initiative set up by the Irish
Government to allow people across Ireland to work closer to
home through providing digital working hubs with modern
facilities and high-speed internet connections. There are over
260 working hub locations spread across Ireland with over
4000 desks available. Many of these hubs have been set up in
rural and remote areas.
(a)
(i) Consider the impact that a digital working hub might have to a rural community’s
culture and society. Provide one argument in support of this initiative and one
argument against.
Support:
Against:
(ii) As the demand for desk space in digital hubs increases, the Government plan on using
computer modelling to plan ahead and make sure they have enough resources in place
and also that they are targeting the correct areas when it comes to opening new hubs.
Suggest one data item that could be collected in order to model the situation. Justify
your answer.
Item:
Justify:
This question continues on the next page.
Leaving Certificate 2023 12
Computer Science, Sections A & B – Higher level
(iii) To ensure that the digital hubs are accessible for anyone who wishes to use them,
adaptive and assistive technologies are in place for anyone who should need them.
Name two types of such technologies and describe how each could support someone
with additional needs when using a computer system.
Technology 1:
Description:
Technology 2:
Description:
(b) Figure 8 shows the set of hubs and distances in
Figure 8
kilometres between each pair of hubs. A technician
must travel around each hub to check the equipment
and to fix any technical issues that arise. The
technician will begin at Hub A and visit all hubs
exactly once, before returning to Hub A.
(i) Calculate and state the shortest possible route
the technician should take.
(ii) Outline briefly two features of abstraction contained in Figure 8.
Feature 1:
Feature 2:
This question continues on the next page.
Leaving Certificate 2023 13
Computer Science, Sections A & B – Higher level
(iii) At the beginning of each day the technician has a look at all of the locations that she
needs to visit. To try and do this in the shortest time possible the technician will use
heuristics. Explain what is meant by heuristics.
(c) In 2022, the Irish Government announced plans to introduce legislation to
grant Gardaí new powers to use Facial Recognition Software (FRS).
However, the Irish Council for Civil Liberties (ICCL) said it strongly opposes
the use of such technology for law enforcement and in public spaces.
Outline two arguments for and two arguments against the use of FRS for
law enforcement.
For 1:
For 2:
Against 1:
Against 2:
Leaving Certificate 2023 14
Computer Science, Sections A & B – Higher level
Question 14
In the 1940s John von Neumann discovered that
computer systems could treat instructions as data and, as
such, could be manipulated inside the computer’s
memory while a program is running. This major
breakthrough in computing became known as the stored
program concept, and is still used in the majority of
computer systems we use today. The von Neumann
architecture is shown in Figure 9.
(a) Figure 9
(i) Explain the term ‘output device’. Provide two examples.
Explain:
Example 1:
Example 2:
(ii) The CPU cycle carried out to process data and instructions has three steps to it. The
first step ‘Fetch Instruction’ has been completed for you in Figure 10 below. Complete
the diagram by filling in the next two steps of the process, labelled (a) and (b).
Figure 10
(iii) The CPU contains a number of registers including the Program Counter and the
Accumulator. Explain one difference between these two registers.
This question continues on the next page.
Leaving Certificate 2023 15
Computer Science, Sections A & B – Higher level
(iv) The CPU is often described as the brains of the computer. It is made up of two main
components, namely the Arithmetic Logic Unit (ALU) and the Control Unit (CU). State
the purpose of these two components.
ALU:
CU:
(v) The CPU is the most important component of a computer system and determines how
fast a computer can run. Describe two factors that can impact the performance of the
CPU.
1.
2.
(b) As well as having main memory, computer systems tend to have secondary storage which
allows users to save data such as programs and files.
(i) Sarah is looking to buy a new laptop. So far, all the laptops she has looked at have
either magnetic or solid state hard drives. Which type of secondary storage would you
recommend? Justify your answer.
Recommendation:
Justify:
This question continues on the next page.
Leaving Certificate 2023 16
Computer Science, Sections A & B – Higher level
(ii) When a computer is carrying out lots of tasks it can start to run out of memory. In
some cases, a computer may have to rely on virtual memory. What is meant by the
term ‘virtual memory’?
(iii) For a school software development project Sarah has to work with classmates to
produce a computational artefact for a local business. The group will be working on
this both at school and at home. Sarah suggests working in the cloud for the project.
Describe one advantage and one disadvantage of working in the cloud.
Advantage:
Disadvantage:
(iv) As part of the school project Sarah has been assigned the role of Business Analyst.
Describe two activities typically undertaken by a Business Analyst in a software
development company.
Activity 1:
Activity 2:
Leaving Certificate 2023 17
Computer Science, Sections A & B – Higher level
Question 15
Computers can use a choice of different search algorithms to find information much quicker than
humans. Two common search algorithms are the linear search and the binary search.
(a) Consider the following list of seven names.
Amir Dean Eoin Helen Natalia Steve Terry
(i) What search algorithm would be best suited to search the list of names shown above?
Justify your answer.
Search Algorithm:
Justify:
Search algorithms work by comparing the list elements with a particular search value, known as a
key.
(ii) List, in order, the names that would be compared until Natalia is found using the linear
search algorithm.
(iii) List, in order, the names that would be compared until Natalia is found using the
binary search algorithm.
(iv) Complete the table below to show the best and worst case time complexities for the
two search algorithms. You can assume that the size of the input is N.
Best Case Worst Case
Linear Search O(1)
Binary Search
(v) What is meant by O(1) time complexity?
This question continues on the next page.
Leaving Certificate 2023 18
Computer Science, Sections A & B – Higher level
(b) The Python code below shows an implementation of a binary search function.
1 def binary_search1(v, L):
2
3 lo = 0
4 hi = len(L) - 1
5
6 while (lo <= hi):
7 mid = (lo + hi)//2
8
9 if L[mid] > v:
10 hi = mid – 1
11 elif L[mid] < v:
12 lo = mid + 1
13 else:
14 return mid
15
16 return len(L)
(i) In the code there is one example of iteration. State on which lines the iteration starts
and ends and explain what it does.
Start line number:
End line number:
Explain:
(ii) The function contains two examples of a return statement – line 14 and line 16.
What is the purpose of a return statement?
(iii) Explain the reason for len(L) on line 16.
This question continues on the next page.
Leaving Certificate 2023 19
Computer Science, Sections A & B – Higher level
(c) An alternative implementation of the binary search can be achieved using recursion as shown.
1 def binary_search2(v, L, lo, hi):
2
3 if lo > hi:
4 return len(L)
5
6 mid = (lo + hi)//2
7
8 if L[mid] > v:
9 return binary_search2(v, L, lo, mid-1)
10 elif L[mid] < v:
11 return binary_search2(v, L, mid+1, hi)
12
13 return mid
(i) Referring to the code above, describe two properties of recursive functions.
Property 1:
Property 2:
(ii) State one advantage and one disadvantage of using recursion.
Advantage:
Disadvantage:
(iii) Given a list of names, initialised as shown below, write a line of code to call the
function binary_search2 to find the name Natalia. You should store the result of
the function in a variable called result.
names = ["Amir", "Dean", "Eoin", "Helen", "Natalia", "Steve", "Terry"]
Leaving Certificate 2023 20
Computer Science, Sections A & B – Higher level
Space for extra work.
Indicate clearly the number and part of the question(s) you are answering.
Leaving Certificate 2023 21
Computer Science, Sections A & B – Higher level
Space for extra work.
Indicate clearly the number and part of the question(s) you are answering.
Leaving Certificate 2023 22
Computer Science, Sections A & B – Higher level
Space for extra work.
Indicate clearly the number and part of the question(s) you are answering.
Leaving Certificate 2023 23
Computer Science, Sections A & B – Higher level
Acknowledgements
Images
Image on page 5: [Link]
Image on page 7: [Link]
environment-Right-screenshot-from-a_fig2_305084487
Image on page 11: [Link]
Image on page 12: [Link]
arranmore/
Image on page 14: [Link]
Copyright notice
This examination paper may contain text or images for which the State Examinations Commission is not the copyright
owner, and which may have been adapted, for the purpose of assessment, without the authors’ prior consent. This
examination paper has been prepared in accordance with Section 53(5) of the Copyright and Related Rights Act, 2000.
Any subsequent use for a purpose other than the intended purpose is not authorised. The Commission does not
accept liability for any infringement of third-party rights arising from unauthorised distribution or use of this
examination paper.
Leaving Certificate – Higher Level
Computer Science – Sections A & B
Wednesday 24 May
Leaving Certificate 2023 24
Morning
Computer 9:30Sections
Science, – 11:00
A & B – Higher level