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

The University of the South Pacific

Serving the Cook Islands, Fiji, Kiribati, Marshall Islands, Nauru, Niue, Samoa, Solomon Islands, Tokelau, Tonga, Tuvalu, and Vanuatu.

School of Information Technology, Engineering,


Mathematics and Physics

CS211: Computer Organization


Test 1 – Semester 1, 2022

Time Allowed: 50 mins

Total Marks: 30 (15% of final grade)

Name: Student ID:


Learning Outcomes:

1. Explain different approaches to processor design and implementation.


2. Determine the performance of various components of a computer system.

INSTRUCTIONS:

 All questions in this paper are compulsory.


 All answers must be written in the spaces provided in this booklet.
 You are allowed to use a silent, non-programmable calculator.
 Show all working.

Page 1 of 7
1. Explain the problem that a multi-level machine solves. (3 marks)

There is a large gap between what is convenient for people and what is convenient for
computers. People want to do X, but computers can only do Y. This leads to a problem.

Give partial mark for partially correct answers.

2. Suppose there is a 3-level machine(Level 0, Level 1 and Level 2) and you have a program written
in Level 2 language to execute in that machine. Explain one way to execute the Level 2 program
in that machine. (2 marks)

Translation – the program written at high level is translated to lower level, hence new
program is generated by the translator. The machine then executes the new program.

OR

Interpretation - write a program in L0 that takes programs in L1 as input data and carries
them out by examining each instruction in turn and executing the equivalent sequence of L0
instructions directly. This technique does not require first generating a new program in L0.

Give 1 mark for partially correct answers.

Page 2 of 7
3. Between 1792 and 1871, the following technologies were invented. Explain the two technologies
and name the inventor(s). ( 4 marks)
a) Difference Engine
b) Analytical engine

a) This mechanical device, which like Pascal’s could only add and subtract, was
designed to compute tables of numbers useful for naval navigation. The entire
construction of the machine was designed to run a single algorithm, the method of
finite differences using polynomials. (1.5 marks)
b) The analytical engine had four components: the store (memory), the mill
(computation unit), the input section (punched card reader), and the output section
(punched and printed output). The store consisted of 1000 words of 50 decimal
digits, each used to hold variables and results. The millncould accept operands from
the store, then add, subtract, multiply, or divide them, and finally return the result
to the store. Like the difference engine, it was entirely mechanical. (1.5 marks)

Both were invented by Charles Babbage (1 mark)

4. Explain what will happen if a machine does not have an instruction execution cycle. (2 marks)

The machine will not be able to fetch instructions from memory, decode and exceute any
instructions.

Give 1 mark for partially correct answers.

5. One of the design principles of modern computers is the following:


Instructions Should be Easy to Decode
Explain the purpose of the above principle. (3 marks)

A critical limit on the rate of issue of instructions is decoding individual instructions to


determine what resources they need. Anything that can aid this process is useful. That
includes making instructions regular, fixed length, with a small number of fields. The fewer
different formats for instructions, the better.

Give 1.5 marks for partially correct answers.

Page 3 of 7
6. Suppose there is a 96-bit memory and bits per cell is 12. Draw a diagram to show the memory
organization. (3 marks)

1.5 mark for correct address numbering, 1.5 marks for 12 bits in a cell,

7. Why is there a need for memories to use error detection or error-correcting codes? (2 marks)

Computer memories can make errors occasionally due to voltage spikes on the power line
or other causes. To guard against such errors, some memories use error-detecting or error-
correcting codes.

Give 1 mark for partially correct answers.

8. Given the dataword, 1011 0011 1101, use hamming error detection and correction technique to
convert the dataword to codeword using even parity? Convert the codeword into hexadecimal.
(3 marks)
11 1 1 0110 0011110 1 1 1 mark

Bit 1: 1 3 5 7 9 11 13 15 17 = 5 odd
Bit 2: 2 3 6 7 10 11 14 15 = 5 odd
Bit 4: 4 5 6 7 12 13 14 15 = 5 odd
Bit 8: 8 9 10 11 12 13 14 15 = 4 even
Bit 16: 16 17 = 1 odd
1 mark for above
Code word = 1 1110 1100 0111 1011
Hexadecimal = 1EC7B 1 mark

Page 4 of 7
9. Represent -15 in 8 bits binary in the following ways:
a. One’s complement (1 mark)
b. Two’s complement (1 mark)

15 => 0000 1111

-15 => 1111 0000 (one’s Complement ) ( 1 mark)

-15 => 1111 0000

+ 1

----------------------------

1111 0001(Two’s Complement) (1mark)

10. Suppose the hard disk above has 2048 cylinders, 8 tracks per cylinder, 32 sectors per track and 512
Bytes per sector. The maximum seek time is 450 msec, the time to move between adjacent
cylinders is 10 msec, the rotation time is 14. Calculate the maximum access time If the entire disk
was full of data stored consecutively, how much time would it take to read the entire disk if the
read/write head is already positioned on the first sector of the first track of the first cylinder of the
disk? (3 marks)

Total time = cylinder read + track switch + track switch wait + cylinder switch/wait

= (8*14)*2048 + (0) + (0) + (2047*14)


= 258034 msec

Page 5 of 7
11. Show how the following floating point value -10.575 would be stored using IEEE-754 single
precision. Give the final answer in hexadecimal. (3 marks)

The sign is negative, therefore our number will start with a 1.

Now, ignoring the sign, convert 10.575 to binary:

Integer Part

0.575 x 2 = 1.15 1

0.15 x 2 = 0.3 0

0.3 x 2 = 0.6 0

0.6x 2 = 1.2 1

0.2 x 2 = 0.4 0

0.4 x 2 = 0.8 0

0.8 x 2 = 1.6 1

0.6 x 2 = 1.2 1

0.2 x 2 = 0.4 0

Therefore, 10.575 = 1010.10010011001…. (1 mark)

Next, rewrite this binary number in scientific form by moving the binary point to the left 3
places.

1.01010010011001… x 2 ^ 3 ( 1mark)

Now rewrite -3 in “excess 127” form: 3 + 127= 10000010

Hence, -10.575 will be represented in IEEE754 format as 1 10000010010100100110011001..

C1293334 ( 1mark)

The End

Page 6 of 7
[BLANK PAGE]

Page 7 of 7

You might also like