question 1....byte 1 byte 2 the location is indicated by the setting of one of the seven bits in...

29
10 5 A gardener grows vegetables in a greenhouse. For the vegetables to grow well, the temperature needs to always be within a particular range. The gardener is not sure about the actual temperatures in the greenhouse during the growing season. The gardener installs some equipment. This records the temperature every hour during the growing season. (a) Name the type of system described. ............................................................................................................................................... [1] (b) Identify three items of hardware that would be needed to acquire and record the temperature data. Justify your choice for each. Item 1 ........................................................................................................................................ Justification ............................................................................................................................... ................................................................................................................................................... Item 2 ........................................................................................................................................ Justification ............................................................................................................................... ................................................................................................................................................... Item 3 ........................................................................................................................................ Justification ................................................................................................................................ ............................................................................................................................................... [6] (c) The equipment records temperatures in the greenhouse. It does this for seven locations. Each recording is stored as two successive bytes. The format is shown below: Greenhouse location Temperature reading 7 6 5 4 3 2 1 0 Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts as a flag: the initial value is zero when the reading has been processed it is set to 1 Byte 2 contains the temperature reading (two’s complement integer). QUESTION 1.

Upload: others

Post on 21-Jan-2021

21 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

10

9608/31/M/J/15© UCLES 2015

5 A gardener grows vegetables in a greenhouse. For the vegetables to grow well, the temperature needs to always be within a particular range.

The gardener is not sure about the actual temperatures in the greenhouse during the growing season. The gardener installs some equipment. This records the temperature every hour during the growing season.

(a) Name the type of system described.

...............................................................................................................................................[1]

(b) Identify three items of hardware that would be needed to acquire and record the temperature data. Justify your choice for each.

Item 1 ........................................................................................................................................

Justification ...............................................................................................................................

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

Item 2 ........................................................................................................................................

Justification ...............................................................................................................................

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

Item 3 ........................................................................................................................................

Justification ................................................................................................................................

...............................................................................................................................................[6]

(c) The equipment records temperatures in the greenhouse. It does this for seven locations.

Each recording is stored as two successive bytes. The format is shown below:

Greenhouse location Temperature reading

7 6 5 4 3 2 1 0

Byte 1 Byte 2

The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4.

Bit 0 of byte 1 acts as a flag:

• the initial value is zero • when the reading has been processed it is set to 1

Byte 2 contains the temperature reading (two’s complement integer).

QUESTION 1.

Page 2: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

11

9608/31/M/J/15© UCLES 2015 [Turn over

(i) Interpret the data in byte 1 shown below:

7 6 5 4 3 2 1 0

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

Byte 1 Byte 2

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

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

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

.......................................................................................................................................[2]

(ii) The system receives a temperature reading of –5 degrees from sensor 6.

Complete the boxes below to show the two bytes for this recording. The reading has not yet been processed.

7 6 5 4 3 2 1 0

Byte 1 Byte 2

[2]

(d) (i) The accumulator is loaded with the value of byte 1 from location 106.

Write the assembly language instruction to check whether the reading in byte 2 came from location 4.

LDD 106 // data loaded from address 106

.......................................................................................................................................[4]

(ii) Write the assembly language instruction to set the flag (bit 0) of the byte contained in the accumulator to 1.

.......................................................................................................................................[2]

Page 3: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

8

9608/31/O/N/15© UCLES 2015

4 (a) Three descriptions and two types of processor are shown below.

Draw a line to connect each description to the appropriate type of processor.

Description Type of processor

Makes extensive use of general purpose registers

RISC

Many addressing modes are available

CISC

Has a simplified set of instructions

[3]

(b) In a RISC processor three instructions (A followed by B, followed by C) are processed using pipelining.

The following table shows the five stages that occur when instructions are fetched and executed.

(i) The ‘A’ in the table indicates that instruction A has been fetched in time interval 1.

Complete the table to show the time interval in which each stage of each instruction (A, B, C) is carried out.

Time interval

Stage 1 2 3 4 5 6 7 8 9

Fetch instruction A

Decode instruction

Execute instruction

Access operand in memory

Write result to register[3]

(ii) The completed table shows how pipelining allows instructions to be carried out more rapidly. Each time interval represents one clock cycle.

Calculate how many clock cycles are saved by the use of pipelining in the above example.

Show your working.

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

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

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

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

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

.......................................................................................................................................[3]

QUESTION 2.

Page 4: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

8

9608/32/O/N/15© UCLES 2015

4 (a) Four descriptions and four types of computer architecture are shown below.

Draw a line to connect each description to the appropriate type of computer architecture.

Description Computer architecture

A computer that does not have the ability for parallel processing.

SIMD

The processor has several ALUs. Each ALU executes the same instruction but on different data.

MISD

There are several processors. Each processor executes different instructions drawn from a common pool. Each processor operates on different data drawn from a common pool.

SISD

There is only one processor executing one set of instructions on a single set of data.

MIMD

[4]

(b) In a massively parallel computer explain what is meant by:

(i) Massive .............................................................................................................................

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

.......................................................................................................................................[1]

(ii) Parallel ..............................................................................................................................

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

.......................................................................................................................................[1]

(c) There are both hardware and software issues that have to be considered for parallel processing to succeed.

Describe one hardware and one software issue.

Hardware ..................................................................................................................................

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

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

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

Software ....................................................................................................................................

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

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

...............................................................................................................................................[4]

QUESTION 3.

Page 5: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

12

9608/31/M/J/16© UCLES 2016

6 An intruder detection system for a large house has four sensors. An 8-bit memory location stores the output from each sensor in its own bit position.

The bit value for each sensor shows:

• 1 – the sensor has been triggered

• 0 – the sensor has not been triggered

The bit positions are used as follows:

Not used Sensor 4 Sensor 3 Sensor 2 Sensor 1

The output from the intruder detection system is a loud alarm.

(a) (i) State the name of the type of system to which intruder detection systems belong.

.......................................................................................................................................[1]

(ii) Justify your answer to part (i).

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

.......................................................................................................................................[1]

(b) Name two sensors that could be used in this intruder detection system. Give a reason for your choice.

Sensor 1 ...................................................................................................................................

Reason .....................................................................................................................................

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

Sensor 2 ...................................................................................................................................

Reason .....................................................................................................................................

...............................................................................................................................................[4]

QUESTION 4.

Page 6: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

13

9608/31/M/J/16© UCLES 2016 [Turn over

The intruder system is set up so that the alarm will only sound if two or more sensors have been triggered.

An assembly language program has been written to process the contents of the memory location.

The table shows part of the instruction set for the processor used.

InstructionExplanation

Op code Operand

LDD <address> Direct addressing. Load the contents of the given address to ACC

STO <address> Store the contents of ACC at the given address

INC <register> Add 1 to the contents of the register (ACC or IX)

ADD <address> Add the contents of the given address to the contents of ACC

AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>

CMP #n Compare the contents of ACC with the number n

JMP <address> Jump to the given address

JPE <address> Following a compare instruction, jump to <address> if the compare was True

JGT <address>Following a compare instruction, jump to <address> if the content of ACC is greater than the number used in the compare instruction

END End the program and return to the operating system

Page 7: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

14

9608/31/M/J/16© UCLES 2016

(c) Part of the assembly code is:

Op code Operand

SENSORS: B00001010

COUNT: 0

VALUE: 1

LOOP: LDD SENSORS

AND VALUE

CMP #0

JPE ZERO

LDD COUNT

INC ACC

STO COUNT

ZERO: LDD VALUE

CMP #8

JPE EXIT

ADD VALUE

STO VALUE

JMP LOOP

EXIT: LDD COUNT

TEST: CMP …

JGT ALARM

Page 8: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

15

9608/31/M/J/16© UCLES 2016

(i) Dry run the assembly language code. Start at LOOP and finish when EXIT is reached.

BITREG COUNT VALUE ACC

B00001010 0 1

[4]

(ii) The operand for the instruction labelled TEST is missing.

State the missing operand.

.......................................................................................................................................[1]

(iii) The intruder detection system is improved and now has eight sensors.

One instruction in the assembly language code will need to be amended.

Identify this instruction .......................................................................................................

Write the amended instruction ......................................................................................[2]

Page 9: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

16

9608/31/M/J/16© UCLES 2016

BLANK PAGE

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.

Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

Page 10: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

6

9608/31/O/N/16© UCLES 2016

3 A computer operating system (OS) uses paging for memory management.

In paging:

• main memory is divided into equal-size blocks, called page frames• each process that is executed is divided into blocks of the same size, called pages• each process has a page table that is used to manage the pages of this process

The following table is the incomplete page table for a process X.

Page Presence flag

Page frame address Additional data

1 1 132

2 1 245

3 1 232

4 0 0

5 1 542

6 0 0

135 0 0

When a particular page of the process is currently in main memory, the Presence flag entry in the page table is set to 1.

If the page is not currently present in memory, the Presence flag is set to 0.

(a) The page frame address entry for Page 2 is 245.

State what the value 245 could represent.

.............................................................................................................................................. [1]

(b) Process X executes until the next instruction is the first instruction in Page 4. Page 4 is not currently in main memory.

State a hardware device that could be storing this page.

.............................................................................................................................................. [1]

QUESTION 5.

Page 11: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

7

9608/31/O/N/16© UCLES 2016 [Turn over

(c) When an instruction to be accessed is not present in main memory, its page must be loaded into a page frame. If all page frames are currently in use, the contents of a page frame will be overwritten with this new page.

The page that is to be replaced is determined by a page replacement algorithm.

One possible algorithm is to replace the page that has been resident in main memory for the longest time.

(i) Give the additional data that would need to be stored in the page table.

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

..................................................................................................................................... [1]

(ii) Complete the table entries below to show what happens when Page 4 is swapped into main memory. Assume that Page 5 is the one to be replaced.

In the final column, give an example of the data you have identified in part (c)(i).

Page Presence flag

Page frame address Additional data

4............... .................... .....................................

[3]

An alternative algorithm is to replace the page that has been used least.

(iii) Give the different additional data that the page table would now need to store.

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

...................................................................................................................................... [1]

(iv) In the following table, complete the missing data to show what happens when Page 3 is swapped into main memory. Assume that Page 1 is the one to be replaced.

In the final column, give an example of the data you have identified in part (c)(iii).

Page Presence flag

Page frame address Additional data

3............... .................... .....................................

[3]

Page 12: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

8

9608/31/O/N/16© UCLES 2016

(d) Explain why the algorithms given in part (c) may not be the best choice for efficient memory management.

Longest resident .......................................................................................................................

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

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

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

Least used ................................................................................................................................

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

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

.............................................................................................................................................. [4]

4 (a) (i) Complete the truth table for this logic circuit.

X

YA

B

Input OutputX Y A B0 00 11 01 1

[2]

(ii) State the name given to this logic circuit.

...................................................................................................................................... [1]

(iii) Name the labels usually given to A and B.

Label A ..............................................................................................................................

Label B ..............................................................................................................................

Explain why your answers are more appropriate for the A and B labels.

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

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

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

...................................................................................................................................... [4]

Page 13: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

14

9608/31/M/J/17© UCLES 2017

(iii) Explain how the use of circuit switching overcomes the problems you have identified in part (i).

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

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

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

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

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

.......................................................................................................................................[3]

6 A computer system is used to manage some of the functions in a vehicle. The vehicle has a number of sensors and actuators. One sensor is used to monitor the moisture on the screen. If the moisture exceeds a pre-set value, the windscreen wiper motor turns on automatically.

The software used in the computer system is dedicated to the sensor management functions. When the system starts, the software runs some initial tasks. It then loops continuously until the system is switched off.

(a) (i) State the name given to the type of system described.

.......................................................................................................................................[1]

(ii) Explain your answer to part (i).

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

.......................................................................................................................................[1]

(b) Within the software loop, the value of each sensor is read in turn. The value read from the sensor is then processed.

State two drawbacks with this method of reading and processing sensor data.

Drawback 1 ...............................................................................................................................

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

Drawback 2 ...............................................................................................................................

...................................................................................................................................................[2]

QUESTION 6.

Page 14: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

15

9608/31/M/J/17© UCLES 2017 [Turn over

(c) An alternative method of reading and processing sensor data is to use interrupts. Each sensor is connected so that it can send an interrupt signal to the processor if its value changes.

On receipt of an interrupt signal, the processor carries out a number of steps as shown in the following diagram.

Interrupt

Return to task

1. Disable interrupts

6. Enable interrupts

2. Save current task

3. Identify source of

4. Jump to InterruptService Routine

interrupt

5. Restore task

(i) State the purpose of step 1.

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

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

.......................................................................................................................................[1]

(ii) State the purpose of step 6.

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

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

.......................................................................................................................................[1]

(iii) Explain how the current task is saved in step 2.

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

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

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

.......................................................................................................................................[2]

Page 15: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

16

9608/31/M/J/17© UCLES 2017

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.

Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

(iv) State two benefits of using interrupts to read and process the sensor data.

Benefit 1 ............................................................................................................................

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

Benefit 2 ............................................................................................................................

...........................................................................................................................................[2]

(v) The interrupt handler in step 3 has to test each bit of a 16-bit register to discover the source of the interrupt.

The contents of the 16-bit register are loaded into the 16-bit accumulator:

AccumulatorBit: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

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

An instruction is required to achieve the following:

• If bit 9 is zero, set the accumulator to zero. • If bit 9 is one, set the accumulator to a non-zero value.

Write this instruction using an appropriate bitwise operation.

.......................................................................................................................................[2]

Page 16: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

8

9608/32/M/J/17© UCLES 2017

4 (a) Three file organisation methods and two file access methods are shown below.

Draw lines to link each file organisation method to its appropriate file access method(s).

File organisation method File access method

random

sequential

serial

direct

sequential

[4]

(b) An energy company supplies electricity to a large number of customers. Each customer has a meter that records the amount of electricity used. Customers submit meter readings using their online account.

The company’s computer system stores data about its customers.

This data includes:

• account number• personal data (name, address, telephone number)• meter readings• username and encrypted password.

The computer system uses three files:

File Content Use

A Account number and meter readings for the current month.

Each time a customer submits their reading, a new record is added to the file.

B Customer’s personal data. At the end of the month to create a statement that shows the electricity supplied and the total cost.

C Usernames and encrypted passwords. When customers log in to their accounts to submit meter readings.

QUESTION 7.

Page 17: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

9

9608/32/M/J/17© UCLES 2017 [Turn over

For each of the files A, B and C, state an appropriate file organisation method for the use given in the table.

All three file organisation methods must be different.

Justify your choice.

(i) File A organisation .............................................................................................................

Justification .......................................................................................................................

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

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

.......................................................................................................................................[3]

(ii) File B organisation ............................................................................................................

Justification .......................................................................................................................

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

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

.......................................................................................................................................[3]

(iii) File C organisation ............................................................................................................

Justification .......................................................................................................................

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

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

.......................................................................................................................................[3]

Page 18: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

11

9608/31/O/N/17© UCLES 2017 [Turn over

(ii) Explain why the JK flip-flop is an improvement on the SR flip-flop.

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

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

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

...................................................................................................................................... [2]

(d) Explain the role of flip-flops in a computer.

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

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

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

.............................................................................................................................................. [2]

6 A large warehouse stores goods that must be kept above a temperature of 15 degrees Celsius. The warehouse has six temperature sensors which are each placed at a different location in the warehouse.

A computer system is programmed to turn on appropriate heaters when one of the sensors is below the minimum temperature.

(a) (i) State the name given to the type of system described.

...................................................................................................................................... [1]

(ii) Justify your answer to part (i).

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

...................................................................................................................................... [1]

(b) Sensors and heaters are two types of device used in this system.

State two other devices that are used. Justify your choice.

Device 1 ....................................................................................................................................

Justification ...............................................................................................................................

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

Device 2 ....................................................................................................................................

Justification ...............................................................................................................................

...................................................................................................................................................[4]

QUESTION 8.

Page 19: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

12

9608/31/O/N/17© UCLES 2017

(c) The computer system stores the temperature readings for the six sensors in six 8-bit memory locations.

Six of the bits in an 8-bit register, LOWREG, are used to indicate whether a particular reading is below the minimum temperature. A value of 1 means the reading is below the minimum temperature.

For example:

This pattern of bits in LOWREG shows that sensor 5, sensor 4 and sensor 1 have readings below the minimum temperature.

6 5 4 3 2 1

Not used Not used 0 1 1 0 0 1

The following table shows part of the instruction set for a processor which has one general purpose register, the Accumulator (ACC), and an Index Register (IX).

InstructionExplanation

Op code Operand

LDD <address> Direct addressing. Load the contents of the given address to ACC.

LDR #n Immediate addressing. Load the number n to IX.

LDX <address>Indexed addressing. Form the address from <address> +the contents of the index register. Copy the contents of thiscalculated address to ACC.

STO <address> Store the contents of ACC at the given address.

INC <register> Add 1 to the contents of the register (ACC or IX).

ADD <address> Add the contents of the given address to the ACC.

OR <address> Bitwise OR operation of the contents of ACC with the contents of address.

CMP #n Compare the contents of ACC with number n.

CMP <address> Compare the contents of ACC with the contents of <address>.

JMP <address> Jump to the given address.

JPE <address> Following a compare instruction, jump to <address> if the compare was True.

JGE <address>Following a compare instruction, jump to <address> if the content of ACC is greater than or equal to the number used in the compare instruction.

Page 20: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

13

9608/31/O/N/17© UCLES 2017 [Turn over

Question 6(c) continues on the next page.

Page 21: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

14

9608/31/O/N/17© UCLES 2017

Part of the assembly language code for updating LOWREG is:

Label Op code Operand

LOWTEMP: 15

LOWREG: B00000000

COUNTER: 1

START: LDR #0

LOOP: LDX 8000

CMP LOWTEMP

JGE TEMPOK

LDD LOWREG

OR COUNTER

STO LOWREG

TEMPOK: LDD COUNTER

Q1: CMP #32

JPE HEATON

ADD COUNTER

STO COUNTER

INC IX

JMP LOOP

HEATON: LDD LOWREG

Page 22: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

15

9608/31/O/N/17© UCLES 2017 [Turn over

(i) The code uses six memory locations to store the temperature readings. It stores readings for sensors 1 to 6 at addresses 8000 to 8005.

At a particular time, the memory locations store the following data.

8000 8001 8002 8003 8004 8005

17 14 15 15 16 14

Dry run the assembly language code starting at START and finishing when the loop has been processed twice.

LOWTEMP LOWREG COUNTER ACC IX

15 B00000000 1

[4]

Page 23: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

16

9608/31/O/N/17© UCLES 2017

Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.

Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.

(ii) Explain why the operand of the instruction labelled Q1 has the value 32.

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

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

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

...................................................................................................................................... [2]

(iii) The code beginning at the instruction labelled HEATON must make the system turn on the heaters in those areas that are below the minimum temperature.

Describe what this code will have to do.

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

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

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

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

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

...................................................................................................................................... [3]

Page 24: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

3

9608/31/O/N/18© UCLES 2018 [Turn over

1 Consider the following user‑defined data type.

TYPE Book DECLARE ISBN : INTEGER DECLARE Author : STRING DECLARE Title : STRING DECLARE Supplier : (Amazone, Stones, Smiths, Blackwalls, Greens,

Coals, Boarders) ENDTYPE

(a) Name the data type of Book.

...............................................................................................................................................[1]

(b) Name the non‑composite data type used in the Supplier declaration.

...............................................................................................................................................[1]

(c) (i) Write a pseudocode statement to declare a variable, BestSeller, of type Book.

.......................................................................................................................................[1]

(ii) Write a pseudocode statement to assign “John Williams” to the author of BestSeller.

.......................................................................................................................................[1]

QUESTION 9.

Page 25: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

10

9608/32/M/J/19© UCLES 2019

7 (a) RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing) are two types of processor.

Tick (3) one box in each row to show if the statement applies to RISC or CISC processors.

Statement RISC CISC

Larger instruction set

Variable length instructions

Smaller number of instruction formats

Pipelining is easier

Microprogrammed control unit

Multi-cycle instructions

[3]

(b) In parallel processing, a computer can have multiple processors running in parallel.

(i) State the four basic computer architectures used in parallel processing.

1 ........................................................................................................................................

2 ........................................................................................................................................

3 ........................................................................................................................................

4 ........................................................................................................................................[4]

(ii) Describe what is meant by a massively parallel computer.

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

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

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

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

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

..................................................................................................................................... [3]

QUESTION 10.

Page 26: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

13

9608/31/O/N/19© UCLES 2019

9 (a) The following incomplete table shows descriptions relating to computer architectures.

Complete the table by inserting the appropriate terms.

Description Term

A• There are several processors.• Each processor executes different sets of instructions

on one set of data at the same time..........................................

B• The processor has several ALUs. • Each ALU executes the same set of instructions on

different sets of data at the same time..........................................

C• There is only one processor.• The processor executes one set of instructions on one

set of data..........................................

D• There are several processors. • Each processor executes a different set of instructions.• Each processor operates on different sets of data.

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

[4]

(b) State three characteristics of massively parallel computers.

1 ................................................................................................................................................

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

2 ................................................................................................................................................

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

3 ................................................................................................................................................

................................................................................................................................................... [3]

QUESTION 11.

Page 27: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

14

9608/31/O/N/19© UCLES 2019

BLANK PAGE

Page 28: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

15

9608/31/O/N/19© UCLES 2019

BLANK PAGE

Page 29: QUESTION 1....Byte 1 Byte 2 The location is indicated by the setting of one of the seven bits in byte 1. For example, location 4 is indicated by setting bit 4. Bit 0 of byte 1 acts

9

9608/32/O/N/19© UCLES 2019 [Turn over

6 (a) State what is meant by a user-defined data type.

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

............................................................................................................................................. [2]

(b) A pseudocode declaration for a user-defined data type for the months of the year is as follows:

TYPE DECLARE Months: ( January, February, March, April, May, June, July,

August, September, October, November, December) ENDTYPE

(i) Identify this type of user-defined data type.

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

..................................................................................................................................... [1]

(ii) Write a pseudocode statement to declare a variable CurrentMonth of data type Months.

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

..................................................................................................................................... [1]

(iii) Write a pseudocode statement to assign the value August to the variable CurrentMonth.

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

..................................................................................................................................... [1]

QUESTION 12.