You are on page 1of 2

INFORMATION AND COMMUNICATIONS

UNIVERSITY
SCHOOL OF ENGINEERING
DEPARTMENT OF ICT

INTRODUCTION TO COMPUTER SYSTEMS ENGINEERING

July-Dec 2020 Assignment


Due date 27th November 2020

1) Suppose that we have two implementations of the same of the same instruction of the same
instruction set architecture. Machine A has a clock cycle time of 50ns and a CPI of of 4.0 for
some program and machine B has a clock cycle of 65ns and a CPI of 2.5 for the same program.
Which machine is faster and by how much?

2) Assume that a series of five tests has been offered to a class consisting of 50 students. The
score obtained by students in each of the five tests are stored sequentially in memory
locations starting respectively at memory locations 1000, 2000,3000,4000,5000. You are
required to write a program that calculates the average score obtained by each student in the
five tests and store the same in memory locations starting at memory location 6000. Each
student is identified by his /her student ID. You may assume that student IDs are sequential.

3) Consider having a program that runs in 50s on Computer A, which has a 500MHz clock. We
would like to run the same program on machine B in 20s. If machine B requires 2.5 times as
many clock cycles as machine A for the same program. What clock rate must machine B have
in MHz?

4) Write a subroutine using the X86 instructions that can be called by a main program in a
different code segment. The subroutine will multiply a signed 16-bit number in CX by a signed
8-bit number in AL. The main program will call this subroutine, store the results in two
consecutive memory words and stop. Assume that SI and DI contain the signed 8-bit and 16-
bit numbers respectively.

5) Three enhancements with the following speedups are proposed for a new machine: speedup
(a) = 35, speedup (b) = 25, and speedup (c) = 15. Assume that for some set of programs, the
fraction of use is 25% for enhancement (a), 30% for enhancement (b) and 45% for
enhancement (c). If only one enhancement can be implemented, which one should be chosen
to maximize the speedup? If two enhancements can be implemented, which ones should be
chosen to maximize the speedup?

Eng Mwashi

Whatsapp/call 0964214588

You might also like