0% found this document useful (0 votes)
26 views

HSC Software Design & Development 2023

Uploaded by

aarav.patel3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

HSC Software Design & Development 2023

Uploaded by

aarav.patel3
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Centre Number

NSW Education Standards Authority Student Number

2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Software Design and


Development
General • Reading time – 5 minutes
Instructions • Working time – 3 hours
• Write using black pen
• Draw diagrams using pencil
• Write your Centre Number and Student Number at the top of this
page and either pages 33 and 37 or pages 39 and 43

Total marks: Section I – 20 marks (pages 2–9)


100 • Attempt Questions 1–20
• Allow about 35 minutes for this section

Section II – 60 marks (pages 13–32)


• Attempt Questions 21–32
• Allow about 1 hour and 50 minutes for this section

Section III – 20 marks (pages 33–45)


• Attempt either Question 33 or Question 34
• Allow about 35 minutes for this section

1170
Section I

20 marks
Attempt Questions 1–20
Allow about 35 minutes for this section

Use the multiple-choice answer sheet for Questions 1–20.

1 Which of the following is a valid reason to include comments in the source code?

A. To enable the code to work correctly


B. To show users how to effectively use the software
C. To assist other programmers in maintaining the code
D. To ensure that the source code is protected by copyright

2 Which of the following tools can be used to perform tasks such as version control and
test data generation?

A. CASE tools
B. Documentation tools
C. System debugging tools
D. Project management tools

3 Which of the following is NOT a typical use of a logbook during software development?

A. Listing issues encountered


B. Providing installation instructions
C. Identifying tasks to be addressed next
D. Keeping a record of tasks successfully completed

–2–
4 While developing software, a programmer uses a compiler prior to execution.

Which row of the table correctly matches a type of error with the stage at which it may
be detected?

Type of error Stage detected


A. Logic Execution
B. Syntax Execution
C. Runtime Compilation
D. Overflow Compilation

5 What is the purpose of a post implementation review?

A. To develop a maintenance plan


B. To review user training schedules
C. To discuss plans for future projects
D. To evaluate the software with the client before sign-off

6 The following EBNF statements describe the structure of a valid identifier.


identifier = <letter> {<digit> | <letter>} <digit> [$ | %]
letter = A | B | C | … | Y | Z
digit = 0 | 1 | 2 | … | 8 | 9

Which of the following is a valid identifier?

A. 2B2B2$

B. B1A9$%

C. F12B2

D. Y9Z9Z%

–3–
7 Consider the following code.
BEGIN Main
Num is local
Num = 4
Sub2
print Num
END Main

BEGIN Sub2
Num is local
Num = 4
Num = Num − 2
print Num
END Sub2

What is the output produced when the above code is executed?

A. 2 2

B. 2 4

C. 4 2

D. 4 4

8 At which stage in the software development cycle is a developer most likely to consult a
railroad diagram?

A. Defining and understanding the problem


B. Planning and designing software solutions
C. Implementing software solutions
D. Testing and evaluating software solutions

9 A developer examines the functionality and interfaces of an existing software application


with a view to developing their own enhanced version of the software.

Which term best describes the developer’s actions?

A. Outsourcing
B. Customising
C. Decompilation
D. Reverse engineering

–4–
Use the following information to answer Questions 10−11.

Game scores for 1000 players are stored in memory. Details of the first three players are shown.

Name Score
Jones B 23
Poullos W 45
Cheng C 32

The following code finds and displays a score for a given player.
BEGIN
Get name
count = 1
WHILE count <= 1000
IF GameScore(count).Name = name THEN
Display GameScore(count).Score
ENDIF
count = count + 1
ENDWHILE
END

10 Which of the following best describes the data structure used in the code?

A. An array of strings
B. An array of records
C. A 1-dimensional array
D. A 2-dimensional array

11 No two players have the same name.

Which of the following is the best way to modify the code to execute more efficiently?

A. Use a FOR/NEXT loop


B. Use a binary search on score
C. Use a flag to terminate the loop
D. Use a sequential file to store the data

–5–
12 Which of the following statements is true about error detection?

A. A variable can be used to check if certain conditions have been met.


B. A breakpoint identifies where a program stops due to a runtime error.
C. A stub requires programmer input before a program trace can continue.
D. A debugging output statement produces a message when a syntax error occurs.

13 Which of the following conforms to the rules for constructing data flow diagrams?

A.

B.

C.

D.

–6–
14 Which of the following is a step of the fetch-execute cycle which involves the arithmetic
logic unit (ALU)?

A. Decode
B. Execute
C. Fetch
D. Translate

15 A software developer decides to include a call to a library routine.

Which of the following must the developer consider?

A. The logic of the library routine


B. The space required to store the library routine
C. The language used to produce the library routine
D. The order of parameters to be passed to the library routine

16 Consider the algorithm fragment.


REPEAT
DoThis
UNTIL x<=5 OR y=8

Which of the following is logically equivalent?

A. DoThis
WHILE x>5 AND Y< >8
DoThis
ENDWHILE

B. DoThis
WHILE x<=5 AND y=8
DoThis
ENDWHILE

C. DoThis
WHILE x<=5 OR y=8
DoThis
ENDWHILE

D. DoThis
WHILE x>5 OR Y< >8
DoThis
ENDWHILE

–7–
17 Consider this code fragment.
BEGIN ReadFile
Line = 101
s=0
OPEN ThisFile for INPUT
Read NextLine from ThisFile
WHILE NextLine < > Line AND s < 100
Array[s] = NextLine
s=s+1
Read NextLine from ThisFile
ENDWHILE
CLOSE ThisFile
END ReadFile

What is the sentinel value in this subroutine?

A. 0

B. 1

C. 99

D. 101

18 A sort is applied to the array C D A S F .

The result of the first pass of the sort is D C A S F .

Which of the following will be the result of the next pass?

A. D A C S F

B. D C A S F

C. F D C A S

D. S D C A F

–8–
19 A programmer defined a variable called IF. This caused an error during compilation.

In which stage of the translation process would the error be detected?

A. Lexical analysis
B. Code generation
C. Token generation
D. Syntactical analysis

20 The function Random(N) returns a random integer from 1 to N inclusive.

Which of the following algorithms displays four different random integers from 1 to 100?

A. BEGIN B. BEGIN
FOR Index = 1 to 100 FOR Index = 1 to 100
Used(Index) = 0 Used(Index) = 0
NEXT Index NEXT Index
Count = 0 Count = 1
REPEAT REPEAT
Num = Random(100) REPEAT
IF Used(Num) = 0 THEN Num = Random(100)
Display Num UNTIL Used(Num) = 1
Used(Num) = 1 Display Num
ENDIF Used(Num) = 1
Count = Count + 1 Count = Count + 1
UNTIL Count = 4 UNTIL Count = 4
END END

C. BEGIN D. BEGIN
FOR Index = 1 to 100 FOR Index = 1 to 100
Used(Index) = 0 Used(Index) = 0
NEXT Index NEXT Index
Count = 0 Count = 1
REPEAT REPEAT
REPEAT Num = Random(100)
Num = Random(100) IF Used(Num) = 1 THEN
UNTIL Used(Num) = 0 Display Num
Display Num Used(Num) = 0
Used(Num) = 1 ENDIF
Count = Count + 1 Count = Count + 1
UNTIL Count = 4 UNTIL Count = 4
END END

–9–
BLANK PAGE

– 10 –
BLANK PAGE

– 11 –
BLANK PAGE

– 12 –
© 2023 NSW Education Standards Authority
2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number

Software Design and


Development Student Number

Section II Answer Booklet

60 marks
Attempt Questions 21–32
Allow about 1 hour and 50 minutes for this section
Do NOT write in this area.

Instructions • Write your Centre Number and Student Number at the top of this
page.

• Answer the questions in the spaces provided. These spaces


provide guidance for the expected length of response.

• If you include diagrams in your answer, ensure that they are


clearly labelled.

• Extra writing space is provided at the back of this booklet.


If you use this space, clearly indicate which question you are
answering.

Please turn over

– 13 –
Office Use Only – Do NOT write anything, or make any marks below this line.
5638310365
1171 15360
BLANK PAGE

Do NOT write in this area.

– 14 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0589310365
Question 21 (2 marks)

Outline how a prototype can be used in the development of a software application. 2

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

Question 22 (3 marks)

Explain why it is important for developers to communicate with their clients. Refer to 3
specific stages of the software development cycle in your answer.

.........................................................................................................................................
Do NOT write in this area.

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

– 15 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1024310360
Question 23 (5 marks)

An online medical database stores the medical history of patients. It is updated each
time a person seeks medical treatment.

(a) Give TWO reasons why security is important for this database. 2

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

(b) To provide increased security for the database, two-step authentication is 3


implemented which requires a user to:
• provide a valid username and password

Do NOT write in this area.


• enter an automatically generated six-digit verification code which is sent to
their mobile phone.

Complete the system flowchart for this two-step authentication process.

UserID and
password

– 16 –
Office Use Only – Do NOT write anything, or make any marks below this line.
5486310366
Question 24 (3 marks)

A software company is developing a suite of related applications. 3

Outline TWO problems that may arise if the company decides to outsource the
development of one of these applications.
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................
.........................................................................................................................................

Question 25 (4 marks)
Do NOT write in this area.

Dominant developers have a large share of the software market. 4

Explain how features of their software help them maintain their market share.

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

– 17 –
Office Use Only – Do NOT write anything, or make any marks below this line.
7986310363
Question 26 (9 marks)

Consider the following module.


1 BEGIN CustomerOrders
2 REPEAT
3 Tries = Tries + 1
4 Get UserId, Password
5 CheckPasswordCorrect (UserId, Password, OK)
6 UNTIL Tries > 3 OR OK = “Y”
7 IF OK = “Y” THEN
8 Open TodaysOrders for Input
9 Read the next record from TodaysOrders into Order_Rec
10 WHILE NOT EOF
11 IF Order_Rec.CustId = UserId THEN
12 PrintDetailsofOrder (Order_Rec)
13 ENDIF
14 Read the next record from TodaysOrders into Order_Rec
15 ENDWHILE

Do NOT write in this area.


16 Close TodaysOrders
17 ELSE
18 InvalidUser (UserId)
19 ENDIF
20 END CustomerOrders

(a) Why is the Read statement needed in both line 9 and line 14? 2

...............................................................................................................................

...............................................................................................................................
...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

Question 26 continues on page 19

– 18 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0736310369
Question 26 (continued)

(b) Give TWO reasons why the code in the CustomerOrders module is easy to 3
maintain. Support your answer with examples from the module.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................

...............................................................................................................................

(c) The logic in the CustomerOrders module has been successfully tested with small 4
files of test data, and using stubs in lines 5, 12 and 18.
Do NOT write in this area.

The module is to be included in a larger system, with the stubs replaced with
existing subroutines that are known to work.

Explain why both module and system testing are now required.
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................
...............................................................................................................................

End of Question 26

– 19 –
Office Use Only – Do NOT write anything, or make any marks below this line.
6277310365
Question 27 (10 marks)

A parking station requires a software application which allows customers to make an


online booking for a parking space.

(a) When making a booking online, customers will input: 3


• date
• time of entry
• time of exit
• car number plate eg SDD223
• large or small vehicle.

Design a user interface for capturing these booking details, using appropriate
screen design elements.

Do NOT write in this area.

Question 27 continues on page 21


– 20 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1032310369
Question 27 (continued)

Customers will be charged at an hourly rate, based on their actual entry and exit times.
When a customer arrives at the parking station, the car number plate will be scanned.
The system uses this to retrieve their booking record, and update it with the current
time. The boom gate then opens to allow entry.

On leaving the car park, the car number plate is scanned. The system retrieves the
booking record and calculates the cost using the hourly rate. The customer swipes
their credit card, their account is debited and the boom gates open.

(b) Construct a structure chart to represent this system. 4


Do NOT write in this area.

(c) Describe how this system can be evaluated with reference to TWO quality 3
assurance criteria.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

End of Question 27
– 21 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0136310363
Question 28 (6 marks)

In a retail business, all product codes must start with an uppercase letter and then be
followed by one or more lowercase letters.

The algorithm below is designed to validate a product code. It contains errors.

Note that Extract(string, start, N) returns N characters from a string, starting from
position start. Eg Extract(“Names”, 3, 2) returns “me”.

Line numbers have been provided for reference.

10 BEGIN validate
20 OK = “F”
30 Get ProductCode
40 Len = Number of characters in ProductCode
50 WHILE OK = “F” AND ProductCode < > “Q”
60 OK = “T”

Do NOT write in this area.


70 IF Extract(ProductCode, 1, 1) is not an uppercase letter THEN
80 OK = “F”
90 Display “Not uppercase”
100 ENDIF
110 FOR Count = 1 to Len
120 IF Extract(ProductCode, Count, 1) is not a lowercase letter THEN
130 OK = “F”
140 Display “Not all lowercase”
150 ENDIF
160 NEXT Count
170 IF OK = “F” THEN
180 Display “Invalid code”
190 Get ProductCode
200 ENDIF
210 ENDWHILE
220 END validate

Question 28 continues on page 23

– 22 –
Office Use Only – Do NOT write anything, or make any marks below this line.
7037310360
Question 28 (continued)

(a) Perform a desk check of the algorithm using the test data “p3”, “Pad”, “Q”, “X”. 3

OK ProductCode Len Extracted Count Display


character
Do NOT write in this area.

(b) The algorithm contains errors. 3

Identify TWO errors and suggest how they can be corrected. Refer to line
numbers in your answer.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

End of Question 28
– 23 –
Office Use Only – Do NOT write anything, or make any marks below this line.
2207310364
Question 29 (4 marks)

In a programming language, an Expression can include numerical values, variables 4


and operators.

Each of the following is a valid Expression in this language:


29
A + 14.375
23.8 * Rate
NumAadvarks − B / C + 2

Note that brackets are NOT used in an Expression in this language.

Construct railroad diagram(s) to define the syntax of valid expressions in this language.

You can assume that Digit (from 0 to 9), Variable and Operator (+, − , *, / ) are already
defined.

Do NOT write in this area.

– 24 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1619310360
Question 30 (3 marks)

The following storyboard shows the navigation for a simple menu structure. 3

MENU

Screen 1 Screen 1 Screen 2 Screen 2

Done Done
Screen 3 Screen 4

Screen 3 Screen 4
Quit
Done Done

Quit
Do NOT write in this area.

A click on a button on the menu screen generates an appropriate number (from 1 to 4,


or 9 if Quit is clicked) which is stored in the variable ButtonClick.

A click anywhere else on the screen generates a 0.

Write an algorithm for the menu screen that allows a user to access the other screens,
exiting when the Quit button is clicked.

Do NOT include the logic for any of the other screens.

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................
– 25 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0585310361
Question 31 (3 marks)

Between the stages of compilation and execution, the process of linking occurs. 3

Explain why linking is necessary.

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

.........................................................................................................................................

Do NOT write in this area.

– 26 –
Office Use Only – Do NOT write anything, or make any marks below this line.
6577310368
Question 32 (8 marks)

An algorithm is required to convert a date in DD/MM/YYYY format into its equivalent


long date such as 29 October 2023.

The entered date will always be 10 characters and in the format DD/MM/YYYY.

The date is validated as follows:


• the month must be a valid month (from 1 to 12)
• the day value must be valid for that month
(for example, no more than 28 for February – ignore leap years).

(a) Complete the table with THREE items of test data that test different aspects of 3
the logic of the algorithm.

Test data Reason for inclusion


Do NOT write in this area.

Question 32 continues on page 28

– 27 –
Office Use Only – Do NOT write anything, or make any marks below this line.
4074310368
Question 32 (continued)

(b) Design an algorithm to validate a date in the form DD/MM/YYYY and output the 5
equivalent long date, eg 29 October 2023.

Include all meaningful error messages to assist the user to understand why their
entered date is not valid.

You may use the following two library routines in your pseudocode:

• Extract(string, start, N)
eg Extract(“Names”, 3, 2) returns “me”
• Value(string) converts a string to its numerical value
eg Value(“42”) returns 42.

You may use the following two arrays (indexed from 1) in your pseudocode.

MonthName DaysinMonth

January 31

Do NOT write in this area.


February 28
March 31
April 30
May 31
June 30
July 31
August 31
September 30
October 31
November 30
December 31

Question 32 continues on page 29

– 28 –
Office Use Only – Do NOT write anything, or make any marks below this line.
9566310369
Question 32 (continued)

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................
Do NOT write in this area.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

End of Question 32
– 29 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0008310361
Section II extra writing space
If you use this space, clearly indicate which question you are answering.

Do NOT write in this area.

– 30 –
Office Use Only – Do NOT write anything, or make any marks below this line.
8952310367
Section II extra writing space
If you use this space, clearly indicate which question you are answering.
Do NOT write in this area.

– 31 –
Office Use Only – Do NOT write anything, or make any marks below this line.
2306310364
Section II extra writing space
If you use this space, clearly indicate which question you are answering.

Do NOT write in this area.

– 32 – © 2023 NSW Education Standards Authority

Office Use Only – Do NOT write anything, or make any marks below this line.
2770310369
1172 15360 5499310056

2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number
Software Design and
Development
Student Number
Section III

20 marks
Attempt either Question 33 or Question 34
Allow about 35 minutes for this section

Answer the question in the spaces provided. These spaces provide guidance for the expected
length of response.

If you include diagrams in your answer, ensure that they are clearly labelled.

Question 33 — Programming Paradigms (20 marks)

Please turn over

– 33 –
Question 33 — Programming Paradigms (20 marks)

(a) A system is required to allow users to compare cities based on their crime level
and population.

The following facts have been defined using the logic paradigm.

gpop(a_city, b_city) which means a_city has a greater population than b_city
hcrime(a_city, b_city) which means a_city has a higher crime rate than b_city

A rule called Better_City returns TRUE if a city has a higher population and lower
crime rate than another city.

(i) What additional fact(s) need to be defined for Better_City to return the 2
result that f_city is a better city than g_city?
...................................................................................................................

...................................................................................................................

(ii) Write the rule Better_City. 2

...................................................................................................................

...................................................................................................................

(iii) Explain why it is more appropriate to develop this system using the logic 3
paradigm rather than the imperative paradigm.

...................................................................................................................

...................................................................................................................
...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

Question 33 continues on page 35

– 34 –
8287310054

Question 33 (continued)

(b) Explain a benefit of instantiation in the object oriented programming (OOP) 3


paradigm. Include an example in your answer.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

(c) A programmer has been asked to develop a module for a large project. 4

Describe THREE factors that could influence the programmer’s choice of


paradigm for the module.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

Question 33 continues on page 37

– 35 –
BLANK PAGE

– 36 –
© 2023 NSW Education Standards Authority
1173 15360 8329310040

2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number
Software Design and
Development
Section III (continued) Student Number

Question 33 (continued)

(d) Software is to be developed to show how a dog is likely to behave: 3

• at different stages of its life (eg puppy, adult, old age)


• when reacting to the same command from different people (eg trainer, owner,
stranger).

Explain why using the OOP paradigm is appropriate for developing this
software. In your response, refer to relevant OOP concepts.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................
...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

Question 33 continues on page 38

– 37 –
3146310042

Question 33 (continued)

(e) Robots are used to serve food in a restaurant. The food is placed on a shelf of 3
a robot and a table number is entered, which tells the robot where to take the
food.

Between the kitchen and the table, there are several obstacles, such as other
robots, customers, chairs and other tables that need to be navigated.

Explain how heuristics and goals could be used in the software system for these
robots.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

End of Question 33

– 38 –
© 2023 NSW Education Standards Authority
1174 15360 8543310116

2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number
Software Design and
Development
Section III (continued) Student Number

Do NOT attempt Question 34 if you have already attempted Question 33.

Question 34 — The Interrelationship between Software and Hardware


(20 marks)

(a) Complete the following table. 2

Hexadecimal Binary
representation representation
B 1011

00011110

(b) Binary multiplication is also known as ‘shift and add’. 3

Perform the following binary multiplication, showing all working and clearly
indicating where the shifting occurs.

110110 × 101

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

Question 34 continues on page 40

– 39 –
Question 34 (continued)

(c) Numbers can be represented in binary as integers or as floating point numbers. 3

Compare the use of these representations for storing very large and very small
numbers.

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

...............................................................................................................................

Question 34 continues on page 41

– 40 –
5123310117

Question 34 (continued)

(d) Consider the following algorithm. 3

START

Get A, B, C

N
A = B?

Y
Y C = 0?

Output “0” N

Output “1”

FINISH

Draw a circuit with logic gates that will produce the same output as the
algorithm. You may use a truth table to assist you.

Question 34 continues on page 43

– 41 –
BLANK PAGE

– 42 –
© 2023 NSW Education Standards Authority
1175 15360 1158310201

2023 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number
Software Design and
Development
Section III (continued) Student Number

Question 34 (continued)

(e) Six robots are used to serve food in a restaurant. The food is placed on a shelf
of a robot and a table number is entered.

A controller sends data streams to the robots to specify their destination.

(i) If the robot senses an obstacle in its path, it stops and sends a data stream 3
to the controller. The controller then sends a stream to the robot causing
a warning beep to sound. The warning beep sounds until a staff member
presses a switch on the beeping robot.
A circuit inside the robot is needed to turn the beep on and keep it on
until turned off by the staff member.
Explain how a flip-flop can be used in this circuit. You may include a
labelled circuit with logic gates in your response.
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
Question 34 continues on page 44

– 43 –
Question 34 (continued)

The restaurant is in a square room, represented by a 10 × 10 two-dimensional


array called Room.

The table numbers are stored in that array, indicating their location in the room.

A typical set-up could be as shown.

5
3
1
2

4 6

For this set-up, Room(3, 2) contains 1, indicating that Table 1 is in row 3,


column 2 in the restaurant.

When an order is ready, one of the six robots is selected to take the food to a
designated table.

The structure of the data stream sent from the controller to each robot has the
following format:

RobotID Row of table location Column of table location

(ii) Write the binary data stream that sends Robot 5 to Table 4 using the 2
set-up shown.

...................................................................................................................

...................................................................................................................

Question 34 continues on page 45

– 44 –
3548310206

Question 34 (continued)

(iii) RobotID and TableNo have been determined for a particular order that is 4
ready for delivery. The module DirectRobot(RobotID, TableNo) generates
the data stream to send the robot with RobotID to the table TableNo.

Write an algorithm for the module DirectRobot(RobotID, TableNo), using


the two-dimensional array, Room, to determine the location of the table
and output the appropriate data stream.

You may use the function Bin(integer, n) which converts an integer to its
binary equivalent, using n bits.

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

...................................................................................................................

End of paper

– 45 –
BLANK PAGE

– 46 –
© 2023 NSW Education Standards Authority

You might also like