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

Computer Systems Sample Assessment Exam

Uploaded by

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

Computer Systems Sample Assessment Exam

Uploaded by

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

Computer Systems

[Day] [Month] [Year]

Examination Paper
Answer ALL questions.

Clearly cross out surplus answers.

Time: 3 hours

The maximum mark for this paper is 100.

Any reference material brought into the examination room must be


handed to the invigilator before the start of the examination.
Answer ALL questions

Marks
Question 1

a) The correct CPU cycle sequence is (Select ONE (1)) 1

i) Fetch, decode, write


ii) Fetch, decode, execute
iii) Fetch, uncompress, execute
iv) Decode, fetch, execute

Mark scheme

iii) Fetch, decode, execute

b) ONE (1) nanosecond is (Select ONE (1)) 1

i) Thousandth of a second
ii) Millionth of a second
iii) Thousand millionth of a second
iv) Million millionth of a second

Mark scheme

iii) Thousand millionth of a second

c) CPU ALU stands for (Select ONE (1)) 1

i) Advanced logical unit


ii) Allowed access unit
iii) Access limiting utility
iv) Arithmetic and logical unit

Mark scheme

iv) Arithmetic and logical unit

Page 2 of 15
Computer Systems © NCC Education Limited 2024
d) Hexadecimal number 3A is binary (Select ONE (1)) 1

i) 00111010
ii) 10100011
iii) 00110101
iv) 01011100

Mark scheme

i) 00111010

e) Watchdog in a microcontroller is used to (Select ONE (1)) 1

i) Keep time of the day


ii) Delay CPU instructions
iii) Restart CPU from the beginning
iv) Watch over CPU speed

Mark scheme

iii) 00111010

f) Identify FIVE (5) types of digital computers. 5

Mark scheme

1 mark for each of the following, maximum 5 marks


 Microcontroller
 Server
 Distributed
 Mainframe
 Multi-core
 Any other creditable digital computer

Total 10 Marks

Page 3 of 15
Computer Systems © NCC Education Limited 2024
Question 2

You are designing a new device that has a small but fast memory. The memory is
addressed using a 12-bit address bus. A requirement is that the memory contents must not
be lost after powering off the device. The data bus is an 8-bit bus. The CPU speed is 50
MHz.

a) Does the device need to use volatile or non-volatile memory? Justify your 2
answer.

Mark scheme

Non-volatile (1 mark), content not lost when no power (1 mark)

b) Is a dynamic or static type of memory best for the device? justify your answer. 2

Mark scheme

Static (1 mark), it’s faster (1 mark)

c) Calculate the maximum size of memory in bytes that can be supported by this 2
device. You must show your working.

Mark scheme

Size = 212 bytes (1 mark) = 4096 bytes (1 mark)

d) The device can transfer 8-bit data every 2 clock cycles. Calculate how long it will 3
take to transfer 10 Mbyte data. You must show your working.

Mark scheme

2 clock times = 2/50 x 103 sec = 40 usec (1 mark), time taken = 40 x 10 x 103
usec (1 mark) = 4 x 105 usec = 4 x 105 /106 sec = 0.4 sec (1 mark)

e) The CPU idle time must not exceed 4 clock cycles while waiting for data from 1
memory. Calculate the minimum speed of memory accesses. You must show
your working.

Mark scheme

4 clock times = 4/50 x 103 sec = 80 usec (1 mark)

Total 10 Marks

Page 4 of 15
Computer Systems © NCC Education Limited 2024
Question 3

a) An operating system is managing THREE (3) processes P1, P2 and P3. The
priorities of the processes are 1, 2 and 3 respectively. Assume the highest priority
is 1 and the lowest is 3. Processes start in the order of P2, P3 and P1. The first
process, P2, is already running when the other TWO (2) processes, P3 and P1,
start. Each process runs once only.

i) Assuming round-robin scheduling is used, show in what order the 1


processes will run.
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

P2, P3, P1 (1 mark for sequence)


ii)
ii) Assuming priority-based scheduling is used, show in what order the 2
processes will run.
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

P2, P1, P3 (1 mark for swapping P1 and P3, 1 mark for sequence)
iii)
iii) Assuming priority-based, pre-emptive scheduling is used, show in what 2
order the processes will run.
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

P1, P2, P3 (1 mark for swapping P1 and P2, 1 mark for sequence)
iv)

b) An operating system has states, and it moves from one state to another under
certain conditions. Moving from one state to another is called a transition.

i) Identify the THREE (3) main states. 3


[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

1 mark for each of the following, a maximum of 3 marks


 Ready
 Running
 Waiting / Suspended
ii)
ii) Identify which state a new process is first put in. Identify which next state 2
this process can possibly transition into. You may use a diagram; use
arrows to show directions of the transitions.
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

Ready (1 mark)
iii)Ready  Running (1 mark)
Total 10 Marks

Page 5 of 15
Computer Systems © NCC Education Limited 2024
Question 4

a) Computer systems process binary numbers, and binary numbers can be


expressed in different formats.

i) Add binary numbers 10011 and 01011. Give the result as a binary 1
number.
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

11110 (1 mark)
ii)
ii) Prove your answer by converting the numbers in i) to decimal numbers. 2

[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

10011 = 19, 01011 = 11, 11110 = 30 (1 mark for conversions, 1 mark for
the proof 19 + 11 = 30)
iii)
iii) Convert the hexadecimal number B5C9 to its binary form. 1
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

iv)1011 0101 1100 1001 (1 mark)

iv) Use two’s complement method to negate the binary number 01101100. 2

[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

10010011 (1 mark for inverting)


v)10010011 + 1 = 10010100 (1 mark for adding 1)

b) Computers use logical operators when processing logic values, TRUE or FALSE,
in logic circuits. Logic gates in logic circuits function as logic operators.

i) A logic gate has TWO (2) inputs and one output. The only time its output is 2
TRUE is when both inputs are TRUE. Identify the type of this gate. What
gate will it be called if both inputs are negated?
[Insert
Markthescheme
marking scheme for part (b) here.] [Insert th

AND gate (1 mark), NAND gate (1 mark)


ii)
ii) A water system has TWO (2) valves that control the flow of water. Water 2
stops flowing only when both valves are closed. What logic does this
represent? What logic name is given to the system where water stops
flowing only when both valves are open?

[InsertMark
thescheme
marking scheme for part (b) here.] [Insert th
OR logic (1 mark), NOR logic (1 mark)
iii)
Total 10 Marks
Page 6 of 15
Computer Systems © NCC Education Limited 2024
Question 5

Computer programs are composed of CPU instructions and data, all in binary form. The
instructions are executed by the CPU. Some instructions make use of the data when
executing. A typical CPU instruction has an opcode and may have ONE (1) or more
operands.

a) Explain the function of an Opcode. Give TWO (2) examples of opcodes. 3

Mark scheme

Opcode defines what operation the instruction is doing (1 mark)


1 mark each for the TWO (2) credible examples, a maximum of 2 marks.

Examples can include:


 ADD (values)
 MOVE (data)
 CMP or COMPARE (values)
 JMP or JUMP (to address)
Allow any other credible examples.

b) Explain what operands are. Give TWO (2) examples of instructions using ONE 3
(1) or TWO (2) operands.

Mark scheme

Operands define what values the Opcode is using (1 mark) or the


addresses of the locations where the values can be found. (1 mark)
Example: Opcode value, register / Opcode register, register (1 mark)
Note: Also accept a register name (e.g. R01) for register and an Opcode
name (e.g. ADD).

c) I wish to store the same data in memory locations from 100 to 200. Identify the 4
best type of addressing mode I need to use and briefly explain how I can use it.

Mark scheme

Indirect addressing is the best mode (1 mark).


Put address value in a register (1 mark); use the register as an indirect
address (1 mark); repeat 100 times incrementing register value by 1 each
time (1 mark).

Total 10 Marks

Page 7 of 15
Computer Systems © NCC Education Limited 2024
Question 6

System software is part of all computer systems. They are needed to support other system
software and user applications.

a) Explain how system software differs from application software. 3

Mark scheme

1 mark for each of the following, a maximum of 3 marks


 System software is used to support applications.
 System software has higher privileges than applications.
 Some system software can interface with hardware.

b) A system software that is essential for producing application software is the 2


language compiler. Explain what its main function is.

Mark scheme

The compiler takes high-level language statements (1 mark) and converts


them to executable low-level code, i.e. binary instructions. (1 mark)

c) Some developers use virtual machines. Explain what a virtual machine is and 5
what it is used for.

Mark scheme

A virtual machine emulates (1 mark) a guest computer’s instructions on a


host computer (1 mark). It is used to evaluate other operating systems on a
host operating system (1 mark); it is used to run applications written for
one guest operating system on a host operating system (1 mark); it is used
to run multiple guest operating systems on host operating system (1 mark).

Total 10 Marks

Page 8 of 15
Computer Systems © NCC Education Limited 2024
Question 7

Digital logic is the heart of digital devices such as computers, mobile phones, etc. They
take binary inputs and produce binary outputs to fulfil a function.

a) A logic equation is defined as P = ( . B) + ( . A) where a dot is an AND 4


operation, a plus is an OR operation and a bar is a NOT operation. Complete the
missing values in the truth table below.

A B ( . B) ( . A) P
FALSE FALSE
FALSE TRUE
TRUE FALSE
TRUE TRUE

Mark scheme

1 mark for each correct value in the P column, a maximum of 4 marks

A B ( . B) ( . A) P
FALSE FALSE FALSE FALSE FALSE
FALSE TRUE TRUE FALSE TRUE
TRUE FALSE FALSE TRUE TRUE
TRUE TRUE FALSE FALSE FALSE

b) Draw the logic circuit representing the equation in i) where A and B are the inputs 4
and P is the output.

Mark scheme

1 mark for the correct gate types and numbers (2 AND gates + 1 OR gate),
maximum 3 marks
1 mark for the correct connections including the NOT functions (ALL
connections must be correct)

c) Give the TWO (2) main functions of a hardware design language (HDL). 2

Page 9 of 15
Computer Systems © NCC Education Limited 2024
Mark scheme

HDL is a high-level language used to design digital logic circuits (1 mark). It


is also used in the simulation of digital logic circuits (1 mark).

Total 10 Marks

Page 10 of 15
Computer Systems © NCC Education Limited 2024
Question 8

A microcontroller is a computer system on a chip (SoC). They are normally embedded in


products and tucked away out of sight.

a) Identify THREE (3) products you can find embedded microcontrollers. 3

Mark scheme

Many products can be named here, the list below is not exhaustive.
1 mark for each of the following products for a maximum of 3 marks:
 Domestic appliances
 Handheld devices
 Entertainment equipment
 Cars
 TVs
 Digital receivers
 Toys
Accept any other credible products

b) A microcontroller has a 100 MHz CPU. We need to program one of its count- 3
down-to-zero timers that uses a CPU clock to count down in order to delay a
program code for 10 ms. Calculate the initial count value needed in the timer.

Mark scheme

1 mark for each of the following, a maximum of 3 marks

100 MHz CPU clock period is 1/100 x 1000 sec = 10 usec


The timer value is counted down by one every 10 usec.
Therefore, the timer count should be set to (10 x 1000) / 10 = 1000.

c) Explain what the duty cycle is in a pulse width modulation (PWM) timer. A 4
washing machine’s drum speed is controlled by a PWM timer. If the maximum
speed of the drum is 1400 rpm, calculate what duty cycle is needed to reduce the
speed to 560 rpm. Give the result as a percentage value.

Briefly suggest how a variable voltage potentiometer can be used to adjust the
brightness of LED lights.

Mark scheme

The duty cycle defines the ratio between the on and the off periods of the
output of the PWM timer (1 mark).
The duty cycle needed is 560 / 1400 = 40% (1 mark).
The potentiometer’s analogue output is converted to digital values (1
mark).
The digital values are then used by the PWM timer to change its duty cycle
(1 mark).

Page 11 of 15
Computer Systems © NCC Education Limited 2024
Total 10 Marks

Question 9

Data communications networking is an integral part of modern computer systems.

a) Explain the differences between half-duplex and full-duplex transmission modes. 4

Mark scheme

Half-duplex mode communicates in both directions (1 mark) but only in one


direction at a time, i.e. not at the same time (1 mark).
Full-duplex mode can communicate in both directions (1 mark) at the same
time (1 mark).

b) A data packet header contains some important information. Explain the 3


information needed to make sure packets reach their destinations, they can be
acknowledged, and errors can be detected.

Mark scheme

Destination address makes sure the packet reaches its destination (1


mark).
The source address makes sure acknowledgements can be sent to the
sender (1 mark).
Error control information can detect corrupt packets (1 mark).

c) Describe TWO (2) conditions for when a data transmission is re-tried. 2

Mark scheme

Message not received by the destination (1 mark).


Message received by the destination but is corrupt (1 mark).

d) State what the data communication protocol is. 1

Mark scheme

Data communication protocol defines the rules for successful


communication. (1 mark)

Total 10 Marks

Page 12 of 15
Computer Systems © NCC Education Limited 2024
Question 10

In an attempt to enhance computer system’s performance, advanced technologies have


been developed, besides increasing CPU clock speeds.

a) ONE (1) technology to improve computer performance is the CPU pipeline. 4


Explain how it improves performance.

Mark scheme

CPU instructions are divided into multiple stages (1 mark)


CPU pipeline can process different stages (1 mark) of multiple instructions
at the same time (1 mark). This way multiple instructions will complete
faster than if no pipeline is used (1 mark).

b) Modern compilers produce optimised code that helps enhance computer 4


performance. Name TWO (2) optimisations and explain them.

Mark scheme

For any of the below points, a maximum 4 points


 Eliminating redundant instructions (1 mark): This identifies those CPU
instructions that if removed will not change the program logic, i.e. they
are redundant (1 mark).
 Out-of-order execution (1 mark): The order of the instructions is
changed to remove dependencies between close instructions (1 mark).
 Constant folding (1 mark): Any arithmetic expression with constant
values is evaluated at compile time removing the need for arithmetic
instructions (1 mark).

c) Explain what feature of a 4-core CPU can improve performance. 2

Mark scheme

In a 4-core CPU, there are 4 independent CPUs with their separate caches
(1 mark). Each CPU can execute different programs’ instructions at the
same time (1 mark).

Total 10 Marks

End of paper

Page 13 of 15
Computer Systems © NCC Education Limited 2024
Learning Outcomes matrix

Question Learning Outcomes Marker can differentiate


assessed between varying levels of
achievement
1 LO 1, LO 3, LO 6 Yes
2 LO 3 Yes
3 LO 2 Yes
4 LO 3 Yes
5 LO 4 Yes
6 LO 5 Yes
7 LO 3 Yes
8 LO 6 Yes
9 LO 7 Yes
10 LO 6 Yes

Page 14 of 15
Computer Systems © NCC Education Limited 2024
Grade descriptors
Learning Fail Referral Pass Merit Distinction
Outcome
Understand and None or Some credible Limited but Good Excellent
identify the main inadequate but incomplete satisfactory demonstration of demonstration of
types and description of attempt to demonstration of understanding of understanding of
components of computer demonstrate understanding of computer computer
computer systems and understanding of computer systems systems and systems and
systems components computer and components components components
systems and
components

Describe the None or very A very limited and Limited and above Good description Excellent and full
structure and role basic description basic description basic description of of most description of all
of modern of components of of components of components of components of components of
operating operating operating operating systems operating operating
systems systems systems systems systems

Understand and No demonstration A basic An above basic A good An excellent


work with binary of working with demonstration of demonstration of of demonstration of demonstration of
numbers and binary numbers restricted range working with working with a working with full
computer logic and logic of working with restricted range of wide range of range of binary
operators binary numbers binary numbers binary numbers numbers and
and logic and logic operators and logic logic operators
operators operators

Understand the None or trivial Limited Basic Good Excellent


essential explanation of understanding understanding and understanding understanding
structure of instruction sets, and explanation explanation of and explanation and explanation
computer addressing of instruction instruction sets, of instruction of instruction
programs modes and sets, addressing addressing modes sets, addressing sets, addressing
interrupts modes and and interrupts modes and modes and
interrupts interrupts interrupts

Explain the No or wrong Limited and very Basic but limited Good and Excellent and
hierarchy of explanation of basic explanation explanation of competent complete
computer computer of computer computer software explanation of explanation of
software software software hierarchy computer computer
hierarchy hierarchy software software
hierarchy hierarchy

Describe No or insufficient Limited and very Basic and partly Good description Excellent and
alternative description of basic description satisfactory of performance complete
computer performance of performance description of enhancing description of
systems enhancing enhancing performance technologies performance
technologies technologies enhancing enhancing
technologies technologies

Discuss the role No or very trivial A very basic Basic but credible Good and wide- Excellent and
of Data discussion of discussion of discussion of data ranging complete
Communications data data communications discussion of discussion of
and Networks in communications communications protocols and data data
computer protocols and protocols and components communications communications
systems components components protocols and protocols and
components components

Page 15 of 15
Computer Systems © NCC Education Limited 2024

You might also like