0% found this document useful (0 votes)
25 views50 pages

HSC Software Design & Development

Uploaded by

aarav.patel3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views50 pages

HSC Software Design & Development

Uploaded by

aarav.patel3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

NSW Education Standards Authority

2022 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
either pages 33 and 37 or pages 39, 43 and 47

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


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

Section II – 60 marks (pages 13–32)


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

Section III – 20 marks (pages 33–49)


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

1160
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 pseudocode keywords is associated with multiway selection?

A. CASEWHERE

B. IF

C. REPEAT

D. WHILE

2 A user is asked to enter the state in which they live, for example NSW, VIC, QLD.

Which screen element ensures that the entered value is valid?

A. Text box
B. Scroll bar
C. Check box
D. Drop down list

3 The day before a school’s swimming carnival, the sports teacher used spreadsheet
software to develop an application enabling her to store and process the results during
the carnival.

Which development approach did she use?

A. Agile
B. End User
C. Prototype
D. Structured

–2–
4 What type of system modelling tool is this?

A. IPO chart
B. Storyboard
C. Context diagram
D. System flowchart

5 Which of the following requires inclusivity to be considered when designing interfaces


for a proposed system?

A. Incomplete testing
B. A culturally diverse user base
C. The use of images created by others
D. The storage of sensitive customer data

6 What is the main benefit of collaboration between developers?

A. Removal of copyright issues


B. Training of more developers
C. Simplification of code maintenance
D. Production of a better-quality product

7 A large amount of data is to be accessed by different systems. The data is to be accessed


randomly.

What is the most effective way to store this data?

A. A relative file
B. A sequential file
C. An array of records
D. A two-dimensional array

–3–
8 Consider the following algorithm.
BEGIN
A=3
B=4
C=5
A=B+C
B=A
C=B
D=A+B+C
Display D
END

What output is produced?

A. 12
B. 16
C. 26
D. 27

9 A programmer needs to find out how to code a particular function in a specific


programming language.

Which type of documentation should they refer to?

A. Logbook
B. User manual
C. Data dictionary
D. Railroad diagram

10 Why would a developer choose to define a variable as global?

A. It results in code that executes more quickly.


B. It can be accessed and changed by all modules.
C. It allows the code to run on multiple platforms.
D. It can have different values in different modules.

–4–
11 What is the purpose of a benchmark report when developing software?

A. To ensure that the technology works under different conditions


B. To inform the choice of technology to be used in the proposed system
C. To document the standard that the developers must meet in the new system
D. To guarantee that the quality of the developed system meets defined criteria

12 Consider the following structure chart.

Locate item
details

Get next Find item Display ‘item Display item


item ID in list not found’ details

What is the purpose of the symbols shaped and ?

A. They indicate whether the item is found.


B. They indicate that a search was carried out.
C. They pass on the error message ‘Item not found’.
D. They pass on the item details that were found in the list.

–5–
13 The following algorithm is designed to calculate an average mark.

999 is used as a sentinel value.


BEGIN
Count = 0
Total = 0
Get Mark
WHILE Mark <> 999
Count = Count +1
Total = Total + Mark
Get Mark
ENDWHILE
Average = Total / Count
Display Average
END

When the algorithm is coded, compiled and executed, which type of error is possible?

A. Logic
B. Runtime
C. Syntax
D. System

14 The prototyping process in the early stages of developing a solution was more time-
consuming and expensive than anticipated.

Why could this have occurred?

A. There were logic errors in the initial algorithms.


B. The communication between the developer and the client was poor.
C. The modules to be incorporated in the solution were not readily available.
D. The developer selected an inappropriate programming language to implement the
solution.

–6–
15 Programs can be sequential or event-driven.

Which of the following statements is true?

A. Event-driven programs must include a loop to detect inputs.


B. Sequential programming is required for automated processes.
C. In an event-driven program, inputs do not affect the order in which modules are
executed.
D. In a sequential program, the user has no control over the order in which modules
are executed.

16 The list 7 9 2 4 1 is being sorted.

After the first pass the list becomes 7 2 4 1 9.

Which of the following shows the result of the next pass?

A. 1 2 4 7 9
B. 2 4 1 7 9
C. 2 7 4 1 9
D. 7 2 1 4 9

17 Which row of the table contains a correct statement about each search method when used
with an array?

Binary search Linear search


A. Continually discards half of the Will not search very large arrays
remaining elements
B. Only works on an even number Only applicable where each
of elements element in the array is unique
C. Can only be used with a sorted Looks at each element in order
array
D. Can only search an array with Takes twice as long as a binary
numerical data search

–7–
18 A program requires the user to enter the number of tickets to be purchased. This must be
an integer from 1 to 10 inclusive.

Which algorithm should be used to validate the entered data?

A. Get NumTick
WHILE NumTick <1 AND NumTick >10
Display “Please enter a valid number of tickets”
Get NumTick
ENDWHILE
ProcessPurchase

B. Get NumTick
REPEAT
Display “Please enter a valid number of tickets”
UNTIL NumTick > 0 AND NumTick < 10
ProcessPurchase

C. Get NumTick
IF NumTick <1 OR NumTick > 10
Display “Please enter a valid number of tickets”
ENDIF
ProcessPurchase

D. Get NumTick
WHILE NumTick <1 OR NumTick >10
Display “Please enter a valid number of tickets”
Get NumTick
ENDWHILE
ProcessPurchase

–8–
19 The array List( ) contains the following data.

index 1 2 3 4 5 6

List( ) 7 3 6 8 7 1

The following code fragment is run.


BEGIN change
index = 1
REPEAT
IF List(index) < List(index+1) THEN
List(index) = List(index + 1)
List(index + 1) = List(index)
ENDIF
add 1 to index
UNTIL index = 6
END change

Which of the following shows the contents of List( ) after execution?

A. 7 6 8 8 7 1

B. 3 6 7 7 1 8

C. 1 3 6 7 7 8

D. 3 3 6 7 1 1

–9–
20 Grades are allocated based on a mark as follows:

MARK Grade

0 to 49 D

50 to 64 C

65 to 74 B

75 to 100 A

Which of the following algorithms allocates the correct grade for an entered mark?

A. BEGIN
get mark
CASEWHERE mark is
greater than 49 : grade = “C”
greater than 64 : grade = “B”
greater than 74 : grade = “A”
OTHERWISE : grade = “D”
ENDCASE
display grade
END

B. Start

grade = “D”

get mark

mark
is greater
than

75 65 50

grade = “A” grade = “B” grade = “C”

display grade

Finish

Question 20 continues on page 11

– 10 –
Question 20 (continued)

C. BEGIN
grade = “D”
get mark
IF mark > 49 THEN
grade = “C”
ENDIF
IF mark > 64 THEN
grade = “B”
ENDIF
IF mark > 74 THEN
grade = “A”
ENDIF
display grade
END

D. Start

get mark

grade = “D”

Yes is mark No
> 49?
grade = “C”

is mark Yes
> 64?
grade = “B”
No

No is mark
> 74?

Yes

grade = “A”

display grade

Finish

End of Question 20

– 11 –
BLANK PAGE

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

Centre Number

Software Design and


Development Student Number

Section II Answer Booklet

60 marks
Attempt Questions 21–31
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
1161 15360
Question 21 (3 marks)

Describe TWO responsibilities of software developers when developing new systems. 3


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

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

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

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

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

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

Do NOT write in this area.

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

(a) Explain the need for maintenance in the software development cycle. 3
...............................................................................................................................

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

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

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

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

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

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

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

(b) One way of making future maintenance easier is by using explanatory comments 3
Do NOT write in this area.

in the code.

Explain TWO other ways in which programmers can write code that makes
maintenance of a software system easier.

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

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

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

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

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

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

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

Compare the use of an interpreter with the use of a compiler. 4

Consider the perspectives of both the programmer and the client.

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

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

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

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

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

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

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

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

Do NOT write in this area.


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

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

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

The following EBNF definitions specify syntax for a particular language. 3


Assignment = Make This <variable> , (That <variable>) | <value>

Iteration = WHILEEVER <condition> DO


<statement> [<statement>]
ENDWHILEEVER

Selection = WHEN <condition> DO


<statement> , {and <statement>}
ENDWHEN

Print = Display “ <value> ” | <variable>

Assume that variable, value, condition and statement are all defined elsewhere.

Consider the following code fragment using this language.

Line numbers are provided for reference only.


Do NOT write in this area.

1 Make This score , That age 18


2 WHILEEVER Score < 18
3 Display Score
4 Display “Underage”
5 Display “No entry”
6 ENDWHILEEVER
7 WHEN Score > 70 DO
8 Display “Retired” ,
9 Make Work = F
10 ENDWHEN

With reference to line numbers, describe THREE syntax errors in this code fragment.

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

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

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

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

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

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

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

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

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

A developer has been employed by a local high school to design and develop a study
app to track students’ HSC revision routines. The app must be ready as soon as
possible.

The app will:


• provide links to resources for all subjects that the school offers
• track the number of hours students are logged in to the site
• track the number of past examination papers accessed
• allow students to input questions for teachers
• send reminders to students who have not used the app.

(a) Recommend and justify a suitable development approach for this HSC revision 3
app.

Do NOT write in this area.


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

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

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

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

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

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

(b) Describe ONE benefit of the use of a pilot installation for this HSC revision app. 2
...............................................................................................................................

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

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

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

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

Question 25 continues on page 19

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

(c) Outline TWO reasons why system testing is necessary in the development of 3
this HSC revision app.

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

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

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

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

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

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

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

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

(d) Explain TWO factors outside the developer’s control which can affect the 3
quality of a user’s experience with this HSC revision app.

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

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

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

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

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

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

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

End of Question 25

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

Explain TWO ways in which CASE tools can improve the productivity of a 4
development team during the development of a large software project.

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

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

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

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

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

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

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

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

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

Do NOT write in this area.


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

– 20 –
Office Use Only – Do NOT write anything, or make any marks below this line.
1032310369
BLANK PAGE
Do NOT write in this area.

Please turn over

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

A fast-food ordering system is being developed for a restaurant. Authorised customers


will be able to select available food items.

The system will:


• authenticate the customer
• allow the customer to input their food choices
• calculate and display the total cost of the food items
• determine if the customer qualifies for a 10% discount on their order. This
occurs when their total purchases to date exceed $100
• electronically transfer the amount due from the customer’s account to the
restaurant’s account
• add the total cost of this order to the customer’s total purchases to date.

(a) Create an IPO diagram to represent the required processing in this system. 4

Do NOT write in this area.


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

...............................................................................................................................
Question 27 continues on page 23
– 22 –
Office Use Only – Do NOT write anything, or make any marks below this line.
7037310360
Question 27 (continued)

(b) Design an appropriate data structure to store customer details for this fast-food 3
ordering system. Do NOT include food choices in this data structure.

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

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

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

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

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

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

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

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

(c) Before the start of the development of this fast-food ordering system, the project 3
manager was provided with information about the project team, including how
many members are available and their skills.

Describe how the project manager can use Gantt charts effectively throughout
the development of this system.
...............................................................................................................................

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

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

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

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

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

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

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

End of Question 27

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

An algorithm was designed to remove repeating consecutive characters in a phrase,


replacing them with a single character.

The algorithm:
• allows input of a phrase
• removes repeated characters
• displays the shortened phrase.

For example, if the input is ‘aaaabbbaa’ the output will be ‘aba’.

Note: The function right (m, n) gets the last n characters of m.

There are errors in the algorithm.


1 BEGIN Shorten
2 input phrase

Do NOT write in this area.


3 phrase = phrase + “X” ‘Adds an X to the end of phrase
4 Len = number of characters in phrase
5 NewPhrase = “ ”
6 REPEAT
7 done = FALSE
8 NewPhrase = NewPhrase + 1st character of phrase
9 REPEAT
10 IF 1st character of phrase does not equal 2nd character of phrase THEN
11 done = TRUE
12 ENDIF
13 Len = Len - 1
14 phrase = right (phrase, Len)
15 UNTIL done = TRUE
16 UNTIL Len < 1
17 output phrase
18 phrase = NewPhrase
19 END Shorten

Question 28 continues on page 25

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

(a) Perform a desk check of the algorithm using dddg as input. 3


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(b) Identify and correct any logic errors in the algorithm. You may refer to line 3
numbers in your response.

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

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

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

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

End of Question 28

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

Using an example, explain why programmers need to use different data types in their 3
code.

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

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

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

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

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

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

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

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

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

Do NOT write in this area.

– 26 –
Office Use Only – Do NOT write anything, or make any marks below this line.
6577310368
BLANK PAGE
Do NOT write in this area.

Please turn over

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

Results( ) is an array containing 200 records. 5

The following table shows a sample of the array contents.

Index Name Score


1 Jones B 23
2 Ali B 45
3 Morris S 8
4 Nguyen T 45
... ... ...
200 Shankar R 8

Write an algorithm that:


• displays the highest score and the names of all people who have that score

Do NOT write in this area.


• displays the second highest score and the names of all people who have that
score.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Question 30 continues on page 29


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

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

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

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

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

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

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

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

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

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

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

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

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

End of Question 30

Please turn over

– 29 –
Office Use Only – Do NOT write anything, or make any marks below this line.
0008310361
Question 31 (5 marks)

(a) Contrast the purpose of the program counter with that of the accumulator. 2
...............................................................................................................................

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

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

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

(b) A CPU can carry out the following assembly language instructions. 3

Instruction and operand Meaning


LOAD y Load the contents of y into the accumulator
STORE y Store the contents of the accumulator in y
ADD y Add the contents of y to the accumulator

Do NOT write in this area.


SUBTR y Subtract the contents of y from the accumulator
JUMP address Jump to the instruction at ‘address’
JMPN address Jump to the instruction at ‘address’ ONLY if the
value in the accumulator is negative
OUTP Display the value in the accumulator
END Stop execution

Consider the following assembler code fragment.

Address Instruction Operand


Label 1 LOAD a
SUBTR b
JMPN Label 2
STORE a
LOAD d
ADD c
STORE d
JUMP Label 1
Label 2 LOAD d
SUBTR c
OUTP
END

Question 31 continues on page 31

– 30 –
Office Use Only – Do NOT write anything, or make any marks below this line.
8952310367
Question 31 (continued)

Assume that the variables a, b, c, d initially contain the values 6, 4, 1, 1.

This fragment of code is loaded into the CPU at address 2000.

Assume addresses are decimal numbers.

Each instruction is 4 bytes long.

Perform a desk check of the code by completing the following table.

Program
a b c d Accumulator Output
counter

2000 6 4 1 1
Do NOT write in this area.

End of Question 31

– 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 – © 2022 NSW Education Standards Authority

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

2022 HIGHER SCHOOL CERTIFICATE EXAMINATION

Centre Number
Software Design and
Development
Student Number
Section III

20 marks
Attempt either Question 32 or Question 33
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 32 — Programming Paradigms (20 marks)

(a) Describe abstraction in the context of object oriented programming. 2


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

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

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

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

Question 32 continues on page 34

– 33 –
Question 32 (continued)

(b) Consider the following fragment of code which has been written using the
object oriented programming (OOP) paradigm.
class BIRD {
public -
IDNo: Integer
BiologicalName: String
CommonName: String
CountryOfOrigin: String

GetWholeName(IDNo)
WholeName = BiologicalName & CommonName
Return Wholename
end GetWholename
}

subclass WATERBIRD is a BIRD {


public -
Wader: Boolean
Diver: Boolean
WaterHabitat: String
}

(i) With reference to the fragment of code above, explain the importance of 3
inheritance in the OOP paradigm.

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

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

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

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

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

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

Question 32 continues on page 35

– 34 –
8287310054

Question 32 (continued)

(ii) Write the code to define a subclass of WATERBIRD called SEABIRD 3


which has the following attributes and method.

Ocean the ocean where the bird is most commonly found


eg Pacific
MaxDistance the maximum distance the bird can fly, in whole
kilometres
MaxAltitude the maximum height at which the bird can fly, in
whole metres
HowHigh a method that returns the MaxAltitude flown by a
seabird with the common name entered by the user

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

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

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

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

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

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

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

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

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

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

(c) A system uses cameras to detect whether drivers have used their mobile phone 3
while driving.

Describe how software in this system can determine whether or not a driver has
used their phone.
...............................................................................................................................

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

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

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

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

...............................................................................................................................
Question 32 continues on page 37

– 35 –
BLANK PAGE

– 36 –
© 2022 NSW Education Standards Authority
1163 15360 8329310040

2022 HIGHER SCHOOL CERTIFICATE EXAMINATION

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

Question 32 (continued)

(d) The following facts have been defined using the logic paradigm.

larger(elephant, horse) means that an elephant is larger than a horse


larger(horse, donkey)
larger(donkey, dog)
larger(donkey, cat)

(i) Explain the result of the following query. 2

?- larger(elephant, cat)

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

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

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

(ii) The following rules are defined. 3


is_bigger(X, Y) :- larger(X, Y)
is_bigger(X, Y) :- larger(X, Z), larger(Z, Y)

Write a query to find animals that are both smaller than a donkey and
bigger than a cat.

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

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

Question 32 continues on page 38

– 37 –
3146310042

Question 32 (continued)

(e) Using examples, explain how the use of appropriate paradigms can improve the 4
productivity of a programmer.

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

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

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

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

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

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

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

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

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

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

End of Question 32

– 38 –
© 2022 NSW Education Standards Authority
1164 15360 8543310116

2022 HIGHER SCHOOL CERTIFICATE EXAMINATION

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

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

Question 33 — The Interrelationship between Software and Hardware


(20 marks)

(a) Show how TWO different integers can be represented by the binary number 2
10000011.

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

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

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

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

(b) Show how to calculate the 32-bit IEEE754 single precision floating point 3
1
number that represents the decimal fraction − .
32

The first step is done for you.

1
Convert to binary: − = − 0.00001
32

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

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

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

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

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

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

Question 33 continues on page 40

– 39 –
Question 33 (continued)

(c) Write a Boolean representation for the following logic circuit. 2

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

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

Question 33 continues on page 41

– 40 –
5123310117

Question 33 (continued)

(d) A logic circuit is needed to determine whether to hold an outdoor event, based 3
on current conditions.

The table defines the characteristics of the circuit.

Condition Symbol Input = 1 Input = 0


Day or night D Day Night
Temperature T Above 21° Equal to or below 21°
Rain R Rain No rain

An output of 1 means the event can be held.

Design a logic circuit to meet the following requirements:


• The event can be held at any time if it is not raining
• The event can also be held at night if the temperature is above 21 degrees,
even if it is raining.

You may use a truth table or Boolean algebra to assist you.


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

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

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

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

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

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

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

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

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

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

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

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

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

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

...............................................................................................................................
Question 33 continues on page 43

– 41 –
BLANK PAGE

– 42 –
© 2022 NSW Education Standards Authority
1165 15360 1158310201

2022 HIGHER SCHOOL CERTIFICATE EXAMINATION

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

Question 33 (continued)

Please turn over

– 43 –
Question 33 (continued)

(e) A basic robotic vacuum cleaner can move across the floor of a rectangular-
shaped room, vacuuming as it goes. The cleaner is circular, with four sensors as
shown below. Each sensor detects objects that the cleaner is about to bump into.

Sensor 1

Vacuum
Sensor 4 Sensor 2
cleaner

Sensor 3

Direction of
movement

A controller sends and receives data streams to and from the cleaner.

Looking down at a part of the room, it could appear as shown.


...

5 Robotic vacuum cleaner

Y 4

0 Controller

0 1 2 3 4 5 6 ...
X

The cleaner is currently at (3, 5).

Question 33 continues on page 45

– 44 –
3548310206

Question 33 (continued)

(i) Data stream from the controller to the cleaner 3

This data stream instructs the cleaner to either


• move to the specified coordinates
OR
• change direction and move one square.

The format of the 16-bit data stream depends on the type of move, as
specified in the first bit.

1 0
Type X coordinate (7 bits) Y coordinate (7 bits) Not
of used
move (1 bit)

OR

0 0 0 0 0 0 0 0 0 0 0 0 0 0
Type Direction Not used (13 bits)
of (2 bits)
move

The two direction bits are as follows:


00 – continue in the same direction and move one square
01 – change direction 90° anticlockwise and move one square
10 – change direction 90° clockwise and move one square
11 – change direction 180° and move one square.

What does the following data stream achieve?


1110010001010000
0010000000000000
0000000000000000

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

Question 33 continues on page 46

– 45 –
Question 33 (continued)

(ii) Data stream from the cleaner to the controller 3

As the cleaner moves around the room, it regularly sends a data stream
back to the controller.

The cleaner also indicates when the battery needs to be recharged.

The data stream has the following format:

Sensor

Battery
X coordinate (7 bits) Y coordinate (7 bits)

The sensor bit can be:


0 – no object sensed in the direction of movement OR
1 – object sensed in the direction of movement.

The battery bit can be:


0 – sufficient charge OR
1 – needs recharging.

The cleaner is currently at (42, 18). The battery needs recharging and the
sensors have not detected an object.

Create the data stream sent from the cleaner to the controller.
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................
...................................................................................................................

Question 33 continues on page 47

– 46 –
© 2022 NSW Education Standards Authority
1166 15360 9309310218

2022 HIGHER SCHOOL CERTIFICATE EXAMINATION

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

Question 33 (continued)

Please turn over

– 47 –
Question 33 (continued)

(iii) The controller is located at (5, 0) and contains a battery charger. 4

A module called Check_Battery is required to enable the following:

• The controller determines if the cleaner has a low battery by


checking the data stream sent by the cleaner.

• If so, the controller needs to send a data stream to recall the cleaner
back to the controller.

• As the cleaner moves back to the controller, it continues to send


data streams. If the cleaner’s sensor indicates an object in its path,
it is sent an instruction to change direction 90 degrees clockwise
and move one square if the path is clear.

• This process continues until the cleaner has arrived back at the
controller.

Design the required algorithm for Check_Battery.

Note: You can use the routine Extract (variable, start_bit, no_of_bits) in
your algorithm.

For example,
String = “110111”
Extract (String, 4, 2) takes the 4th and 5th bits (11) and converts them
to their decimal value (3).
...................................................................................................................

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

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

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

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

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

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

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

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

Question 33 continues on page 49

– 48 –
9892310215

Question 33 (continued)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

End of paper

– 49 –
BLANK PAGE

– 50 –
© 2022 NSW Education Standards Authority

You might also like