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

CO-Assignment 1 (1)

The document outlines an assignment for ICS122 Computer Organization, detailing various computational problems related to computer architecture, including execution time calculations, two's complement representation, instruction execution analysis, and MIPS assembly coding. It covers topics such as CPI, clock rates, effective memory addresses, and comparisons between processors. The assignment is due on 06/03/2025 and is instructed by Dr. Goutam Mali.

Uploaded by

cactusvernal123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

CO-Assignment 1 (1)

The document outlines an assignment for ICS122 Computer Organization, detailing various computational problems related to computer architecture, including execution time calculations, two's complement representation, instruction execution analysis, and MIPS assembly coding. It covers topics such as CPI, clock rates, effective memory addresses, and comparisons between processors. The assignment is due on 06/03/2025 and is instructed by Dr. Goutam Mali.

Uploaded by

cactusvernal123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ICS122 Computer Organization

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

5) Multiply (-6) × (+3) using Multiplication Algorithm.

6) A program executes the instruction:


sw $t0, 36($s3) , If $s3 = 0x10010000,
a) Compute the effective memory address.
b) If the memory is byte-addressable, how many bytes are affected?

7) Given the following MIPS assembly instructions:


Loop: beq $t1, $t2, Exit
add $t1, $t1, $t3
j Loop
Exit: nop
Assume the base address of Loop is 0x00400000.
a) Calculate the address offset used in the beq instruction.
b) Determine the machine code for the beq instruction.
c) Calculate the address offset used in the j instruction.
d) Determine the machine code for the j instruction.
8) Consider two processors, P1 and P2, executing the same program with
the following characteristics:
• Processor P1:
▪ Clock cycle time: 1.5 ns
▪ Average CPI: 2.2
• Processor P2:
▪ Clock cycle time: 2.0 ns
▪ Average CPI: 1.8
The program consists of 10 million instructions.
a. Calculate the execution time for both processors.
b. Determine which processor is faster and by what factor.
c. If the number of instructions is increased to 20 million, how
does this affect the execution times?
d. Discuss how changes in CPI and clock cycle time impact the
overall performance of a processor.

You might also like