Professional Documents
Culture Documents
KEY
Course Name & Code: Computer Architecture and Organization & CSE2001
1. Suppose a processor uses the big endian representation and x is a 32-bit integer stored in
memory starting at the memory address 100. The memory is byte-addressable, each
location holding a byte. Specify in binary what would be in memory location 100, 101, 102
and 103 if the program has the statement:
int x = 2047;
Solution:
Memory location 100 = 00000000
Memory location 101 = 00000000
Memory location 102 = 00000111
Memory location 103 = 11111111
b) With the help of a suitable diagram, explain the interaction steps between the processor
registers, control unit, and memory unit during the execution of an instruction
Steps: To read and execute an instruction from main memory to processor, following
steps are required:
2. A) List the steps needed to execute the machine instruction ADD (R1, R2), R3 in terms of transfers
between the functional components of computer system and some simple control commands.
Solution:
3.A) a) The following transfer statements specify a memory explain the memory operation in each
case. (i) R2 <- M [AR] (ii) M [AR] <- R3 (iii) R5 <- [R5]
3.B) Consider the byte registers R0 = 70H (H means Hexadecimal) and R1 = 46H. What will be the
contents of R0 and R1 after the following instructions are executed?
Consider the byte registers R0 = 70H (H means Hexadecimal) and R1 = 46H. What will be the contents
of R0 and R1 after the following instructions are executed?
4.A ) Registers R1 and R2 contain data values 600 and 840 respectively in decimal, and the word
length of the processor is 4 bytes. The effective address of the memory operand for the instruction
“LOAD R5,10(R1,R2)” will be _____
Solution:
1450 (600+840+10=1450)
4.B) b) Quantify the effect on performance that results from the use of a cache in the case of a
program that has a total of 500 instructions, including a 100-instruction loop that is executed 25
times. Determine the ratio of execution time without the cache to execution time with the cache.
Solution:
5. Perform multiplication using following methods:
(i) A = 25 and B = -35. Find A × B using bit-pair recoding multiplier method in Booth
Algorithm (Modified booth)
110111010
-1 -1
B= -1 * 43 + 2* 42 -1 * 41 + 1 * 40 = 35