Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

1. An alarm clock is controlled by a microprocessor. It uses the 24 hour clock.

The
hour is represented by an 8-bit register, A, and the number of minutes is
represented by another 8-bit register, B.

(a) Identify what time is represented by the following two 8-bit registers.

A B

128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
0 0 0 1 0 0 1 0 : 0 0 1 1 0 1 0 1

Hours ............................................ Minutes .........................................


[2]

(b) An alarm has been set for 07:30. Two 8-bit registers,CandD, are used to
represent the hours and minutes of the
alarm time.

Show how 07:30 would be represented by these two registers:

C D
:

Hours Minutes
[2]

(c) Describe how the microprocessor can determine when to sound the clock alarm.

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

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

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

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

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

........................................................................................................................................[3]
2. The seven stages in a von Neumann fetch-execute cycle are shown in the table
below.

Put each stage in the correct sequence by writing the numbers 1 to 7 in the right
hand column. The first one has been done for you.

Stage Sequence
number

the instruction is then copied from the memory location contained


in the MAR (memory address register) and is placed in the MDR
(memory data register)

the instruction is finally decoded and is then executed

the PC (program counter) contains the address of the next instruction


to be fetched
1
the entire instruction is then copied from the MDR (memory data
register) and placed in the CIR (current instruction register)

the address contained in the PC (program counter) is copied to the


MAR (memory address register) via the address bus

the address part of the instruction, if any, is placed in the MAR


(memory address register)

the value in the PC (program counter) is then incremented so that it


points to the next instruction to be fetched

[6]

3. Draw a line to connect each question to the correct answer.

What is the denary (base 10) 8


equivalent to the hexadecimal
digit E

If 1 GB = 2 12
x
then what is the value of X?

How many bits are there in one 14


byte?

If the broadband data download 19


rate is 40 megabits per second,
how many seconds will it take to
download a 60 MB file?

What is the denary (base 10) 30


value of the binary number
00100100?

36
What hexadecimal value
is obtained when the two
hexadecimal digits C and D
are added together?

[5]

4. List the main stages you should go through when trying to solve a general problem.
.................................................................................................................................

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

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

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

5. Variables and Constants are both identifiers. Explain the difference between them.
.................................................................................................................................
.................................................................................................................................
.............................................................................................................................[2]
5. The following table shows four applications which require specialist input devices.
For each application, suggest one possible input device and give a reason for your
choice. Application Input device Reason for choice of device

Application Input Device Reason for your choice


Virtual reality
application

Disabled person
communicating with
a computer system

Automatic stock
control system at a
supermarket

Information kiosk at
an airport using a
GUI interface

[8]
6. The following flowchart inputs ten temperatures and outputs the average (mean)
temperature and the number of temperatures which were negative (i.e. < 0).
(a) Complete the trace table for this flowchart using the following test data:

5, 11, 16, -4, -10, 8, 10, -3, 17, 10

[6]

(b) What values are output from the flowchart using the above test data?

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

.........................................................................................................................................[1]
7. A school has 1800 students. The start date and leaving date for each student is stored on file.
Dates are in the format YYMMDD (e.g. a student starting on 10th September 2007 and leaving on 4th
August 2012 has the data 070910 and 120804 on file).

(a) Write an algorithm, using a flowchart, which

• inputs Student ID for all 1800 students

• inputs the start date and leaving date for each student

• carries out a check to ensure the second date is later

• if error, increments error counter

• outputs the number of errors


[5]
(b) Describe, with examples, two sets of test data you would use to test your algorithm.

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

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

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

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

8. Carefully study the following flowchart


(a) Complete the trace table for the following data:

1, 0, 1, 1, 0, 1

[4]

(b) What process does this flowchart perform.


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

(c) Predict the output from the flowchart for an input of 1 ,1 , 1, 1 ,0 , 0

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

You might also like