Computer Architecture and Organization (CT 211) - Exam

THE UNIVERSITY OF DODOMA
OFFICE OF THE DEPUTY VICE CHANCELLOR ACADEMIC, RESEARCH AND CONSULTANCY

COLLEGE OF INFORMATICS AND VIRTUAL EDUCATION
Department of Computer Science and Engineering

End of Semester One University Examination for the 2023/2024 Academic Year

Course Name: Computer Architecture and Organization
Paper Code Number: CT 211
Date of Examination: 28th February, 2024
Time: 08:00-11:00
Duration: 3 Hours
Venue(s): LRB 105, 004C, LRB 004D, 005B, 003D, 101, 102, LRB LRA 020, 101&102
Sitting Programme(s): BSc. SCDFE2, CE2, CNISE2, CS2, MTA2&SE2


SECTION A: (40 MARKS)

Answer all questions in this section

Question One

a. Explain the principle of locality and how it affects Caching Memory? (4 Marks)

c. What happens when a new item needs to be added to cache but there is not enough space left? (2 Marks)


Question Two

a. What causes divide underflow and what can be done about it? (4 Marks)

b. Why do we usually store floating-point numbers in normalized form? What is the advantage of using a bias as opposed to adding a sign bit to the exponent? (6 Marks)


Question Three

a. List down four key characteristics of MARIE architecture. (4 Marks)

b. Describe in brief essential components in MARIE data Path, with the aid of a well labelled diagram. (6 Marks)

Diagram:


Question Four

Assume you have a machine that uses 32-bit integers and you are storing the hexadecimal value 1234 at address 0.

i. Show how this is stored on a big endian machine. (2 Marks)

ii. Show how this is stored on a little endian machine. (2 Marks)

iii. If you wanted to increase the hexadecimal value to 123456, which byte assignment would be more efficient, big or little endian? Explain your answer. (6 Marks)


SECTION B: (60 MARKS)

Attempt any THREE (3) out of FOUR (4) questions provided.

Question Five

a. Explain the advantages and disadvantages of each of following processor implementations: (3 Marks Each)

i. Single-cycle implementation.

ii. Multiple-cycle implementation.

iii. Pipelined implementation.

b. With the aid of well-labeled diagram, draw the single-cycle data-path for each of the following instructions stating clearly the hardware used.

i. Load and store instructions. (6 Marks)

ii. ALU instruction. (5 Marks)


Question Six

a. Suppose a computer using set associative cache has 2²¹ words of main memory, and a cache of 64 blocks, where each cache block contains 4 words.

i. If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, set, and word fields? (5 Marks)

ii. If this cache is 4-way set associative, what is the format of a memory address as seen by the cache? (5 Marks)

b. Suppose a computer using direct mapped cache has 2³² words of main memory, and a cache of 1024 blocks, where each cache block contains 32 words.

i. How many blocks of main memory are there? (2 Marks)

ii. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and word fields? (6 Marks)

iii. To which cache block will the memory reference 000063FA₁₆ map? (2 Marks)


Question Seven

a. What are pipeline hazards? (2 Marks)

b. Briefly explain the following classes of pipeline hazards:

i. Data hazard. (3 Marks)

ii. Control hazard. (3 Marks)

iii. Structural hazard. (3 Marks)

c. Briefly explain the techniques used to deal with Data and Control hazards. (5 Marks)

d. Mention and explain briefly four (4) techniques for dealing with pipeline stalls caused by branch delay in pipelined processor implementation. (4 Marks)


Question Eight

a. What are the main functions of the CPU? (4 Marks)

b. Explain what the CPU should do when an interrupt occurs. Include in your answer the method the CPU uses to detect an interrupt, how it is handled and what happens when the interrupt has been serviced. (4 Marks)

c. Assume a 2²⁰ byte memory: (4 Marks Each)

i. What are the lowest and highest addresses if memory is byte-addressable?

ii. What are the lowest and highest addresses if memory is word-addressable, assuming a 16-bit word?

iii. What are the lowest and highest addresses if memory is word-addressable, assuming a 32-bit word?


END OF EXAMINATION PAPER