P3 - Mark Scheme

Download as pdf or txt
Download as pdf or txt
You are on page 1of 96

___________________________________________________________________________________________________

Topic 1: Mark Scheme Computer Science Paper 3 Topical

1  D (i) HomeAddress.ThisHouseNo ← 34 1

(ii) DECLARE ThisHouseNo: 1..10 1

DECLARE ThisTown: [Brightown, Arunde, Shoram] 1

(b) (i) TYPE WeatherStation


DECLARE StationID : STRING 1
DECLARE Latitude : REAL 1
DECLARE Temperature : ARRAY[1..15] OF INTEGER 1+1
ENDTYPE 1

(ii) StationID is hashed to produce home location 1


If home location is free insert record 1
Else use overflow method to find free location 1

2  D (i) 00101000 00000011


=0.0101 × 2 ↑3 [1]
=10.1 [1]
=2.5 [1]

(ii) For a positive number (mantissa starts with a zero) [1]


bit after binary point (second bit from left) should be a one [1]

(iii) 00101000 00000011


= 01010000 00000010 [1+1]
(b) (i) 01111111 0111111 [1+1]

(ii) 01000000 1000000 [1+1]


(iii) number will become too large to represent [1]
which will result in overflow [1]
(c) Any point 1 mark

0.1 cannot be represented exactly in binary


0.1 represented here by a value just less than 0.1
the loop keeps adding this approximate value to counter
until all accumulated small differences become significant enough to be seen
[max 3]

3  D (i) 01101000 0011


= 0.1101 (or 1/2 + 1/4 + 1/16) × 23 [1+1]
= 110.1
= 6.5 [1]

(ii) +3.5
= 11.1 [1]
= 0.111 × 22 (or indication of moving binary point correctly) [1]
= 01110000 0010 [1]

(iii) 01110000 Allow f.t. from (ii)


10001111 One’s complement on mantissa [1]
10001111 +1 Two’s complement [1]

= 10010000 0010 [1]


By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(b) (i) Precision/accuracy of numbers represented will increase [1]

(ii) Range of numbers represented will increase [1]

(c) Any point, 1 mark (max. 3)

0.1/0.2 cannot be represented exactly in binary // rounding error [1]


0.1 represented by a value just greater than 0.1 // 0.2 represented by a value
just greater than 0.2 [1]
adding two representations together adds the two differences [1]
summed difference significant enough to be seen [1]
[max. 3]

 (a) +2.5
= 010100000000 0010 [3]
Give full marks for correct answer (normalised or not normalised)

= 10.1 [1]
= 0.101 × 22 // evidence of shifting binary point appropriately [1]

[Max 3]

(b) –2.5
101100000000 0010
Give full marks for correct answer

One’s complement of 12-bit mantissa of +2.5 101011111111 – allow f.t. [1]


+1 to get two’s complement 101100000000 [1]

[Max 3]

(c) 3 [3]
Give full marks for correct answer

= 0.011 X 23 // exponent is 3 [1]


= 11.0 // (1/4+1/8) * 8 [1]

[Max 3]

(d) (i) Not normalised [1]

(ii) First two bits should be different for normalised number


// because the number starts with 00 [1]

(e) reduced accuracy [1]


increased range [1]

 (a) +3.5
01110000 00000010 [3]
Give full marks for correct answer (normalised or unnormalised)

= 11.1 [1]
= 0.111 × 22 // evidence of shifting binary point appropriately [1]

[Max 3]
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(b) –3.5
10010000 00000010 [3]
3 marks for correct answer

One’s complement of 8-bit mantissa for +3.5 10001111 – allow f.t. [1]
+1 to get two’s complement 10010000 [1]

[Max 3]

(c) 14 [3]
3 marks for correct answer

=0.111 X 24 // exponent is 4 [1]


=1110.0 / (1/2 + 1/4 + 1/8) * 16 [1]

[Max 3]

(d) (i) Normalised [1]

(ii) Leftmost two bits are different for normalised representation


// because the pattern starts with 01 [1]

(e)
[1]
1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
[1]

6 (a)(i) DECLARE Book : LibraryBookRecord 1

(a)(ii) Book.Title ← "Dune" 1

(b) TYPE LibraryBookRecord 3


DECLARE ISBN : INTEGER
DECLARE Title : STRING
DECLARE Genre : (Fiction, Non-Fiction) 1
DECLARE NumberOfLoans : 1 .. 99 1
ENDTYPE
mark for correct declaration and first two fields (note: only if attempt at
modification) 1

(c)(i) 6715 1

(c)(ii) 8216 1

(c)(iii) 88 1

(c)(iv) FALSE 1

(d)(i) Temp2 ← 22 1

(d)(ii) IntPointer ← @Temp1 1

(d)(iii) IntPointer^ ← Temp2 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

7 (a) Example: 1
Speed of access
Just used as a look-up file
No need for any serial or sequential processing
1 mark for any valid point

(b)(i) CustomerID RecordKey 1

802139 2139
700004 4
689998 89998
102139 2139

(b)(ii) Minimum value: 0 1 2


Maximum value: 99999 1

(b)(iii) PROCEDURE InsertRecord(CustomerID : INTEGER) 4


RecordKey ← CustomerID MOD 100000
Success ← FALSE
// Find position for new record and insert it
REPEAT
IF record at position RecordKey is empty
THEN
Insert new record at position RecordKey
Success ← TRUE
ELSE
IF RecordKey = 99999
THEN
RecordKey ← 0
ELSE
RecordKey ← RecordKey + 1
ENDIF
ENDIF
UNTIL Success = TRUE
ENDPROCEDURE

(c)(i) For security Max 2


If file is hacked then encrypted PIN cannot be used
Only encrypted PINs are transmitted and compared
1 mark for any valid point

(c)(ii) 1. Customer ID is read from card 3


2. Customer enters PIN
3. Customer PIN is encrypted
4. Customer ID is hashed
5. Customer record is located in file
6. PIN is checked against PIN in record
7. If match then transaction can proceed

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

8 (a)(i) DECLARE NewFriend : MyContactDetail 1

(a)(ii) NewFriend.HouseNumber ← 129 1

(b) Declaration of Name, Area, HouseNumber 1 3


Inclusion of three correct values for Area 1
Inclusion of correct range for HouseNumber 1

For example:

TYPE MyContactDetail
DECLARE Name : STRING
DECLARE Area : (uptown, downtown, midtown) 1
DECLARE HouseNumber : 1..499 1&1
ENDTYPE

(c)(i) 4402 1

(c)(ii) 33 1

(c)(iii) 3427 1

(c)(iv) TRUE 1

d)(i) IPointer ← @MyInt2 1

(d)(ii) MyInt1 ← 33 1

(d)(iii) IPointer^ ← MyInt2 1

9 (a) File organisation File access 4


method method

random sequential

serial direct

sequential

1 mark for random correct


1 mark for serial correct
2 marks for sequential correct (1 per correct line)

(b)(i) File
A: 3
Serial 1
Meter readings are submitted over time // added to the end of file 1
Stored chronologically 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(b)(ii) File B: 3
Sequential 1
Any two points from:
Each customer has a unique account number 1
Sorted on Account number 1
High hit rate // Suitable for batch processing monthly statements 1

(b)(iii) File C: 3
Random 1
Login without waiting // Random organisation allows fastest direct access to
required record 1
Low hit rate // Suitable for access to individual records 1

10 (a) 1 mark per bullet max 2 3


• 0101 = 5 (conversion of exponent to denary)
• 1.01110011010 = –0.10001100110
(conversion of mantissa to negative binary number)
• –10001.100110 (binary value)// –0.54980469 (denary value of
mantissa)
// –563/1024
Or
• Use exponent to denormalise mantissa

1 mark for correct answer


• = –17 19/32 // –17.59375

(b) 1 mark per bullet 3


• 5.25 = 101.01 (conversion to binary)
• = 0.10101 × 23 (evidence of shifting binary point appropriately)
• 010101000000 0011 (stored as mantissa and exponent)

(c) 1 mark per bullet 2


• (Size of mantissa decreased means that) precision is reduced
• (Size of exponent is increased means that) range is increased

11 (a) single data type that does not involve a reference to another type/usually 1
built in to a programming language

(b) 1 mark for data type, 1 for definition, max 4, 2 data types 4
• Integer
• Stores a whole number
• Boolean
• Stores true or false/1 or 0/on or off
• Real/Single/Double/Float/Decimal
• Stores decimal numbers
• String
• Stores zero or more characters
• Char
• Stores a single character
• Pointer
• Whole number used to reference a memory location

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(c) data type constructed from other data types 1

(d) 1 mark for naming, 1 for description, max 4, 2 data types 4


• Record
• collection of related items which may have different data types
• Array
• (Indexed) collection of items with the same data type
• List
• (Indexed) collection of items that can have different data types
• Set
• stores a finite number of different values that have no order //
supports mathematical operations
• Class/Structure
• Gives the properties and methods for an object

12 (a) CollegeStudent.StudentID ← 6539 1

(b)(i) 1 mark per bullet 2

• StudentCourse: ARRAY[1:6] OF

• All valid string options , for example:


DECLARE StudentCourse: ARRAY[1:6] OF ("Computer Science",
"Engineering", "Science", "Maths", "Physics", "Chemistry",
"Music", "Drama", "English Language")

(b)(ii) DECLARE StudentID: 1 .. 8000 1

(c)(i) 1 mark per bullet 4

• Type declaration TYPE and ENDTYPE


• Declaring Code as STRING
• Declaring Mark as ARRAY [1:6] OF INTEGER
• AverageMark as REAL

For example:
TYPE StudentAssessment
DECLARE Code : STRING
DECLARE Mark : ARRAY[1:6] OF INTEGER
DECLARE AverageMark : REAL
ENDTYPE

(c)(ii) Any 3 from, 1 mark per bullet 3

• StudentID/key field is hashed to produce home location


• If home location is free, insert record/data
• Else use overflow method to find free location to store record / data
• If no free location available then file is full and record/data cannot be stored

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

13 (a) 1 mark per bullet 3


• 21.75 = 010101.11 (conversion to correct binary)
• 0.1010111 × 25 (evidence of shifting binary point appropriately)
• 01010111 0101 (stored as mantissa and exponent)

(b) 1 mark per bullet, max 2 3


• 1110 = –2 (conversion of exponent to denary)
• 1.011000 = –0.101 (conversion of mantissa to negative binary number)// –
0.625 (denary value of mantissa)// –5/8
• –0.00101 (binary value) //
Or
• Use exponent to denormalise mantissa
1 mark for correct answer
• –5/32 // –0.15625

14 (a) Record 1

(b) Enumerated 1

(c) DECLARE BestSeller : Book 1

(d) BestSeller.Author ← "John Williams" 1

15 (a)(i) 1 mark per bullet point: 3

• Correct value for exponent identified e.g. (0.0111 × 2^)7


• Used to give correct value e.g. 111 000 (1/4 + 1/8 +1/16) × 128, 0.4375
• Correct answer i.e. 56

(a)(ii) The two most significant bits are 0 in the mantissa 1


// In mantissa, 2nd bit is not the inverse of 1st bit

(a)(iii) 1 mark per bullet point: 2

• Mantissa = 01110000
• Exponent = 0110

(b)(i) 1 mark per bullet point: 2

• Mantissa = 01111111
• Exponent = 0111

(b)(ii) 1 mark per bullet point: 2

• Mantissa = 01000000
• Exponent = 1000

(c)(i) Precision of numbers represented will increase 1

(c)(ii) Range of numbers represented will increase 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(d) 1 mark per bullet point to max 3: 3

• 0.1/0.2/0.3 cannot be represented exactly in binary / rounding errors


• adding two or more inaccurate representations together increases the
probability of inaccuracy
• giving an answer where the difference is significant enough to be seen

16 (a)(i) 1 mark per bullet point: 3


• Correct value for exponent identified e.g. (0.010101 × 2^)5
• Used to give correct value e.g. 1010.1 or 21/64 x 32
• Correct answer i.e. 10.5 // 10½

(a)(ii) 1 mark per bullet point: 3


• Correct binary value i.e. 111.1
• Value for exponent identified e.g. (0.1111 × 2^)3
• Correct answer i.e. 01111000 00000011

(a)(iii) 1 mark per bullet point: 3


• Any working method for conversion
• Applied accurately
• Correct answer i.e. 10001000 00000011

(b)(i) Largest (positive) number (in this format) 1

(b)(ii) Overflow // too large to represent // would become negative 1

17 (a) 2 marks for working shown 3


1 mark for the correct answer

Working:
• Correct calculation of negative value (any method) (= – 0.11010001101)
• Correctly moving the binary point 7 places (= – 01101000.1101)
// Exponent 7

Answer:
13
• −104.8125 // –104
16

(b) 2 marks for working shown 3


1 mark for the correct answer

Working:
• Correct conversion to binary (01.1001)
• Correct calculation of exponent (1)

Answer:
• (Mantissa) 0110 0100 0000 (Exponent) 0001

(c)(i) 1 mark per bullet point 2

• Mantissa = 0111 1111 1111
• Exponent = 0111

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(c)(ii) 1 mark per bullet point 2

• Mantissa = 0100 0000 0000
• Exponent = 1000

(d) 1 mark per bullet point to max 3 3

• The trade-off is between range and precision


• Any increase in the number of bits for the mantissa, means fewer bits
available for the exponent // Any decrease in the number of bits for the
mantissa, means more bits available for the exponent
• More bits used for the mantissa will result in better precision
• More bits used for the exponent will result in a larger range of numbers
• Fewer bits used for the mantissa will result in worse precision
• Fewer bits used for the exponent will result in a smaller range of
numbers

18 (a)(i) 2 marks for working 3


1 mark for correct answer

Working:
• = 0. 0110111 x 2^5 places // exponent = 5
• = 1101.11 (moving bp 5)

Answer:
• = 13.75 // 13 ¾

(a)(ii) The first two bits of the mantissa are 0 / the same / not different / are not 01 1

(a)(iii) 1 mark per bullet point 2


• Mantissa = 01101110
• Exponent = 0100

(b)(i) 2 marks for working 3


1 mark for correct answer

Working:
• 01011.101
• 0.1011101 × 2^4 // showing calculation of exponent = 4

Answer:
• 01011101 0100

(b)(ii) 2 marks for working 3


1 mark for correct answer

Working:
• 10100.011 // 10100011 correct use of two’s complement or other method
• Exponent = 4

Answer:
• 10100011 0100

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(c) 1 mark per bullet point (max 3) 3

• 0.2/0.4 cannot be represented exactly in binary / rounding error


• 0.2 has been represented by a value just greater than 0.2 // 0.4 has been
represented by a value just greater than 0.4
• Therefore multiplying these two representations together increases the
difference
• difference after the calculation is significant enough to be seen (given the
number of positions after the decimal place)

19 (a)(i) 1 mark per bullet point 3

• Exponent 0010 = 2
41 1 1
• Mantissa 0.1010010 becomes 010.10010 // // 2 + +
64 2 16
9
• Answer 2 // 2.5625
16

(a)(ii) 1 mark per bullet point 3

1
• − 3.75 = 100.01000 // – 4 +
/ 0.25
4
• 100.01000 becomes 1.0001000 Exponent = + 2
• Answer: Mantissa = 10001000 Exponent = 0010

(b) Only the range is increased (no effect on precision) 1

(c) 1 mark per bullet point to max 1 1

• There is no exact binary conversion for some numbers


• More bits are needed to store the number than are available

(d) First term: Overflow 2


Second term: Underflow

20 (a) 1 mark per bullet point to max 2 2

• No suitable data type is provided by the language used


• The programmer needs specify a new data type
• that meets the requirements of the application / program

(b)(i) 1 mark per bullet point 4

• EmployeeID declared as STRING


• Sales, Technical and CustomerServices
• … with commas in-between
• ENDTYPE

TYPE Employee
DECLARE EmployeeID : STRING
DECLARE EmployeeName : STRING
DECLARE Department : (Sales, Technical,
CustomerServices)
DECLARE Salary : 25000..150000
ENDTYPE
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

(b)(ii) DECLARE NewEmployee : Employee 1

(b)(iii) NewEmployee.EmployeeID ← "02244" 1

(b)(iv) 1 mark per bullet point to max 2 2

• Array
• List
• Set
• Collection
• Class
• Stack
• Queue
• Linked list
• Dictionary

21 (a) 1 mark per bullet point 3

Page:
• Virtual Memory is divided into blocks of a fixed size

Page frame:
• the main memory is divided into page frames of the same size as a
page

Page table:
• the Page (Map) table shows the mapping of pages to page frames

(b) 1 mark per bullet point to max 3 3

• To allow multiprogramming / multitasking to take place


• To ensure fair usage of the processor
• To ensure fair usage of peripherals
• To ensure fair usage of memory
• To ensure higher priority tasks are executed sooner
• To ensure all processes have the opportunity to finish

(c) A signal from a software source or hardware device seeking the attention 1
of the processer

(d) 1 mark per bullet point in the order given 3

• JOB32
• JOB42
• JOB42

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 1: Mark Scheme Computer Science Paper 3 Topical

22 (a)(i) 1101 1

(a)(ii) 011100000000 1

(a)(iii) 1 mark for positive, 1 for justification 2


• Positive
• the most significant / first bit in the mantissa is 0

(a)(iv) 1 mark per bullet point 3


• Exponent = 1011 = − 3 // binary point moved 3 places left
• Mantissa 0.111 becomes 0.000111 // ⅞ // ½ + ¼ + ⅛ // 2-1 + 2-2 + 2-3
• Answer: 7 / 64 // 0.109375

(b) 1 mark per bullet point 2


• Increases the range
• Decreases the precision

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

1  D Description Type of LAN

any packet the listening computer bus with


receives may be part of a message for terminators at
that computer each end
1

connection provided through an access star


point 1

a process for handling collisions has to wireless 1


be implemented

listening computer only receives packets


that are addressed to this computer

1 mark for correct arrow(s) from each description

(b) (i) Server: central computer 1


stores files that are to be downloaded 1

(ii) Command: user can send action/instruction 1


(or by example, e.g. change directory)
that are carried out on server 1

(iii) Anonymous: allows user to access files 1


user does not need to identify themselves to server 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

2  D Any point 1 mark

sender’s IP address
receiver’s IP address
packet sequence number
checksum
[Max 2]

(b) Any point 1 mark

email has been split up into packets


packet has destination address
packets pass through many different routers in journey
packets don’t take same route
routers use IP addresses
packets reassembled at destination to rebuild email
[Max 3]

(c) Any point 1 mark

email message is only read when all of it is received


time delays due to lost / delayed packets not significant
so sending different packets by different routes is not issue / is efficient
packets arriving out of order not an issue
no requirement for a continuous circuit (circuit switching)
[Max 2]

(d) Circuit switching [1]

(e) e.g. real-time video / video conferencing [1]

Any point 1 mark

circuit made available is dedicated to this communication stream


full bandwidth available / no sharing
no lost packets
guaranteed quality of service [Max 2]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

3 (a) dedicated circuit/channel/physical path [1]


which lasts for duration of connection [1]

(b) e.g.
cs: gives dedicated circuit [1]
ps: split into packets/chunks [1]
ps: sends packets on individual routes [1]
cs: whole bandwidth available // ps: shares bandwidth [1]
cs: faster data transfer [1]
cs: packets arrive in order they are sent [1]
cs: packets cannot get lost [1]
cs: better for a real-time application [1]
ps: packets may arrive out of order so delay until packet order restored [1]
ps: packets may get lost so retransmission causes delays [1]
[max. 6]

(c) web page divided into packets/chunks [1]


each packet has destination address [1]
router looks at IP address… [1]
and decides where to send packet next for most efficient path [1]
packets can take different routes [1]
home computer reassembles packets to rebuild web page [1]
[max. 3]

 (a) (i)
Application [1]

Transport

Internet [1]

Network / Link [1]

(ii) software / module / program / code [1]

(b) (i) For example:


check packet port … [1]
to identify the application type [1]
check packet destination socket … [1]
so that packet sent to correct application [1]
check incoming packet sequence number … [1]
to ensure data is reassembled in correct order [1]
recalculate checksum of packet … [1]
to ensure integrity of packet [1]
if packet checksum invalid … [1]
send message to have packet retransmitted [1]
[Max 2 tasks]

[Max 4]

(ii) HTTP / HTTPS [1]

(iii) POP3 [1]


By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

 (a) (i) A set of rules … [1]


governing communications/transmission of data /sending and receiving data [1]

(ii) For example, (Web) browser / email client [1]

(iii) For example, Web server / email server [1]

(iv) Security //example: for example, alteration of transmitted messages [1]


Privacy // for example, only intended receiver can view data [1]
Authentication // for example, trust in other party [1]

[Max 2]

(b) For example:

which protocol will be used… [1]


there are a number of different versions of the two protocols [1]
session ID … [1]
uniquely identifies a related series of messages between server and client [1]
session type … [1]
reusable or not [1]
encryption method … [1]
public / private keys to be used // asymmetric/ symmetric [1]
authentication method … [1]
use of digital certificates / use of digital signature [1]
compression … [1]
method to be used [1]

[Max 2 parameters]

[Max 4]

(c) For example:

banking [1]
private / secure email [1]
shopping [1]
financial transactions [1]
secure file transfer [1]

[Max 2]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

6 (a)
Computer A Computer B Server 4×
Computer to
Switch
[1]

Server to
Computer C Computer D Switch Switch
[1]

(b)
Statement True False

All packets must be routed via the server. 9 [1]

Computer B can read a copy of the packet


9 [1]
sent from the Server to Computer A.

No collisions are possible. 9 [1]

(c) (i) Router / Switch / Bridge [1]

(ii) Router uses IP addresses in making decisions [1]


Router has routing table [1]
Routing table has entry for associated network ID // routing table has entry for host
address // routing table used to make decision on where to route packet [1]

Switch / Bridge use MAC addresses [1]


MAC address table created [1]
Switch / bridge use MAC address table to make decision on where to route packet [1]

[Max 2]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

7 (a)(i) 
Packet: 2
Both web page and web page request are split into packets 1
Each packet is sent individually from device to device 1

(a)(ii) Router: Max 2


Transmit packets
Contain connections to many other routers
When packets arrive at router, router decides where next to send packet
1 mark for any valid point

(a)(iii) TCP/IP: 2
Is the protocol 1
Rules for communication between web server and browser 1

(b)(i) Two from: Max 2


Picture and sound not synchronised 1
Interruptions // video not continuous 1
Can be degraded by other competing traffic 1

(b)(ii) Dedicated communications channel between the two communicating devices 1 2


Established prior to start of communication // removal of links at end of
communication 1

(b)(iii) In packet switching, packets can take different routes and may not arrive in Max 3
order
Will arrive in order (only one route)
As packets can take many different routes / share paths with others can be
delayed
Dedicated circuit has full bandwidth
No loss of synch
1 mark for any valid point

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

8 (a) Option 1 Option 2 3

Application Layer Application Layer


Transport Transport (Layer) 1
Internet Network (Layer) 1
Network Interface (Data) Link (Layer) 1

(b)(i) Peer-to-peer 1

(b)(ii) Filesharing 1

(b)(iii) Any four points from the following: Max 4


• Torrent descriptor file is made available
• File to be shared is split into pieces
• BitTorrent client software made available to other peers / users / computers
Allowing them to work as seeds or leeches.
A peer can act as a ‘seed’ – used to upload pieces of a file
Peer downloading file can get pieces from different seeds simultaneously
• Once a peer has a piece of the file it can become a seed for the parts
downloaded
Leeches download much more than they upload
• Central server called a tracker keeps records of all the peers (‘swarm’) and
the parts of the file they have
Can pause and restart at any time.

(c) Any two protocols from: Max 4


HTTP/HTTPS « 1
Used for transfer of web pages from server to client 1
FTP « 1
Used for interactive file transfer 1
SMTP « 1
Used for sending email messages 1
POP3 « 1
Used for incoming email messages 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

9 (a) 1

Computer Computer Computer


Switch Server
A B C

Three lines with arrows – one from each device to switch

(b) Statement True False 4

The server can send packets to Computer B and


9 1
Computer C at the same time.
The network software on each computer needs to
9 1
include collision detection and avoidance.
Computer B can read the packet sent from the
9 1
server to Computer C.
Computer A can send a packet to Computer B and
at the same time the server can be sending a packet 9 1
to Computer C.

(c)(i) Device: Server 1 2


The server can provide a (software) firewall // The server can check all internet
traffic // Server acts as proxy 1
Device: Switch 1
Internet traffic by passes the server // Server not overloaded with internet
traffic // connected to all computers 1
1 mark for device, 1 mark for suitable reason

(c)(ii) • Router acts as gateway 2


• Router acts as a firewall
• The LAN and the Internet are two different networks
• (may) operate on different protocols
• Router forwards packets between networks
• Router has a public IP address
• Router holds a list of local addresses
• Router translates local addresses to Internet (IP) addresses (and vice
versa)
1 mark for each point, max 2

(c)(iii) • Each packet has the IP address of the web server / destination 3
address
• The routers use routing tables
• Routers on the Internet forward packets towards destination
• Packets can take different routes from source to destination
• Packets are reassembled in order at the web server
1 mark for each point, max 3

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

10 (a)(i) A (known) set of rules 1 2


Agreed/standard method for data transmission // governs how two devices
communicate 1

(a)(ii) Max 2 marks for purpose: Max 3


• Purpose of TLS is to provide for secure communication (over a
network)
• maintain data integrity
• additional layer of security

Max 2 marks for further explanation from:


• TLS provides improved security over SSL
• TLS is composed of two layers / record protocol and handshake
protocol
• TLS protects this information by using encryption
• Also allows for authentication of servers and clients

(b) • The client validates (the server’s) TLS Certificate 3


• The client sends its digital certificate (to the server if requested)
• Client sends an encrypted message to the server using the server’s
public key
• The server can use its private key to decrypt the message «
• « and get data needed for generating symmetric key
• Both server and client compute symmetric key (to be used for
encrypting messages) // session key established
• The client sends back a digitally signed acknowledgement to start an
encrypted session
• The server sends back a digitally signed acknowledgement to start an
encrypted session
1 mark for each point, max 3 points

(c) Applications, for example: 2


• online banking
• private email
• online shopping
• online messaging etc.
1 mark for each point, Max 2

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

11(a) 2
Computer
Server
A
Router
T

T Computer Computer
Internet
B C

Each device has a single connection to the bus (1)

One terminator at each end (1)

The terminators do not need to be labelled as long as they are obvious

(b) Statement True False 4

The server can send packets to Computer B and the


9 (1)
router at the same time.
Computer C uses the IP address of a web server to
9 (1)
send a request for a web page on the web server
Computer B can read a packet sent from Computer
9 (1)
A to Computer C.
The server can read all incoming packets from the (1)
9 9
Internet.

(c)(i) • Only one transmission is allowed on the bus at any one time // only one 2
packet can be transmitted on the bus at any one time (1)
• The two packets from A and B cannot both use the bus at the same time
(1)
• The attempts to transmit will be unsuccessful, because the stations will
realise that the bus is busy (1)
• Reference to CSMA/CD (1)
• Collision causes a change in voltage of the bus (1)
1 mark for each point, max 2

(c)(ii) One mark for valid point, max 2 2

• Calculate a random wait time


• Wait for the random time
• Check for idle bus // Check status of bus
• Attempt to re-transmit / re-send
• If unable to transmit, repeat process

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

(d)(i) • Star topology (1) 2


• Where each computer / device has its own dedicated connection to the
server (1)

Alternative answers:

Mesh topology (1)


Every device connects directly to every other device (1)

Ring topology (1)


Use of tokens means no collisions // Every device examines every packet (1)

(d)(ii) As each computer is now not sharing a single bus // has dedicated path (to 2
the server) (1)
Collisions cannot occur (1)

Alternative answers:

Mesh
As each device now has a direct path to all the others (1)
Collisions cannot occur (1)

Ring
Packets all travel in the same direction (1)
Collisions cannot occur (1)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

12 (a)(i) 1 mark per bullet, max 1 benefit, max 1 drawback 2

Benefits
• Signals only go to destination//secure
• Easy to connect/remove nodes or devices/trouble shoot.
• Centralised management helps in monitoring the network.
• Failure of one node or link doesn’t affect the rest of network.
• Performance does not degenerate under load
• Connections may use different protocols
• Fewer collisions
Drawbacks
• If central device fails then whole network goes down.
• Performance is dependent on capacity of central device.

(a)(ii) 1 mark per bullet, max 1 benefit, max 1 drawback 2

Benefits
• Easier to set-up/extend.
• Less cable required
Drawbacks
• If the main cable breaks, network performance badly degraded.
• Difficult to detect and troubleshoot fault at an individual station.
• Efficiency reduces as the number of devices connected to it
increases.
• Collisions // not suitable for networks with heavy traffic.
• Security is lower (because several computers receive the sent
signal from the source.)

(b) 1 mark for each correct pair of letters in the right order max 3 3

1 Computer X sends a connection request to Computer Y.


2 Computer Y sends ready or busy signal.
3 If busy, Computer X waits and then resends the connection request to
Computer Y.
4 D
5 A
6 C
7 B

(c)(i) 1 mark for each layer 3

Protocol Layer
TCP Transport
IP Internet/Network
SMTP Application

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

(c)(ii) Any three points from: 3


• BitTorrent client software made available
• One computer must keep a complete copy of the torrent/file to be
shared
• Torrent/file is split into small pieces
• A computer joins (a swarm) by using the BitTorrent software to load
a torrent descriptor file
• The computer can now download a piece of the file
• Once a computer has a piece it can become a seed and upload (to
other members of the swarm)
• Pieces of the torrent are both downloaded and uploaded (by each
member of the of the swarm)
• A server called a tracker keeps records of all the computers in the
swarm
• The tracker shares their IP addresses allowing them to connect to
each other

13 (a) 1 mark per correct row 5

Responsibility TCP IP
Correct routing 9
Host to host communication 9
Communication between networks 9
Retransmitting missing packets 9
Reassembling packets into the correct order 9

(b) 1 mark for name, 1 mark for matching use, max 4 for 2 protocols 4

• POP3/IMAP (1) receiving emails // download emails from a server (1)


• SMTP (1) sending emails (1)
• FTP (1) allows files to be transferred from one computer to another (1)
• HTTP/HTTPS (1) transfer of web pages/hypertext (1)
• Bit Torrent (1) used for peer-to-peer file sharing (1)

(c) Internet / Network (layer) 1

(d)(i) 1 mark per bullet to max 4 4

• Message data / payload


• IP version number
• Internet header length
• Type of service
• Explicit Congestion Notification
• Total length/size of packet (in bytes)
• Identification / sequence / packet number
• Fragmentation flags
• Fragmentation offset
• Time to live // number of hops
• Protocol
• (Header) checksum
• Source (IP) address
• Destination (IP) address
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

(d)(ii) 1 mark per benefit, 1 mark per expansion, max 4 for 2 benefits 4

For example :

• alternative route available«


• in case of network problem
• If packet fails to arrive«
• then only that packet has to be resent

(d)(iii) 1 mark per bullet to max 2 2

• Network ID // (IP Address of) network destination (1) Subnetmask (1)


• Routing metric // data to decide best route
• (IP Addresses of possible) next hop / Gateway
• Interface

14 (a) 1 mark per bullet point to max 2: 2

• to only allow data to be sent when the line is idle


• to detect a collision on the network
• to halt transmissions when a collision occurs
• calculates random wait time
• allow retransmission after a random amount of time

(b)(i) 1 mark per bullet point to max 3: 3

• allows applications to exchange data


• establishes and maintains a connection
• until exchange of data is complete
• determines how to break application data into packets
• adds sequence / packet number to (TCP) header
• sends packets to and accepts packets from the network / Internet layer
• manages flow control // manages congestion avoidance
• acknowledges all packets that arrive
• detects when a packet has not arrived at destination
• handles retransmission of dropped packets
• reassembles packets into the correct order

(b)(ii) 1 mark per bullet point to max 2 2

• routes the packets around the network


• adds to the IP header a source/destination address for each packet
• encapsulates data into datagram
• passes datagram to the network access layer (for transmission on the
LAN)// passes datagram to the transport layer (on arrival at destination)
• Defines the addressing method e.g. subnetting, NAT

(b)(iii) HTTP(S) // FTP // POP3 // SMTP // UDP // etc... 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

(c) 1 mark for appropriate protocol in each layer 3

Layer Protocol

Application HTTP(S) // FTP // POP3 // SMTP // UDP etc...

Transport TCP

Internet IP

(d) 1 mark per bullet point to max 4: 4

• Message is split into packets


• Each packet is a fixed size
• Each packet is given a header .
• including destination IP address, sequence number etc.
• Packets are forwarded from one LAN to the other LAN
• Packets may take different routes
• Missing packets are requested to be resent
• Packets re-assembled into order at destination

15 (a) 1 mark per bullet point to max 3: 3


• Must have a central device
• Each node is connected to the central device
• Each node has a dedicated connection
• Each connection must be bidirectional
• Nodes may operate under different protocols

(b)(i) 1 mark per bullet point to max 2: 2


• dedicated circuit/channel/(physical) path
• connection established before/at the start of the communication
• which lasts for duration of connection // circuit released at end of the communication
• all data is transmitted along the same route
(b)(ii) 1 mark for each row: 4

Statements Circuit switching Packet switching

Shares bandwidth 9

Data may arrive out of order 9

Data can be corrupted 9 9

Data are less likely to get lost either9 or9

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

16 (a)(i) 1 mark per bullet point 3


Diagram shows: z All four devices labelled and connected
directly to the server
• And no other device
• Two-way flow of data between each device
and the server

Computer Printer
1 Server
Computer
Computer

(a)(ii) 1 mark per benefit and 1 mark for a further explanation in context to max 2 4
(x2)
For example:
• Personal data (used by admissions department) is kept secure
• transmissions only go between server and destination

• A new device/employee can be easily added to the network


• only one connection direct to server needs setting up

• If one node or link fails


• the other employees can continue working / the rest of network is
unaffected

• If the department has a range of different devices


• they can all operate at different speeds or with different protocols

(b) 1 mark per bullet point (max 3) 3


• Carrier Sense Multiple Access (with) Collision Detection
• Before transmitting a device checks if the channel is busy
• If it is busy the device waits // if channel free data is sent
• When transmission begins the device listens for other devices also
beginning transmission
• If there is a collision, transmission is aborted / transmitting a jam signal
• Both devices wait a (different) random time, then try again

(c)(i) 1 mark per bullet point (max 2) 2


• Allows (internal) connections between the university LANs
• Allows external connection from the main LAN

(c)(ii) 1 mark per bullet point (max 2) 2


• Provides device with a MAC address
• to uniquely identify it on the network
• Allows each individual device to connect to the network

(c)(iii) 1 mark per bullet (max 2) 2


• Allowing devices to connect to the LAN via radio communication
• instead of using a cable
• easy to move a device to as different location

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

17 (a) Circuit switching 1

(b) 1 mark 3
Any real-time application e.g. video conferencing // live streaming of a concert

Justification 1 mark per bullet to max 2


• reduced latency
• there are little/no delays in sending/receiving data once the circuit is set up
• because (stringent) error checking (as used in packet switching) is not
required
• circuit made available is dedicated to this communication stream

18 (a) 1 mark per bullet point to max 2 2

• Provide a set of standards for transmission of data


• that gives a known/accepted set of rules for transmitting and
receiving data
• This enables communication/compatibility between devices from
different manufacturers/platforms etc.

(b) 1 mark per bullet point to max 3 4

• Carrier Sense Multiple Access (with) Collision Detection


• Before transmitting a device checks if the channel is busy
• If it is busy the device waits // if channel free data is sent
• When transmission begins the device listens for other devices also
beginning transmission
• If there is a collision, transmission is aborted / transmitting a jam signal
• Both devices wait a (different) random time, then try again

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

19 (a) 1 mark per bullet point 4

• Application
• Transport
• Internet / Network
• Data Link

(b)(i) 1 mark per bullet point to max 2 2

• Packet switching makes best use of the available (channel) capacity


• by using alternative routes
• which is more secure / robust
• as packets to / from different sources and destinations can share the
same route

(b)(ii) 1 mark per bullet point to max 2 2

• To store data about packet


• and its routing // to ensure it reaches its destination
• ... to ensure that message can be properly reconstructed
(b)(ii) 1 mark per item to max 3 3

For example:
• IP address of sender
• IP address of destination
• IP version
• Number of packets the message consists of
• ID number of that packet
• Protocol used
• Packet length
• Time to live // max number of hops
• Synchronisation data
• Source port
• Destination Port
• Checksum

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 2: Mark Scheme Computer Science Paper 3 Topical

20 (a) 1 mark per appropriate term: 4

Computer 1 and Computer 2 are on the same bus network. Computer 1 sends a
message to Computer 2. Before the message is sent, it is split into packets.
Computer 1 needs to check that the line / path / bus / channel is free before
sending the message, otherwise a collision will occur that will be managed by
the CSMA/CD protocol.

(b) 1 mark per bullet point, max 2 marks per device: 4

Router
• Contains a routing table
• holds the (private) IP / MAC addresses of the devices on the bus
• provides the public IP address for the network
• forwards packets to the correct IP / MAC address
• may contain a firewall / proxy server

NIC
• Has a (unique) MAC address
• to identify a device
• Provides a hardware interface // physical connection between computer and
network // connection to Ethernet cable

(c)(i) 1 mark per bullet point to max 2 2

• Wireless Access Points // WAP


• Wireless Network Interface Card // WNIC // Wireless adapter
• Wireless Router
• (Wireless) Repeater

(c)(ii) 1 mark per bullet point to max 4 4

Send (max 3 marks)


• Encrypts the data (using TKIP or AES)
• encodes the data into radio / analogue signal
• Listens for other radio signals
• Transmits / broadcasts when quiet
• using an antenna / WNIC / WAP / aerial

Receive (max 3 marks)


• (Constantly) checking / tuning into / detecting signals
• Receives radio / analogue signal
• using an antenna / WNIC / WAP / aerial
• Checks if the signal is for that device
• If so, decodes the signal
• and decrypts the data

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

1 (a) (i)
Circuit 1

A B X 1

0 0 1

0 1 0

1 0 0

1 1 0

(ii)
Circuit 2

A B X 1

0 0 1

0 1 0

1 0 0

1 1 0

(b) (i) circuit 1 A + B 1


1
circuit 2 A . B

(ii) 1
A+ B ≡ A.B

(c)
( A.B ) + B
mark as :
( A.B ) 1
+B 1
bar over whole expression 1

(d)
( A.B ) + B
1
= ( A.B ) . B
1
= ( A.B ).B
1
= A.( B.B )
= A.0 1
=0 1
max 3
allow f.t. from (c)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

2 (a)
Description Type of
processor
Makes extensive use of
general purpose registers RISC I mark for
correct arrow
from each
description

Many addressing modes


are available CISC

Has a simplified
instruction set
[3]

(b) (i)
Time Interval

stage 1 2 3 4 5 6 7 8 9

Fetch instruction A B C

Decode instruction A B C

Execute instruction A B C Completing the As


(1 Mark)

Access operand in memory A B C B in column 2,


Row 1 (1 Mark)

Write result to register A B C Remainder completed


(1 Mark)
[3]

(ii) With pipelining no of cycles = 7 [1]


Without pipelining no of cycles = 3 * 5 = 15 [1]
No of cycles saved = 8 [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

3 (a) (i) A .B.C + [1]


A.B. C [1]
+
A.B.C [1]

(ii)
AB

00 01 11 10

0 0 0 1 0
C
1 0 1 1 0 [1]

(iii)
AB

00 01 11 10

0 0 0 1 0 1 mark for each loop


C
1 0 1 1 0

Allow f.t. from (ii)


[2]

(iv) X =
A.B [1]
+ B.C [1]
Allow f.t. from (iii)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(b) (i)
AB

00 01 11 10
1 mark row headings
00 0 1 1 0
1 mark column headings
01 0 0 0 0
CD 1 mark per 2 correct
rows (based on headings)
11 0 0 1 0

10 0 1 1 0

[4]
(ii)
AB

00 01 11 10

1 1 mark for loop with two 1s


00 0 1 0

1 mark for looping the four 1s


01 0 0 0 0
CD
1
11 0 0 0

10 0 1 1 0

[2]

(iii) X =
B.D [1]
+ A.B.C [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

4 (a) 1 mark for correct arrow from each description


Computer
Description Architecture

A computer that does not have


the ability for parallel SIMD
processing

The processor has several


ALUs. Each ALU executes the
MISD
same instruction but on
different data.

There are several processors.


Each processor executes
different instructions drawn
from a common pool. Each SISD
processor operates on different
data drawn from a common
pool.

There is only one processor


executing one set of
MIMD
instructions on a single set of
data.

[4]

(b) (i) Massive: many/large number of processors // hundreds/thousands of processors [1]

(ii) Parallel: to perform a set of coordinated computations in parallel/simultaneously [1]

(c) processors need to be able to communicate … [1]


so that processed data can be transferred from one processor to another [1]

suitable algorithm/program/software/design // appropriate programming language [1]


which allows data to be processed by multiple processors simultaneously [1]

[Total: 10]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

5 (a) (i)
Z = P. Q . R + [1]
P. Q.R + [1]
P.Q.R [1]

(ii)
PQ

00 01 11 10

0 0 0 0 1
R
1 0 0 1 1
[1]

(iii) 1 mark each loop


PQ

00 01 11 10

0 0 0 0 1
R
1 0 0 1 1

Allow f.t. from (ii) [2]

(iv)
Z=
P. Q [1]
+ P.R [1]

Allow f.t. from (iii)

(b) (i) 1 mark row headings. 1 mark column headings.


1 mark per 2 correct rows (based on headings)
PQ

00 01 11 10

00 0 0 0 0

01 0 1 1 1
RS
11 0 1 1 0

10 0 0 0 0
[4]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(ii) 1 mark for loop with two 1s; 1 mark for loop with four 1s
PQ

00 01 11 10

00 0 0 0 0

01 0 1 1 1
RS
11 0 1 1 0

10 0 0 0 0

Allow f.t. from (i


–1 for each incorrect grouping, max. 2 errors [2]

(iii)
Z=
Q.S [1]
+ P.R. S [1]

Allow f.t. from (ii). –1 error if more than 2 terms


[Total: 16]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

6 (a) (i)
Input Output
X Y A B
0 0 0 0 1 mark for each
correct column
0 1 0 1 (A and B)
1 0 0 1
1 1 1 0
[2]

(ii) Half adder [1]

(iii) C // Carry [1]


S // Sum [1]

represents the carry part of the addition of two bits [1]


represents the sum part of the addition of two bits [1]

(b) (i) A. [1]


(A.B + C) [1]

(ii) Allow follow through from (b)(i)

A.(A.B+C)
= A.A.B + A.C
= A.B +A.C
= A.(B+C)

1 mark for each correct simplification line – max 2 [2]


1 mark for A.(B+C) if correct answer to part (b)(i) [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

7 (a) (i)

Input Output
Working space
P Q R J K
0 0 0 0 0
0 0 1 0 1
1 mark each column
0 1 0 0 1
0 1 1 1 0 If zero marks then
6 or 7 pairs correct – 1 mark
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
[2]

(ii) Full adder [1]

(iii) C / Carry [1]


S / Sum [1]
represents the carry part of the addition of three bits [1]
represents the sum part of the addition of three bits [1]

(b) (i) A. [1]


(A+B).C [1]

(ii) Allow follow through from (b)(i)

A. ((A+B).C)
= A.(A.C + B.C)
= A.A.C +A.B.C
= A.C + A.B.C
= A.C (1 + B)
=A.C.1
= A.C

1 mark for each correct simplification line – max 3 [3]


1 mark for A.C if correct answer to part (b)(i) [1]

[4]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

8 (a) X = A.(B + (B . C)) 3


B.C 1
B + B.C 1
A. 1

(b) A B C Working Space X 2

0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1

1 mark first four entries, 1 mark for the last four entries

(c)(i) 1
AB

00 01 11 10
0 0 0 0 1
C
1 0 0 1 1

(c)(ii) 2
AB

00 01 11 10
0 0 0 0 1
C
1 0 0 1 1

(c)(iii) X = A.B + A.C 2

1 1

(d) X = A.(B + (B . C)) 2


X = A.(B + C ) 1
X = A.B + A.C 1 (dependent mark – must be correct
outcome from previous line)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

9 (a) S = ( P + (Q+R) ) . R 4
P 1
(Q +R) 1
( P +( Q + R ) ) 1
.R (must be outside final brackets) 1

Or

P 1
(Q +R) 1
P +( Q + R ) 1
(«««..). R 1

(b) P Q R Working space S 2

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 0

1 1 1 0
2 marks all correct, 1 mark seven correct, 0 marks six or fewer correct
(c)(i) PQ 1

00 01 11 10
0 0 0 0 0
R
1 1 1 0 0

(c)(ii) PQ 1

00 01 11 10
0 0 0 0 0
R
1 1 1 0 0

(c)(iii) S= P .R 1

(d) S = (P + ( Q + R ) ) . R 3
S = ( P + ( Q . R ) ) . R // P .R + ( Q + R ) . R 1
S = (P . R ) + ( Q . R . R ) 1
S= P . R + Q . 0 )
S= P . R + 0 ) 1
S= P . R
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

10 (a) Description Computer 4


architecture
Most parallel computer
systems use this architecture. SIMD

Widely used to process 3D


graphics in video games. MIMD

A microprocessor is used to
control a washing machine. MISD

There are a number of


processing units. Each
processing unit executes the SISD
same instruction but on
different data
1 mark for each correct line

(b) • Only one (separate) processor / not many separate processors 2


(is not massively parallel) 1
• Quad core computer system // processing units share the same bus 1
1 mark for each point, max 2

(c) • Split into blocks of code «. 2


• « that can be processed simultaneously «
• « instead of sequentially
• Each block is processed by a different processor
• which allows each of the many processors to simultaneously process
the different blocks of code independently
• Requires both parallelism and co-ordination
1 mark for each point, max 2

(d) 1 mark for identification of hardware issue, for example: 2


• Communication between the different processors is the issue
1 mark for further explanation from:
• Each processor needs a link to every other processor
• Many processors require many of these links
• Challenging topology

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

11 (a)(i) A B X 1

0 0 1
0 1 1
1 0 1
1 1 0

(a)(ii) A B C X 1

0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0

(b)(i) 3
S R Q Q
Initially 1 0 0 1
R changed to 1 1 1 0 1 1
S changed to 0 0 1 1 0 1
S changed to 1 1 1 1 0 1
S and R changed to 0 0 0 1 1

(b)(ii) • Q and Q have same value 2


• Q and Q should be complements of each other
• Flip-flop becomes unstable
1 mark for each point, max 2

(c)(i) Initial Final 4


values values
Working space
J K Clock Q Q Q Q
0 0 1 1 0 1 0
0 0 1 0 1 0 1
0 1 1 1 0 0 1
0 1 1 0 1 0 1
1 0 1 1 0 1 0
1 0 1 0 1 1 0
1 1 1 1 0 0 1
1 1 1 0 1 1 0
1 mark per shaded row

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(c)(ii) • S-R flip-flop has an invalid combination of S and R // The S_R flip flop 2
allows both Q and Q to have the same value // S-R flip-flop inputs
may arrive at different times 1
• The J-K flip-flop does not allow for Q and Q to have the same value //
All four combination of values for J and K are valid // J-K flip-flop
incorporates a clock pulse for synchronisation 1

(d) • A flip-flop can store either a 0 or a 1 2


• Computers use bits to store data
• Flip-flops can therefore be used to store bits (of data)
• Memory can be created from flip-flops
1 mark for valid point, max 2

12 (a) Description Type of processor 4

It has a simplified set


of instructions.

CISC
Emphasis is on the
hardware rather than
the software.

It makes extensive
use of general RISC
purpose registers.

Many instruction
formats are available.

1 mark for each correct line

(b)(i) One mark per point – max 2 2

• Pipelining is instruction level parallelism


• Execution (A: processing) of an instruction is split into a number of stages
• When first stage for an instruction is completed the first stage of the next
instruction can start executing
• Another instruction can start executing before the previous one is
finished
• Processing of a number of instructions can be concurrent / simultaneous

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(b)(ii) Time Interval 3


Stage 1 2 3 4 5 6 7 8
Fetch instruction D E
Read registers and decode
D E
instruction
Execute instruction D E
Access operand in memory D E
Write result to register D E

D at time interval 1 (1)


D and E in second row (in that order) (1)
Remainder completed correctly (1)

(c)(i) Two from: 2

• The result of the first addition is not stored in (register) r3 (1)


• Before the next instruction needs to load value from r3 (1)
• There is a data dependency issue (1)
• r3 is being fetched and stored on the same clock pulse (1)

(c)(ii) The third instruction is not dependent on the first two, therefore, instruction 2 1
and 3 need to be swapped

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

13 (a)(i) Because a valid unsigned integer can be two digits / one or more digits (1) 2
Both 3 and 2 are digits (1)

(a)(ii) Because a valid unsigned number can be an unsigned integer followed by a 2


decimal point followed by an unsigned integer (1)

32 is an unsigned integer and 5 is an unsigned integer (because it is a digit)


and there is a point in between (1)

Alternative response for 2 marks, combination of order and validity:

32 is a (valid) unsigned integer, followed by a decimal point, and 5 which is


another (valid) unsigned integer

Validity mark must refer to 32 and 5

(b) <unsigned number> ::= 5


<unsigned_integer> | (1)

<unsigned_integer>.<unsigned_integer> (1)

Accept order reversed:

<unsigned_integer> ::=
<digit> | (1)

<digit> <unsigned_integer> (1)

Accept <digit> |<unsigned_integer> <digit>

If order reversed mark as above

<digit> ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 (1)

Accept the list in any order, as long as all 10 digits included

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(c)(i) 4

Un
nsigned Unsigned
U
In
nteger
. Integer A

+ MP3
3 MP4
MP2
Unsigned
A E
integer


B MP1

MP1: Linee to indicate


e exponent is optional (B line) (1)
MP2: ‘E’ p
present at start
s of expo
onent (1))
MP3: Opttional ‘+’ or ‘-‘ (1)
MP4: Unssigned integ ger (1)

Alternative correct an
nswer:
MP3 need ds both the sign ‘box’ a
and the sign or the markk
n diagram fo

Siggn Unsigned
E
intteger

Sign:
+

(c)(ii) <unsigned number> ::= 4


<unsigned_integer >
| <unsigned integer>.<unsigned_integer> (1)

Accept any order

| <unsigned_integer > <exponent>


| <unsigned integer>.<unsigned_integer> <exponent> (1)

Accept any order

<exponent> ::= E <sign> <unsigned_integer>


| E <unsigned integer> (1)

<sign> ::= + | - (1)


By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

14 (a) A B X 1

0 0 1
0 1 0
1 0 0
1 1 0

(b) Q 4
S R Q
Initially 1 0 1 0
S changed to 0 0 0 1 0 (1)
R changed to 1 0 1 0 1 (1)
R changed to 0 0 0 0 1 (1)
S and R changed to 1 1 1 0 0 (1)

(c)(i) Clock (pulse) 1

(c)(ii) Max 2 marks per problem – max 4 marks 4

Problem 1
• One combination of S and R gives NOT valid / indeterminate output // Q
and Q have the same value
• The JK flip-flop does not allow for Q and Q to have the same value for
any combination of inputs // Q and Q have to be complementary
Problem 2
• Inputs may not arrive at the same time
• The JK flip-flop has a clock pulse to synchronise inputs

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

15 (a)(i) 2 marks all products correct, 1 mark 2 or 3 products correct 2


X = A.B.C + A.B.C + A.B.C + A.B.C

(a)(ii) 1 mark for all correct bits 1

AB
00 01 11 10
0 0 1 0 1
C 1 0 1 0 1

(a)(iii) 1 mark for each correct loop 2

AB
00 01 11 10
0 0 1 0 1
C 1 0 1 0 1

(a)(iv) 1 mark per bullet – allow follow through from 4(a)(iii) 2


• A.B
• + A.B
X = A.B + A.B

(b)(i) 1 mark per bullet max 2 4


• Correct column headings and row headings – values only
• Correct column headings and row headings – order

1 mark for 2 correct rows/columns,


2 marks for 4 correct rows/columns (based on headings) max 2

AB
00 01 11 10
00 0 1 1 0
01 0 1 1 0
CD 11 0 1 0 0
10 0 1 0 0

(b)(ii) 1 mark for each correct loop 2


00 01 11 10
00 0 1 1 0
01 0 1 1 0
CD 11 0 1 0 0
10 0 1 0 0

(b)(iii) 1 mark per bullet 2


A.B
+B.C
X = A.B + B.C

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

16 (a)(i) 1 mark for 2 or 3 correct, 2 marks for 4 correct 2

X = A.B.C + A.B.C + A.B.C + A.B.C

(a)(ii) 1 mark for the correct K-map 1

AB

00 01 11 10

0 0 0 1 0
C
1 0 1 1 1

(a)(iii) 1 mark for each loop max 3 3

AB

00 01 11 10

0 0 0 1 0
C
1 0 1 1 1

(a)(iv) 1 mark for each pair. Allow follow through from (iii) 3

• A.B
• + B.C
• + A.C
X = A.B + B.C + A.C

(b)(i) 1 mark per bullet point max 2: 4

• Correct column headings and row headings – values only


• Correct column headings and row headings – order

1 mark for 2 correct rows or columns, 2 marks for 4 correct rows or columns
(based on headings)

AB

00 01 11 10

00 0 1 1 0

01 0 0 1 0
CD
11 0 0 1 0

10 0 0 1 0

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(b)(ii) 1 mark per loop 2

AB

00 01 11 10

00 0 1 1 0

01 0 0 1 0
CD
11 0 0 1 0

10 0 0 1 0

(b)(iii) 1 mark per bullet point: 2

• A.B
• + B.C.D
X = A.B + B.C.D

17 (a) 1 mark per bullet point to max 3: 4


• Correct use of Idempotent law Y = Y.Y Y = Y + Y
• Correct use of Complement law 0 = Y.Y 1 = Y + Y
• Correct use of Distributive law X ( Y + Z ) = X.Y + X.Z
• Correct use of Redundancy law X.Y + Y = X + Y
• Correct use of identity law X.1 = X

1 mark for the correct answer

For example:

X = A.B.C + A.B.C + A.B.C Idempotent law


X = A.B.C + A.B.C + A.B.C + A.B.C Distributive law
( )
X = A.C. B + B + A.B. C + C ( ) Complement/Inverse law

X = A.C + A.B
(
X = A. C + B ) Correct answer

X = A.B.C + A.B.C + A.B.C Distributive law


X = A.C. (B + B ) + A.B.C Complement/Inverse law

X = A.C + A.B.C
(
X = A. C + B.C ) Redundancy Law

X = A.(C + B) Correct answer

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(b)(i) 1 mark for first four as 0, 1 mark for 1011 2

A B C X

0 0 0 0

0 0 1 0
1 mark
0 1 0 0

0 1 1 0

1 0 0 1

1 0 1 0 1 mark

1 1 0 1

1 1 1 1

(b)(ii) 1 mark for correct K-map 1


AB

00 01 11 10

0 0 0 1 1
C
1 0 0 1 0

(b)(iii) 1 mark for each correct loop to max 2 2


AB

00 01 11 10

0 0 0 1 1
C
1 0 0 1 0

(b)(iv) 1 mark per bullet point: 2


• A.C
• + A.B
X = A.C + A.B

(c)(i) 1 mark per bullet point to max 2: 4


• Correct column headings and row headings – values only
• Correct column headings and row headings – order

1 mark for 2 correct rows or columns, 2 marks for 4 correct rows or columns
(based on headings)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

AB

00 01 11 10

00 0 1 1 0

01 0 0 1 0
CD
11 0 0 1 0

10 0 0 1 0

(c)(ii) 1 mark for each correct loop to max 2: 2

AB

00 01 11 10

00 0 1 1 0

01 0 0 1 0
CD
11 0 0 1 0

10 0 0 1 0

(c)(iii) 1 mark per bullet point: 2


• A.B
• + B.C.D
X = A.B + B.C.D

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

18(a) 1 mark per bullet point to max 4: 4


• RISC has fewer instructions // CISC has more instructions
• RISC has many registers // CISC has few registers
• RISCs instructions are simpler // CISC’s instructions are more complex
• RISC has a few instruction formats // CISC has many instruction formats
• RISC usually uses single-cycle instructions // CISC uses multi-cycle instructions
• RISC uses fixed-length instructions // CISC uses variable-length instructions
• RISC has better pipelineability // CISC has poorer pipelineability
• RISC requires less complex circuits // CISC requires more complex circuits
• RISC has fewer addressing modes // CISC has more addressing modes
• RISC makes more use of RAM // CISC makes more use of cache/less use of RAM
• RISC has a hard-wired control unit // CISC has a programmable control unit
• RISC only uses load and store instructions to address memory
// CISC has many types of instructions to address memory

(b)(i) 1 mark per bullet point: 3


• Completing the As correctly
• B in column 2, row 1 no other Bs in row 1
• Remainder correctly completed

Time interval

Stage 1 2 3 4 5 6 7 8 9

Fetch instruction A B C D

Decode instruction A B C D

Execute instruction A B C D

Access operand in memory A B C D

Write result to register A B C D

(b)(ii) 1 mark per bullet point: 3


• Correct number of cycles for pipelining 8
• Correct number of cycles without pipelining 4 × 5 = 20
• No of cycles saved 20 – 8 = 12

(c) 1 mark for each row 4

Architecture
Statement
SIMD MIMD SISD

Each processor executes a different instruction 9

There is only one processor 9

Each processor executes the same instruction input


9
using data available in the dedicated memory

Each processor typically has its own partition within a


9
shared memory
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

19 (a) NOR 1

(b)(i) 1 mark for X column, 1 mark for Y column 2

A B Working Space X Y

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0

(b)(ii) Half adder 1

(b)(iii) 1 mark per bullet 2


• X is (used for) carry
• Y is (used for) sum

(c) 1 mark per bullet for working (max 4) 5

A.B.C.D + A.BC. .D + A.BC. .D + A.BC. .D + A.B.C.D


= A.B.C.D + A.BC. .D + A.BC. .D + A.BC. .D + A.B.C.D + A.B.C.D
• Adding in a second copy of the first term (Use of Idempotent Law)

(
= A.B. C.D + C.D + C.D + C.D + A.C.D. B + B ) ( )
• Taking A.B and A.C.D outside brackets (Associative Law)

( ( ) (
= A.B. C. D + D + C. D + D + A.C.D. B + B )) ( )
• ( ) ( )
Grouping C. D + D + C. D + D (Associative Law and Commutative
Law)

( )
= A.B. C. (1) + C. (1) + A.C.D. (1)

= A.B. (C + C ) + A.C.D. (1)


= A.B. (1) + A.C.D. (1)
• ( )
Replacing D + D with 1 and replacing C + C with 1 (Use of( )
Complement Law)

= A.B + A.C.D
• Reducing first four terms to A.B and reducing last two terms to A.C.D
(Use of Identity Law)

1 mark for correct answer


= A.(B + C.D)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

20 (a)(i) AB 1

00 01 11 10

0 1 1 0 1
C
1 1 1 0 1

(a)(ii) 1 mark for each correct loop 2


AB
00 01 11 10
C 0 1 1 0 1

1 1 1 0 1

(a)(iii) 1 mark per bullet point 2


• A
• +B

X=A+B

(b)(i) 1 mark correct values and order of row and column headings 4

3 marks fully correct table entries (based on headings) or


2 marks table entries contain one error (based on headings) or
1 mark table entries contain two errors (based on headings)

AB
00 01 11 10
00 0 0 1 1
01 0 0 1 1
CD 11 1 1 0 0
10 1 1 0 0

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

(b)(ii) 1 mark per loop 2

AB
00 01 11 10
00 0 0 1 1
01 0 0 1 1
CD
11 1 1 0 0
10 1 1 0 0

(b)(iii) 1 mark for each bullet point 2

• A.C
• + A.C

X = A.C + A.C

21 (a) 1 mark for 2/3 rows correct 3


2 marks for 4/5 rows correct
3 marks for 6 correct rows

Statement RISC

Larger instruction set 9

Variable length instructions 9

Smaller number of instruction formats 9

Pipelining is easier 9

Microprogrammed control unit 9

Multi-cycle instructions 9

(b)(i) 1 mark per bullet point 4

• SISD // Single instruction single data


• SIMD // Single instruction multiple data
• MISD // Multiple instruction single data
• MIMD // Multiple instruction multiple data

(b)(ii) 1 mark per bullet point (max 3) 3

• Large number of processors


• « working collaboratively on the same program
• « working together simultaneously on the same program
• « communicating via a messaging interface

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

22 (a) 1 mark for 3 or 4 correct products 2


2 marks for all 5 correct products

X = A.B.C + A.B.C + A.B.C + A.B.C + A.B.C

(b) 1 mark for correct answer 1


AB

00 01 11 10

0 1 0 0 0
C
1 1 1 1 1

(c) 1 mark per correct loop 2


AB

00 01 11 10

0 1 0 0 0
C
1 1 1 1 1

(d) 1 mark per bullet point. 2

• A.B
• +C

X = A.B + C // X = C + A.B

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

23 (a) 1 mark for each correct term 4

Description Term

• There are several processors.


• Each processor executes different sets of
MISD
instructions on one set of data at the same
time.

• The processor has several ALUs.


• Each ALU executes the same set of
SIMD
instructions on different sets of data at the
same time.

• There is only one processor.


• The processor executes one set of instructions SISD
on one set of data.

• There are several processors.


• Each processor executes a different set of
instructions. MIMD
• Each processor operates on different sets of
data.

(b) 1 mark per bullet point to max 3 3

• A large number of processors


• Collaborative processing // coordinated simultaneous processing
• Network infrastructure
• Communicate using a message interface / by sending messages

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 3: Mark Scheme Computer Science Paper 3 Topical

24 (a)(i) 1 mark for each 2 correct products, i.e. 3 marks for 6, 2 marks for 4 or 5, 1 mark 3
for 2 or 3

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

(a)(ii) 1 mark for the correct K-map 1


AB
00 01 11 10
0 1 1 0 1
C 1 1 1 0 1

(a)(iii) 1 mark for each correct loop 2

AB
00 01 11 10
0 1 1 0 1
C 1 1 1 0 1

(a)(iv) 1 mark per bullet point: 2


• +

//

(b) . 3

One mark for correct use of De Morgan’s law to +


One mark for correct use of De Morgan’s law + to


• . + .

One mark for correct answer


• . + .

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

1 (a) (i) Wrong assignment operator (should be ‘:=’ not ‘=’) 1

(ii) 0 is not a digit 1

(iii) ‘B’ is not a number 1

(b) <assignmentstatement> ::=


<variable> := <variable><operator><number> 1+1
<variable> ::= <letter><number> 1
<number> ::= <digit>| <digit><number> 1+1
<letter> ::= A|B|C 1
<digit> ::= 1|2|3|4|5
<operator> ::= +|-|*|/

(c) (i) Use of software … (idea of using) 1


to implement a hardware set-up (idea of implementing / simulating / 1
emulating)

(ii) e.g.
no need to acquire client hardware for testing /
reduces set-up time for test system /
common development system for all developers 1

(iii) e.g.
software emulation runs slower than real hardware /
not possible to emulate some hardware 1

2 (a)
Token
Symbol
Value Type
Counter 60 variable

1.5 61 constant

Num1 62 variable [1]

5.0 63 constant [1+1]

(b)
6 0 6 5 6 4 6 0 6 4 6 0 6 0 6 4
0 1 1 1 2 A 0 3 2 B 2 1 2 2 3 C [1+1]

(c) (i) Code optimisation [1]

(ii) LDD 234


ADD 235 [1]
ADD 236
STO 233 [1]

1 mark for first 2 lines, 1 mark for last 2 lines, with no other lines added
(iii) Code has fewer instructions / occupies less space in memory when executed [1]
minimises execution time of code // code will execute faster [1]
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

3 (a) A program is the written code (“static”) [1]


A process is the executing code (“dynamic”) [1]

(b) running, ready:


when process is executing it is allocated a time slice (running state) // process is allocated
time on processor [1]
when time slice completed process / interrupt occurs can no longer use processor even
though it is capable of further processing (ready state) [1]

ready, running:
process is capable of using processor (ready state) [1]
OS allocates processor to process so that process can execute (running state) [1]

running, blocked:
process is executing (running state) when it needs to perform I / O operation [1]
placed in blocked state – until I / O operation completed [1]

(c) when I / O operation completed for process in blocked state [1]


process put in ready state [1]
OS decides which process to allocate to processor from the ready queue [1]

(d) high-level scheduler:


decides which processes are to be loaded from backing store [1]
into memory / ready queue [1]

4 (a)
Token
Symbol
Value Type

Start 60 Variable

0.1 61 Constant

Counter 62 Variable [1]

10 63 Constant [1+1]

(b)
60 01 61 4E 62 01 60 50 63 52 62 02 60 53
[1+1]

(c) (i) syntax analysis [1]

(ii) any two points from:

construct parse tree // parsing


checking syntax/grammar
produce error report [max. 2]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

(d) (i) Minimise the execution time // code runs faster [1]

(ii) Compiler could calculate 2*6 and replace it with the value 12. [1]

(iii) LDD 436 }


ADD 437 } [1]
STO 612 }
ADD 438 [1]
STO 613 [1]

–1 for each additional instruction; 0 for copy of original code

5 (a) 1 mark for correct arrow from each description


Computer
Description Architecture

A computer that does not have


the ability for parallel SIMD
processing

The processor has several


ALUs. Each ALU executes the
MISD
same instruction but on
different data.

There are several processors.


Each processor executes
different instructions drawn
from a common pool. Each SISD
processor operates on different
data drawn from a common
pool.

There is only one processor


executing one set of
MIMD
instructions on a single set of
data. [4]

(b) (i) Massive: many/large number of processors // hundreds/thousands of processors [1]

(ii) Parallel: to perform a set of coordinated computations in parallel/simultaneously [1]

(c) processors need to be able to communicate … [1]


so that processed data can be transferred from one processor to another [1]

suitable algorithm/program/software/design // appropriate programming language [1]


which allows data to be processed by multiple processors simultaneously [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

6 (a)
Statement Compilation stage

This stage removes any


comments in the program Lexical analysis
code

1 mark
This stage could be ignored Syntax analysis
for each
correct
This stage checks the line
grammar of the program Code generation
code

This stage produces a


tokenised version of the Optimisation
program code
[4]

(b) (i) A B + [1]


CD–* [1]

(ii) A – [1]
B/4* [1]
CD–/ [1]

(c) (i)

4 3
1
1 1 5 5 2 mark
per ring
2 2 2 2 2 2 4

+ – *

[4]

(ii) x * [1]
(w + z – y) [1]
Order must be correct for both parts

(iii) No need for rules of precedence [1]


No need for brackets [1]
In RPN evaluation of operators is always left to right [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

7 (a) The 245th page frame from the start of memory


// the 245th page frame from some base address [1]

(b) Flash memory // magnetic disk // hard drive [1]

(c) (i) Time of entry (NOT time in memory) [1]

(ii)
Page Presence Page frame Additional data
Flag address

4 1 542 12:07:34:49 [1 +1 + 1]

(iii) Number of times the page has been accessed [1]

(iv)
Page Presence Page frame Additional data
Flag address

3 1 132 0 [1 +1 + 1]

Accept only zero for ‘additional data’

(d) For example:


Longest resident: page in for lengthy period of time may be being accessed often [1]
… so not a good candidate for being removed [1]

Least used: a page just entered has a low least used value … [1]
so likely to be a candidate for immediately being swapped out [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

8 (a)
Statement Compilation stage

This stage can improve


the time taken to
Lexical analysis
execute the statement:
x = y + 0

1
This stage produces
Syntax analysis mark for
object code.
each
correct
line
This stage makes use
Code generation
of tree data structures.

This stage enters


symbols in the symbol Optimisation
table.
[4]

(b) P Q + [1]
RS/ – [1]

(c) (i)
2

3 3 5
1
2 1 1 1 1 6 mark
per ring
2 2 4 4 4 4 4 4 –2

* + + –
[4]

(ii) b * a [1]
– (c + d + a) [1]
Order must be correct for both parts

(iii) Rules of precedence means different operators have different priorities // by example
multiply is done before add [1]
In RPN evaluation of operators is left to right // operators are used in the sequence in
which they are read [1]
No need for brackets // infix may require the use of brackets [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

9 (a) The page is present in memory [1]


Loaded at / stored /present in page frame 542 // its memory address is 542 [1]

(b) (i) Next instruction is first instruction in Page 6 [1]


Page 6 is not present in memory [1]
Instruction can only be executed if present in memory [1]
Program cannot continue until Page 6 is loaded [1]

[Max 2]

(ii) When there is an attempt to load an instruction for a page not in memory [1]
A page fault occurs // Page 5 finishes … [1]
this generates an interrupt [1]
ISR code is executed [1]
Causes the OS to load page 6 into memory [1]

[Max 3]

(c) (i) Time of entry (NOT time in memory) [1]

(ii)
Page Presence Page frame address Additional data
Flag

6 1 221 12:07:34:49 [1 + 1 + 1]

(iii) When the procedure call is made – Page 1 is swapped out and Page 3 is swapped in [1]
At the end of the procedure call – Page 3 is swapped out and Page 1 is swapped in [1]
Page 1/3 is always in memory shortest amount of time [1]
The entire sequence is repeated for every iteration [1]

[Max 3]

(iv) Thrashing // continually swapping pages [1]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

10 (a)(i) There should be a colon before the '=' sign 1

(a)(ii) The second operand should be an unsigned integer and not a variable 1

(a)(iii) A32 is not a variable, as a variable should be a letter followed by a single digit 1

(b) <assignment_statement> ::= <variable> := 1 6

<variable> <operator> <unsigned_integer> 1

<variable> ::= <letter> <digit> 1

<unsigned_integer> ::= <digit> | 1

<digit> <unsigned_integer> 1

<letter> ::= A | B | C 1
<operator> ::= + | - | * | ^

(c) Variable 2

Letter Letter Digit Digit

< one mark >< one mark >

Syntax diagram shows one or two letters 1


Syntax diagram shows zero, one or two digits 1

(d) <assignment_statement> ::= 2

<variable> := <variable> <operator> <real> 1

<real> ::= <unsigned_integer> . <unsigned_integer> 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

11 (a)(i) A: Guest (operating system) (1) 2


B: Host (operating system) (1)

(a)(ii) One mark for each valid point, max 3 3

• Guest OS (A) handles request as if it were running on its own physical


machine // guest OS (A) is not aware it is running on a virtual platform
• Guest OS (A) handles the request as usual
• I/O requests are translated by the virtual machine software
• Into instructions executed by host OS (B)
• Host OS (B) retrieves the data from the file
• Host OS (B) passes the data to the virtual machine software
• The virtual machine software passes the data to the guest OS (A)
• Guest OS passes the data to the application

(b)(i) One mark from: 1

• Because software can be tried on different OS using same hardware


• Because no need to purchase / request all sorts of different hardware
• Easier to recover if software causes system crash
• VM provides protection to other software / host OS from malfunctioning
software

(b)(ii) Max 2 marks per limitation, max 2 limitations – max 4 marks 4

Virtual machine may not be able to emulate some hardware


« So that hardware cannot be tested using a virtual machine
« By relevant example, e.g. developing hardware drivers

Using virtual machine means execution of extra code // processing time


increased
« so cannot accurately test speed of real performance

A virtual machine might not be as efficient


« By relevant example, e.g. might not be able to access sufficient memory

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

12 (a)(i) c4 is not a signed integer 1

(a)(ii) 10 is not a valid signed integer // 0 is not a valid digit/signed integer 1


// only one digit allowed

(a)(iii) wrong assignment operator // should be = not := 1


// 6 is not a valid digit/signed integer

(b) 1 mark per bullet 4


assignment
• <variable>=<variable><operator><signed integer>
variable
• <letter><letter>
signed integer
• +<digit> | -<digit>
operator
• ^ | \

<assignment statement> ::=


<variable> = <variable><operator><signed integer>
<variable> ::= <letter><letter>
<signed integer> ::= +<digit> | -<digit>
<operator> ::= ^ | \

(c) 1 mark per bullet 2


• <letter>|
• <letter><variable>

For example:
<letter>|<letter><variable>
<letter>|<variable><letter>

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

13 (a)(i) 5 is not a variable 1

(a)(ii) D is not a valid letter 1

(a)(iii) There are two operators (only one is allowed) // three variables on the right hand 1
side but only two allowed

(b) 1 mark for each bullet 6


assignment:
• <variable> = <variable><operator><variable>;
variable:
• <letter>|
• <letter><unsigned integer>
unsigned integer:
• <digit>|
• <digit><unsigned integer>
operator:
• + | - | * | /

<assignment statement> ::= <variable> =


<variable><operator><variable>;
<variable> ::= <letter> | <letter><unsigned integer>
<unsigned integer> ::= <digit> | <digit><unsigned integer>
<operator> ::= + | - | * | /

(c) 1 mark per bullet 3


• variable with arrow
• followed by repeated letter
• followed by unsigned integer and arrow

variable
letter unsigned integer

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

14 (a)(i) 1 mark per bullet point: 2

• Running process is halted


• Process moves to blocked state

(a)(ii) 1 mark per bullet point max 2: 2

• Running process is halted // another process has use of the processor


• Process moves to ready state
• Until next time slice allocated

(b)(i) 1 mark per bullet point: 2

• Current process no longer running // processor is available


• Process was at the head of the ready queue / / process has highest
priority

(b)(ii) 1 mark per bullet point: 2

• The only
• Required resource becomes available // event is complete

(c) 1 mark per bullet point to max 3: 3

• to allow multiprogramming
• to give each process a fair share of the CPU time
• to allow all processes to complete in a reasonable amount of time
• to allow highest priority jobs to be executed first
• to keep the CPU busy all the time
• to service the largest possible number of jobs in a given amount of time
• to minimize the amount of time users must wait for their results
• to maximise the use of peripherals

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

15 (a) 1 mark for each correct row 3

Token
Symbol
Value Type

Start 60 Variable

1 61 Constant

Number 62 Variable

Counter 63 Variable

12 64 Constant

(b) 1 mark for each circled section 2

60 01 61 51 62 4E 63 01 60 50 64 52 62 02 63 53

(c) 1 mark per bullet point to max 2: 2

• constructing parse tree // parsing


• checking the table of tokens to ensure that the rules/syntax/grammar of
the language are/is obeyed
• producing an error report

(d)(i) shortens execution time of program// time taken to execute whole program 1
decreases

(d)(ii) 1 mark for each of the following: 5

• LDD 236
ADD 237
STO 512
ADD 238
STO 513
ADD 239
STO 514

• Remove line 4 LDD 236 correct lines 3 and 6 in original code


• Remove line 5 ADD 237 correct lines 3 and 6 in original code
• Remove line 8 and 9 LDD 236 and ADD 237 correct lines 7 and 11 in
original code
• Remove line 10 ADD 238 correct lines 7 and 11 in original code

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

 a) 1 mark per row 3

Token
Symbol
Value Type

Number1 60 Variable

Number2 61 Variable

Answer 62 Variable

10 63 Constant//Literal

0 64 Constant//Literal

(b) 1 mark for each circled section 2

51 60 51 61 51 62 4A 62 03 60 02 61 4B 52 63 4D 52 64 4C

F)(i) (Code) Optimisation 1

F)(ii) 1 mark per bullet point: 3


• LDD 236
ADD 237
ADD 238
SUB 239 Copy the instructions
STO 235

• Remove line 4 STO 540 correct lines 3 and 6 in original code


• Remove line 5 LDD 540 correct lines 3 and 6 in original code

(c)(iii) 1 mark per bullet point: 2


• Code has fewer instructions/occupies less space in memory
• shortens execution time of program // time taken to execute whole program decreases

d) 4

1 1 3 3 2

2 2 2 2 6 6 9 9 7

1 mark ← 1 mark → 1 mark

1 mark no operators on the stack anywhere


By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

 (a) 1 mark for 2 correct rows, 2 marks for 3 correct rows, 3 marks for 4 correct 3
rows

Token
Symbol
Value Type

Counter 60 Variable

0 61 Constant

Password 62 Variable

"Cambridge" 63 Constant

1 64 Constant

(b) 2
60 01 First two cells given in question.

1 mark for next 3 cells

61 51 62

1 mark for the remainder

4E 4A 62 04 63 4B 51 62 4C 60 ....

.... 01 60 02 64 4F 62 03 63 52 60

(c)(i) 1 mark per bullet point 3


• Removing the fourth line (LDD 238)
• Changing operand for second ADD from 236 to 238
• First three lines and last line unchanged

LDD 236
ADD 237
STO 236
ADD 238
STO 238

(c)((ii) 1 mark per bullet point (max 2) 2


• Optimisation means that the code will have fewer instructions
• Optimised code occupies less space in memory
• Fewer instructions reduces the execution time of the program

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

 (a) 1 mark per bullet point (max 4) 4

• Working from left to right in the expression


• If element is a number PUSH that number onto the stack
• If element is an operator then POP the first two numbers from stack «
• « perform that operation on those numbers
• PUSH result back onto stack
• End once the last item in the expression has been dealt with

(b) 1 mark per ring (not all stacks are shown) 4


Do not allow operators in stacks
Accept intermediate correct stack values

2 2 6

5 3 30 30 5

8 8 24 24 24 24 19

 (a) 1 mark per bullet point 6


1 mark for identifying the state, max 2 for description
Max 3 marks for each state

• Ready
• The process is not being executed
• The process is in the queue«
• « waiting for the processor’s attention / time slice

• Running
• The process is being executed by the processor
• The process is currently using its allocated processor time / time slice

• Blocked
• The process is waiting for an event «
• « so it cannot be executed at the moment
• «e.g. input/output

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

(b) For up to 2 maximisation techniques for each of memory and disk 6


Max 2 for Memory, Max 2 for disk if no descriptions are given

1 mark for identification of maximisation technique, 1 mark for description, 1


mark for further description or information about improvement to max 4 for
memory

Memory
• Moving frequently accessed instructions to cache (1) for faster recall (1) as
SRAM is used rather than DRAM for cache (1)
• Making use of virtual memory (1) with paging or segmentation (1) to swap
memory to and from a disk (1)
• Partitioning memory (1) dividing main memory into static/dynamic partitions
(1) to allow for more than one program/task to be available
//multiprogramming (1)
• Removing unused items/tasks from RAM (1) by marking a partition as
available (1) as soon as the process using it has terminated (1)

1 mark for identification of maximisation technique, 1 mark for description, 1


mark for further description or information about improvement to max 4 for disk

Disk
• Disk caching (1) a disk cache holds data that is frequently transferred
to/from the disk (1) the cache can be held on disk or in RAM (1)
• Compression utility (1) decreasing the size of a file stored on disk (1) in
order fit more / larger files on the disk (1)
• Defragmentation utility (1) files are rearranged to occupy contiguous disk
space (1) this reduces the time taken to access files// decreases latency (1)

 (a)(i) 35 is not a variable 1

(a)(ii) := is not an operator 1

(a)(iii) 9 is not a digit 1

(b) 1 mark for each bullet point 6

<operator>::=
• == | > | <

<number>::=
• <digit><digit>

<variable>::=
• <letter>
• |<letter><variable>

<condition>::=
• <variable><operator><number>
• |<variable><operator><variable>

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

 (a) 1 mark per bullet point 3

Page:
• Virtual Memory is divided into blocks of a fixed size

Page frame:
• the main memory is divided into page frames of the same size as a
page

Page table:
• the Page (Map) table shows the mapping of pages to page frames
(b) 1 mark per bullet point to max 3 3

• To allow multiprogramming / multitasking to take place


• To ensure fair usage of the processor
• To ensure fair usage of peripherals
• To ensure fair usage of memory
• To ensure higher priority tasks are executed sooner
• To ensure all processes have the opportunity to finish

(c) 
A signal from a software source or hardware device seeking the attention 1
of the processer

(d) 1 mark per bullet point in the order given 3

• JOB32
• JOB42
• JOB42

 (a) 1 mark per bullet point to max 2 2

• Disk / secondary storage is used to extend the RAM / memory available


• so CPU can access more memory space than available RAM
• Only part of program / data in use needs to be in RAM
• Data is swapped between RAM and disk

(b)(i) 1 mark per bullet point to max 4 4

• Divide memory / RAM into frames


• Divide virtual memory into blocks of same size called pages
• Frames / pages are a fixed size
• Set up a page table to translate logical to physical addresses
• Keep track of all free frames
• Swap pages in memory with new pages from disk when needed

(b)(ii) First-in-first-out // least-recently-used page // least-used-page 1

(b)(iii) 1 mark per bullet point to max 2 2

• Pages are required back in RAM as soon as they are moved to disk
• There is continuous swapping (of the same pages)
• No useful processing happens // deadlock
• (because) pages that are in RAM and on disk are inter-dependent
• (nearly) all processing time is used for swapping pages

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 4: Mark Scheme Computer Science Paper 3 Topical

 (a)(i) 1 mark for each bullet point to max 2 2


Keyword table:
• The reserved words used
• The operators used
• Their matching tokens

(a)(ii) 1 mark for each bullet point to max 2 2


Symbol table:
• Identifier name used
• the (data) type
• role, e.g. variable, constant, array, procedure / scope
• Location (marker) // value of constant

(a)(iii) 1 mark per bullet point to max 2 2

• Keywords / operators are looked up (in the keyword table)


• Keywords / operators are represented by tokens
• Identifiers are looked up in (the symbol table)
• Identifiers are converted to locations / addresses
• Used to create a sequence of tokens (for the program)

(a)(iv) The white space removed // redundant characters are removed // removal of 1
comments // identification of errors

(b) 1 mark per bullet point to max 2 2

• Redundant code removed // fewer instructions required


• Program requires less memory / storage space
• Code reorganised to make it more efficient
• Program will complete task in a shorter time

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

1  D A Phishing 1
B Virus 1
C a standalone piece of software which can reproduce itself automatically 1
D sending unsolicited emails to a distribution list 1

(b) e.g. phishing


problem: identity fraud / misuse of financial data 1
solution: ignore email / don’t respond to email 1
e.g. virus or
problem: computer may stop working // lost files 1
solution: running anti-virus software 1

(c) cipher text: encrypted text which is not understandable 1


private key: key only known to owner that can be used to encrypt
message to confirm author of message // can be used by owner to decrypt a
message thereby ensuring only owner can read message 1

(d) • Manager encrypts email 1


• using public key of colleague 1
• colleague decrypts email 1
• using his/her private key 1

Total: 12

 (a)
Description Term

Malware which attaches itself to another


VIRUS [1]
program.

Malware designed to redirect the web


PHARMING [1]
browser to a fake website.

Email that encourages the receiver to


access a website and give their banking PHISHING [1]
details.

(b) (i) Plain text is the original text [1]

Cipher text is the encrypted version of the plain text [1]

(ii) Asymmetric keys means that the key used to encrypt (public key) is different from the
key used to decrypt (private key) [1]
Ben acquires Mariah’s public key [1]
Ben encrypts email … [1]
using Mariah’s public key [1]
Ben sends encrypted email to Mariah [1]
Mariah decrypts email … [1]
Using her private key [1]

[Max 4]

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

3 (a)(i) Worm 1

(a)(ii) Phishing 1

(a)(iii) Malicious software that replicates by inserting a copy of itself (1) 2


into a file of data (1)

(b) Example: Max 2


No up-to-date anti-virus (or equivalent) software
Regular virus scans not performed
Operating system not up-to-date
Attachments/suspicious links clicked on
1 mark for any valid vulnerability

(c)(i) public 1

(c)(ii) Bob sends his digital certificate 2


Digital certificate contains Bob’s public key
Successful decryption of certificate using CA’s public key provides legitimacy
1 mark for any valid point – max 2

(c)(iii) The person 4


performing What that person does
the action
Anna Requests Bob’s public key.
Bob Sends Anna his public key. 1
Anna Encrypts email with Bob’s public key. 1
Anna Sends the email to Bob.
Decrypts email. 1
Bob
Using his private key. 1

4 (a)(i) Pharming 1

(a)(ii) Phishing 1

(a)(iii) A standalone/independent piece of malicious software 1 2


that can replicate/duplicate itself 1

(b) No up-to-date anti-virus (or equivalent) software (used) / Regular virus scans not 2
performed
No firewall
Operating system not up-to-date/obsolete
Attachments/suspicious links in emails clicked on
Clicking on website with an out of date security certificate
max 2

(c)(i) (Certificate) serial number 1 3


Certificate Authority (that issued certificate) 1
Valid date(s) // Date of expiry 1
Subject name (name of user/owner, computer, network device) 1
Subject public key 1
Version (Number) 1
Hashing algorithm (data or signature) 1
max 3
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

(c)(ii) CA uses hashing algorithm .. 1 3


To generate a message digest from the particular certificate 1
Message digest is encrypted with CA’s private key 1

(c)(iii) Need to know that the certificate is genuine (and has not been altered) 1
// Authenticate or verify it (came from the CA)

5 (a)(i) 1 mark for each term or description 4

Redirection to a bogus website that appears to be Pharming


legitimate to gain confidential data
Use email to attempt to gain a user’s confidential Phishing
data
A piece of software that records/stores user Spyware
actions/keystrokes without the user’s
knowledge and sends them to a third party for
analysis
A standalone piece of malicious software that Worm
replicates itself

(a)(ii) 1 mark for pharming solution, 1 for phishing 2


Allow follow through from (a)(i)

Pharming
• Use a reliable ISP //check URL is spelt correctly // check that http has
changed to https //security software installed and kept updated // only
accept valid public key certificates // check that links are genuine
Phishing
• ignore email // delete email // don’t click on links in emails

(b) 1 mark per bullet to max 4 4


• software is put through a hashing algorithm by the company
• hash total is encrypted with the company’s private key
• company sends software and encrypted hash
• customer is in possession of company’s public key (from the digital
certificate)
• customer decrypts the received hash with public key
• customer hashes the received software with the hash algorithm (from
the digital certificate)
• if decrypted hash and the software hash match, the software has come
from the company/is authentic and has not been altered.

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

6 (a) 1 mark per bullet to max 4 4

• Katarina’s computer/software encrypts the email before she sends it


• using Lucy’s public key
• Lucy’s computer/software decrypts the email when it is received
• using Lucy’s private key
• As the private key is known only to Lucy, only she can understand the email

(b) 1 mark per bullet to max 3 3

• Julio’s computer/software checks the digital certificate of the online shop’s


website
• If digital certificate is invalid his computer/software rejects website
• If valid a session is created/the transaction can continue
• The encryption algorithms to be used are agreed
• The session keys to be used are generated
• The (session) key is used to encrypt the data sent

(c) 1 mark per bullet to max 3 3

• Attaching a portable storage device


• Opening an email attachment // clicking links on an email attachment
• Accessing a suspicious website
• Downloading a file from the Internet
• Buffer overflow
• Software not up to date // Software poorly written
• No up-to-date anti-virus/anti-malware software installed
• Regular virus/malware scans not completed
• A firewall that is not set up correctly
• Weak/easily cracked passwords
• Lack of user/staff training

7 (a) 1 mark for each term/description 4

Description Term

A The result of encryption that is transmitted to the recipient Cipher text

The type of cryptography where different keys are used, one for
B Asymmetric or Public key
encryption and one for decryption.

Electronic document used to prove the ownership of a public key //


C Electronic document used to prove that the data is from a trusted Digital certificate
source

Key needed to decrypt data that has been encrypted by a public key
// Key needed to encrypt data so that it that can be decrypted by a
D Private key
public key
// the key used in asymmetric encryption which is not shared

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

(b) 1 mark for C in the correct place 3


1 mark for A followed by D in any position
1 mark for D followed by B in any position

1 Browser requests that the server identifies itself


2 C
3 Browser checks the certificate against a list of trusted Certificate Authorities
4 A
5 D
6 B
7 Server and Browser now encrypt all transmitted data with the session key

8 (a) 1 mark per bullet point 5

• Keys
• Cipher text
• Manager’s public and private keys in correct spaces
• Wiktor’s public and private keys in correct spaces
• Plain text

Asymmetric encryption uses different keys for encrypting and decrypting


data. When Wiktor sends a message to his manager, the message is
encrypted into cipher text using his manager’s public key. When the
manager receives the message, it is decrypted using her private key.

When the manager replies, the message is encrypted using Wiktor’s public
key, and when Wiktor receives the message, it is decrypted into plain text
using his private key.

(b) 1 mark per bullet point (max 6) 6

• Browser requests that the server identifies itself


• Server sends a copy of its (Digital) Certificate
• containing its public key
• Browser checks the certificate
• against a list of trusted Certificate Authorities
• If the browser trusts the certificate
• a symmetric session key is created
• this is (by the browser) encrypted using the server’s public key and
sent to the server
• Server decrypts the symmetric session key
• using its private key
• Server and browser now encrypt all transmitted data with the session
key

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

(c) 1 mark for type of malware and 1 mark for prevention, max 2 (x 2) 4

For example:

• Virus
• Have company policies to ensure that anti-virus software is installed,
regularly updated and run

• Spyware
• Have company policies to ensure that anti-spyware software is
installed, regularly updated and run

• Phishing
• Have network policies to ensure that the firewall criteria include SPAM
filters, whitelist, blacklist etc.

9 (a) 1 mark per bullet point 2

• Sanjeet’s computer/software encrypts the message with the government


department’s public key
• The government department’s computer/software decrypts the message
with their private key

(b) 1 mark per bullet point (max 2) 2

• The government department’s computer/software creates the message


digest
• Sanjeet’s computer/software recreates this message digest
• If both copies of the message digest match the message has been verified
(c)(i) For each of the two: 4
1 mark for the identification of the vulnerability and
1 mark for further description, effect or example
e.g.
not updating virus definitions (1 mark) which would allow for recently developed
viruses to attack the computer system (1 mark)
opening email from unknown sources (1 mark) download a virus (1 mark)

(c)(ii) 1 mark from: 1


• Anti-malware software running in the background
• up-to-date anti-virus (definitions)
• logging off when not using computer
• ensuring firewall is enabled
• strong password
• not sharing passwords, etc.

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 5: Mark Scheme Computer Science Paper 3 Topical

10 (a) 1 mark per bullet point to max 2 2

• Serial number
• Identification of Certificate Authority (that issued the certificate)
• Version (number)
• Valid from // start date
• Valid to // end date
• Subject name (name of user/owner/computer/network device)
• Subject's public key
• Hashing algorithm
• Algorithm used to create signature
• Algorithm used to hash certificate
• Hashed certificate

(b) 1 mark for each correct term 3

A hashing algorithm is used to generate a message digest from the plain


text message. The message digest is encrypted with the sender’s private
key.

11 (a) 1 mark per correct row 3


Description Term

A The original data to be transmitted as a message Plain text

B An electronic document from a trusted authority that Digital


ensures authentication certificate

C An encryption method produced by a trusted authority Public key


that can be used by anyone

(b)(i) 1 mark per bullet point to max 2 2

• To ensure a document is authentic // came from a trusted source


• To ensure a document has not been altered during transmission
• Non repudiation

(b)(ii) 1 mark per bullet point to max 3 3

• The message is hashed with the agreed hashing algorithm


• to produce a message digest
• The message digest is encrypted with the sender’s private key
• so the digital signature can be decrypted with sender’s public key

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

1  D Control system 1

(b) Any three different items – max 6 marks


heater / water pump / blinds pump … 1
for altering temperature / watering / light level 1
actuator for… 1
fan for distributing air / water pump / blinds motor 1
analogue to digital converter / digital to analogue convertor … 1
converts analogue signal from sensor to digital value for processing /
converts digital signal to analogue signal for controlling actuator 1
microprocessor … 1
executes control software 1
warning device (speaker/buzzer/light)… 1
to give warning if conditions out of range / hardware malfunction 1
max 6

(c) (i) output of system (alter temperature / light level / soil moisture)
affects input from sensors
continuous 3

(ii) min / max / ideal / mean / extreme temperature // sampling rate // tolerance 1
interval

(iii) reading from sensor is compared with parameter


appropriate action is taken (by example) 2

(d) (i) reading available for processing 1


reading value is 4 1

(ii) AND #B00000100 // AND #&04 // AND #4


1 mark for AND, 1 mark for address mode, 1 mark for mask, 1 mark for
indication of numbering system max 3

Total: 18

2 (a)(i) Control system 1

(a)(ii) Use of actuators means that the system is controlling 1

(b) System wastes processor time checking for values that are not changing 1 2
Some sensor input needs to be acted upon immediately 1

(c)(i) Interrupts need to be disabled so that the process of dealing with an interrupt is 1
itself not interrupted

(c)(ii) After handling the interrupt interrupts need to be enabled so that further 1
interrupts can be dealt with

(c)(iii) Content of registers 1 2


Placed on stack 1

(c)(iv) Changing sensor value dealt with as soon as it happens 1 2


Processor needs to check sensor only when an interrupt occurs 1

(c)(v) AND #B0000001000000000 // AND #&0200 // AND #512 2


Op code 1
Operand 1
By: ALI AKRAM Airport Road | Bahria Town | Johar Town
___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

3 (a)(i) Monitoring system 1

(a)(ii) There is no element of ‘control’ in the system // the system does not alter 1
conditions in the building if sensors triggered

(a)(iii) Any two sensors from: Max 2


Sound / acoustic
Pressure
Infra-red / motion /proximity
Temperature / Thermal
Light
Smoke
Tilt

(b)(i) 01 ForEver ← FALSE //TRUE 1 3


02 REPEAT
03 FOR FloorCounter ← 1 TO NoOfFloors
04 FOR SensorCounter ← 1 TO NumberOfSensors 1
05 READ Sensor(SensorCounter)on Floor(FloorCounter)
06 IF Sensor value outside range
07 THEN
08 OUTPUT “Problem on Floor ”, FloorCounter
09 ENDIF
10 ENDFOR
11 ENDFOR
12 //
13 // Delay loop
14 // Delay loop
15 //
16 UNTIL ForEver/Forever = TRUE // NOT ForEver / ForEver =
FALSE 1

(b)(ii) FOR Counter ← 1 TO 999999 (any “large” number) 1


ENDFOR

(b)(iii) To allow time to elapse between readings 1

(c)(i) To identify which sensor caused the interrupt 1

(c)(ii) Display appropriate warning message 1 2


On the correct monitor 1

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

4 (a)(i) Control system 1

(a)(ii) System is controlling devices // turns heaters on and off // use of actuators 1
maintain the environment // makes use of feedback

(b) Computer/microprocessor 4
« to process the sensor readings
Analogue to digital convertor
« Sensor produces analogue signal but processor requires digital data
Digital to analogue convertor
« Processor produces digital signal but actuator may require analogue sign
Actuator
« May be required to turn heater on or off
1 mark for device, 1 mark for justification, max 2 devices

(c)(i) One mark per column excluding LOWTEMP 4

LOWTEMP LOWREG COUNTER ACC IX


15 B00000000 1
0
17
1
2
2
1
14
B00000000
B00000010 B00000010
2
4
4
2

(c)(ii) • COUNTER has an initial value of 1 2


• Test for final value is before COUNTER updated
• COUNTER is doubled in value each time around loop
• six sensors values/bits to check
• COUNTER is doubled in value 6 times // 25
• Values of COUNTER at test will therefore be 1 – 2 – 4 – 8 – 16 – 32
1 mark for valid point, max 2

(c)(iii) • Load the contents of LOWREG into ACC 3


• Check bit position in LOWREG
• For each of the least significant 6 bits
• Use AND operation / mask to isolate a bit
• Jump to code corresponding to bit being looked at
• if value of bit is 1
• Send signal to appropriate actuator to turn on the heater
1 mark for valid point, max 3

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

5 (a) One mark for suitable sensor, one mark for justification 2
Max one sensor, max two marks

humidity
« to ensure that the plants have the right level of moisture in the air

pressure / proximity
« to detect whether the windows are open or closed condone ‘check’

moisture
« to ensure the water levels in the soil are correct

light
« to ensure the light levels in the greenhouse are correct for plant growth
« to ensure the windows are closed when night falls

Accept pH sensor for one mark only

Accept CO2 sensor for one mark only, accept gas or O2 for one mark only

Justification needs to answer the question why? Not just describe the sensor

Accept suitable actions resulting from sensor readings as justification

(b) Three from: 3

• Actions taken by system // or by example: e.g. adjust heater / turn on


sprinkler / open windows

• May affect the readings taken by the sensors // or by example

• Which in turn may cause a change in the actions taken by the system //
or by example

• This is a continuous process«

(c)(i) One from: 1

• Lowest allowable temperature

• Highest allowable temperature

• Sampling time interval

(c)(ii) If answer to c(i) is highest allowable or lowest allowable temperature: 2

• The sensor reading is compared to a stored parameter (1)


• Depending upon result of comparison an action may or may not be
carried out (1)

If answer to c(i) is sampling time interval:

• The higher the sampling rate« (1)


• «The better / more efficient is the control system (1)

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

(d)(i) 20 1

(d)(ii) LDD 4002 // load the contents of the 16 bit 3


location containing the value
for Sensor 5 into the
Accumulator
LSR #8 // move the bits in the Accumulator
so that the Accumulator stores
the value of Sensor 5 as
unsigned 16-bit binary integer
1 mark for 4002

1 mark for LSR

1 mark for #8

6 (a) control system // monitoring and control system 1

(b) 1 mark for identifying hardware, 1 for purpose to max 4 for 2 hardware 4
devices

For example:
• actuator/relay/switch (1) to turn a heater/fan on or off (1)
• heater (1) to heat the museum (1)
• fan (1) to cool the museum (1)
• analogue to digital converter (1) to convert analogue signal from sensor
to a digital value that can be stored/manipulated (1)
• transmission hardware//cable (1) to transfer data/signals (1)
• processor (1) to manage the temperature control (1)
• Visible/audible warning device (1) to give warning to a human if
temperature is at a dangerous level (1)

(c)(i) 1 mark per bullet 3


• Temperature reading is 179
• reading in room 5
• has been processed

(c)(ii) 1 mark for each 8 bits 2

7 6 5 4 3 2 1 0
1 1 1 0 1 1 1 0 0 0 0 1 0 0 0 0
Byte 1 Byte 2

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

7 (a) 2 marks for all 5 single lines correct, 1 mark for 4 lines correct otherwise zero 2

Scenario System

Car speed display

Aeroplane autopilot
Control

Rollercoaster
Monitoring

Recording the rainfall


at a weather station

Robot loading a part


onto a conveyer belt

(b) 1 mark for identifying hardware, 1 for purpose to max 6 for 3 hardware devices 6

• temperature sensor/thermistor (1) measures current temperature (1)


• thermostat (1) measures current temperature automatically turns heater
on/off (1)
• actuator/relay/switch (1) to turn a heater/fan on or off (1)
• heater (1) to heat the water in the tank(s) (1)
• fan (1) to cool the water in the tank(s) (1)
• analogue to digital converter (1) to convert analogue signal from sensor to a
digital value that can be stored/manipulated (1)
• transmission hardware/cable (1) to transfer data/signals (1)
• processor (1) to manage the temperature control (1)
• Visible/audible warning device (1) to give warning to a human if temperature
is at a dangerous level (1)

(c)(i) 1 mark per bullet 3

• temperature reading in fish tank number 3


• temperature is 11
• has not been processed

(c)(ii) 1 mark per bullet 2

• Byte 1: 10010000
• Byte 2: 11111110

(d) 1 mark per bullet 3

• LDD 6753
• OR #B00010000 / #16 / #&10
• STO 6753

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

8 (a) 1 mark per bullet point (max 3) 3

• To ensure that the system operates within the given criteria


• By enabling system output to affect subsequent system inputs
• Thus enabling the system to automatically adjust conditions
• Suitable example of feedback

(b) 1 mark per bullet point 4

• Sensors continually measure the temperature of the water in the


swimming pool
• The (stream of) readings are sent to a processor and compared with 28
degrees
• If the reading is out of range (by a system set amount) then actuators
turn the heater/cooler on or off as necessary
• Feedback ensures that the water temperature remains close to 28
degrees

(c) 1 mark for example of monitoring system, max 2 for explanation 3

• Suitable example identified


• Use of data captured
• No feedback as there is no output that could change the system
environment

For example:

• Monitoring the rainfall


• The amount of rainfall collected over a specific time is measured
• There is no output to change the level of rainfall
or
• Security camera
• Sending pictures to control room
• No changes made to environment by system

9 1 mark for identifying hardware, 1 mark for the purpose to max 2 hardware 4
devices.

• Moisture sensor «
• « to measure the level of moisture in the soil

• Humidity sensor «
• «to measure the level of moisture in the air

• Pressure/Precipitation sensor «
• «to measure the amount of rainfall

• Actuator «
• «to turn the sprinklers on/off

• Analogue to Digital Converter/ADC «


• «to convert analogue signal from a sensor to a digital value that can be
stored / recorded

By: ALI AKRAM Airport Road | Bahria Town | Johar Town


___________________________________________________________________________________________________
Topic 6: Mark Scheme Computer Science Paper 3 Topical

10 (a) 1 mark per bullet point to max 2 2

• Monitoring only gathers information but control systems also perform actions
• Output in a control system can affect the input
• There is no feedback in a monitoring system // a control system relies on
feedback
• Example of monitoring applied to the weather station

(b)(i) 1 mark per bullet point to max 2 2

• So the readings are stored in chronological order


• Easy to add / append each new reading to the end of the file // no further
processing is required
• Allows the readings to be read in the order that they were taken
• Readings do not need to be given further identification as to date / time // no
key field needs to be added

(b)(ii) 1 mark per bullet point max 2 2

• Earliest temperature reading is accessed first


• and each successive temperature reading is read (in date / time order)
• until the final reading has been accessed

(b)(iii) 1 mark for Random 4

1 mark per bullet point for description to max 3

• Record locations are calculated


• using a hashing algorithm on a key field
• If a record cannot be stored / found at that location
• then subsequent locations are searched // closed hash
• ... or an overflow area is searched // open hash

By: ALI AKRAM Airport Road | Bahria Town | Johar Town

You might also like