CO-Assignment 1 (1)
CO-Assignment 1 (1)
Assignment – I
Due Date: 06/03/2025
Course Instructor: Dr. Goutam Mali
1) A computer system has a CPI of 1.5, a clock rate of 3 GHz, and
executes 10 billion instructions.
a. What is the total execution time?
b. If the CPI is reduced to 1.2 while keeping everything else the same,
what is the new execution time?
c. How much speedup is achieved by reducing CPI from 1.5 to 1.2?
d. If we increase the clock rate to 4 GHz and CPI remains 1.5, what is
the new execution time?
2) In Two’s Complement Representation,
a. Represent -39 in 8-bit two’s complement form.
b. Convert the two’s complement number 11110100 to decimal.
c. Find the two’s complement of 10110110 (8-bit system).
d. Explain the advantage of using two’s complement over sign-
magnitude representation.
3) A processor executes the following instruction mix:
• 50% ALU operations (CPI = 1.0)
• 30% Load/Store (CPI = 2.0)
• 20% Branches (CPI = 3.0)
a. What is the average CPI?
b. If the clock rate is 2.5 GHz and 1 billion instructions are
executed, what is the total execution time?
c. If the clock rate is increased to 3 GHz, what is the new
execution time?
d. If the percentage of Load/Store instructions is reduced to 20%,
what is the new CPI?
4)
i. Convert the following if-else condition into MIPS assembly: Assume
a, b, and c are stored in $s1, $s2, and $s3 respectively.
if (a == b)
c = c + 1;
else
c = c - 1;
ii. Given the instruction:
addi $t0, $t1, -50
a) Encode this instruction in binary (32-bit format).
b) Convert the binary encoding into hexadecimal.
c) Identify the opcode, source register, destination register, and
immediate value.
d) What will be the new machine code if the instruction changes to:
addi $t2, $t3, 100