Computer Architecture
Computer Architecture
(AnAutonomousInstitution)
SRMNagar, Kattankulathur–603203
QUESTION BANK
IV SEMESTER
Regulation–2019
Preparedby
Dr.Samydurai.A, Professor ,
Ms.Sangeetha.G, AssistantProfessor(Sel.G),
Ms.Suma.S, Assistant Professor (Sel.G),
SRM VALLIAMMAI ENGINEERING COLLEGE
(An Autonomous Institution)
SRM Nagar, Kattankulathur–603203.
QUESTION BANK
2 Identify general characteristics of Relative addressing mode with an example. BTL 4 Analyzing
Give the difference between auto increment and auto decrement addressing
8 BTL 2 Understanding
mode.
14 Articulate the need for indirect addressing mode. Give an example. BTL 3 Applying
PART–B
Evaluate the various techniques to represent instructions in a computer
1 BTL5 Evaluating
system.(13)
i) Express the various components of computer system and explain with
2 neat diagram(10) BTL3 Applying
ii) List the classes of applications of computers (3)
i). What is an addressing mode in a computer? (2)
3 ii). Describe the MIPS addressing modes with suitable examples to each BTL1 Remembering
category(11)
i). Identify the various operations in computer system. (7)
4 BTL1 Remembering
ii). Examine the operands of computer hardware. (6)
i). Discuss the logical operations and control operations of computer. (8)
5 BTL 2 Understanding
ii). Explain the concept of Arithmetic operation with examples (5)
Consider and explain the centralized and distributed bus system in computer
6 BTL2 Understanding
organization.
Consider three different processors P1, P2, and P3 executing the same
instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz
clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and has a CPI of 2.2.
i) Which processor has the highest performance expressed in instructions per
second? (5)
7 BTL 4 Analyzing
ii) If the processors each execute a program in 10 seconds, find the number of
cycles and the number of instructions? (4)
iii) We are trying to reduce the execution time by 30% but this leads to an
increase of 20% in the CPI. What clock rate should we have to get this time
reduction? (4)
8 Describe the branching operations in detail with suitable example.
(13) BTL1 Remembering
i) Formulate the performance of CPU. (7)
9 BTL6 Creating
ii) Compose the factors that affect performance. (6)
i).Illustratethedifferenttypesofinstructionsetarchitectureindetail (7)
10 BTL 3 Applying
ii).Examine the basic instruction types with examples (6)
i) Illustrate in detail about Technologies for Building Processors
11 and Memory(7) BTL3 Applying
ii) Show the bus structure in computer system and explain it(6)
i).Compare uniprocessors and multi-processors. (8)
12 BTL 4 Analyzing
ii).Draw the Simple Bus architecture and explain it. (5)
13 Assess the various instruction formats and illustrate with an example.(13) BTL5 Evaluating
What is Bus? Describe in detail the bus structure. (13)
14 BTL 2 Understanding
15 Discuss in detail about the performance of a computer?(13) BTL 2 Understanding
PART-C
Assume that the variables f and g are assigned to register $s0 and $s1
respectively. Assume that base address of the array A is in register $s2.
Assume f is zero initially.(15)
F = g – A[4]
3
A[5]=f+100
BTL6 Creating
Translate the above C statement into MIPS code. How many MIPS assembly
instructions are needed to perform the C statements and how many different
registers are needed to carry out the C statements?
Evaluate which code sequence will execute faster according to execution time
for the following conditions. (15)
The computer with three instruction classes and CPI measurements as given
below and instruction counts for each instruction class for the same program
from two different compilers are given. Assume that the computer’s clock
rate is 1GHZ.
Code from CPI for the instruction class
4 BTL5 Analyzing
A B C
CPI 1 2 3
4 x=00001011 1110 1111and y= 1111 0010 1001 1101. Examine x-y BTL 1 Remembering
9 Give the representation of double precision floating point number. BTL 2 Understanding
14 Assess the use of guard bit. What are the ways to truncate the guard bits? BTL5 Evaluating
Express the IEEE 754 floating point format.
15 BTL 2 Understanding
Represent (-0.75)10 in single precision
16 State sub-word parallelism. BTL 1 Remembering
17 Interpret single precision floating point number representation with example. BTL 2 Understanding
23 Interpret the representation of double precision floating point number. BTL2 Understanding
PART–B
1 i) Discuss the multiplication algorithm in detail with diagram. (7)
BTL 2 Understanding
ii) Express the steps to multiply 2*3. (6)
Illustrate the multiplication of signed 2’s complement numbers? Give
BTL 3 Applying
2 Algorithm and example.
3 Describe about basic concepts of ALU design. BTL 1 Remembering
Develop algorithm to implement A*B. Assume A and B for a pair of signed
4 BTL6 Creating
2’s complement numbers with values: A=010111, B=101100
i) State the integer division algorithm with diagram. (7)
5 BTL1 Remembering
ii) Divide 00000111 by 0010. (6)
6 i) Express in detail about Division algorithm. (7)
BTL 2 Understanding
ii) Divide (12)10 by (3)10 (6)
7 Point out the division of A and B
BTL4 Analyzing
A=1111 B=0011
(13)
i) Examine, how floating point addition is carried out in a computer system?(7)
8 BTL1 Remembering
ii) Give an example for a binary floating point addition. (6)
i) Explain how the floating point numbers are represented in IEEE 752? (7)
9 ii) Tabulate the IEEE 752 binary representation of the number -0.7510 to BTL2 Understanding
Single precision and Double precision. (6 )
i) Design an arithmetic element to perform the basic floating point
10 operations. (7) BTL 2 Understanding
ii) Discuss sub word parallelism. (6)
i) Explain floating point addition algorithm with diagram. (7)
BTL5
11 ii) Assess the result of the numbers (0.5) 10 and (0.4375)10 using binary Evaluating
Floating point Addition algorithm. (6)
Prioritize using single precision IEEE 754 representation. (7 + 6)
12 BTL5 Evaluating
i) 32.75 ii)18.125
Arrange the given number 0.0625 in
13 i) Single precision and (6) BTL4 Analyzing
ii) Double precision formats. (7)
Solve using Floating point multiplication algorithm
14 )A=1.10 10 X1010 B= 9.200X10-5 (7) BTL 3 Applying
ii) 0.510X0.437510 (6)
Multiply the following pair of signed Nos. using multiplication algorithm
15 BTL 3 Applying
Multiplier. A =+ 13 (Multiplicand) and B =-6 (Multiplier). (13)
Divide (12)10 by (3)10 using the division algorithm with step by step
16 BTL4 Analyzing
intermediate results and explain. (13)
Discuss in detail about division algorithm in detail with diagram and explain.
17 BTL1 Remembering
(13)
PART-C
Multiply the following signed numbers using multiplication algorithm
1 A=( -34)10 =(1011110)2 and B=(22)10= (0010110) 2where B is multiplicand BTL6 Creating
and A is multiplier
Evaluate the sum of 2.6125*101 and 4.150390625*101 by hand, assuming
2 A and B are stored in the 16-bit half precision. Assume 1 guard, 1 round bit BTL5 Evaluating
and 1 sticky bit and round to the nearest even. Show all the steps.
Summarize 4 bit numbers to save space, which implement the multiplication
3 BTL5 Evaluating
algorithm for 00102, 00112 with hardware design.
Design 4 bit version of the algorithm to save pages, for dividing 000001112 by
4 BTL6 Creating
00102 with hardware design.
Assess the floating point instructions in MIPS. BTL5
5 Evaluating
4 List the state elements needed to store and access an instruction. BTL1 Remembering
5 Draw the diagram of portion of data path used for fetching instruction. BTL 2 Understanding
8 Evaluate branch taken and branch not taken in instruction execution. BTL5 Evaluating
9 State the two steps that are common to implement any type of instruction. BTL 1 Remembering
10 Design the instruction format for the jump instruction. BTL 6 Creating
19 Classify the types of instruction classes and their instruction formats. BTL4 Analyzing
20 Generalize what is exception. Give one example for MIPS exception. BTL6 Creating
PART–B
16 Sketch the Implementing Jumps and Finalizing Control. (13) BTL 3 Applying
17 Evaluate the two stage instruction pipeline with neat diagram illustration. (13) BTL5 Evaluating
PART-C
Assume the following sequence of instructions are executed on a 5 stage
pipelined datapath:
add r5, r2,
r1lw r3,
4(r5)lw r2,
0(r2)or r3,
r5, r3swr3,
1 0(r5) BTL6 Creating
If there is no forwarding or hazard detection, insert NOPS to ensure
correctexecution.
i) If the processor has forwarding, but we forgot to implement the hazard
detection unit,what if happens when this code executes? (5)
ii) If there is forwarding, for the first five cycles, compose which signals are
asserted in each cycle. (5)
iii) If there is no forwarding,what if new inputs and output signals do we need
for the hazard detection unit. (5)
Explain in detail about the laundry process through which the pipelining
2 BTL5 Evaluating
techniques can be established. (15)
Consider the following loop:
Loop:lwr1,0(r1) and r1,r1,r2lw r1,0(r1)lw r1,0(r1) beqr1,r0,loop
Assume that perfect branch prediction is used (no stalls) that there are no
delay slots, and that the pipeline has full forwarding support. Also assume that
many iterations of this loop are executed before the loop exits.
3 i) Assess a pipeline execution diagram for the third iteration of this loop.(8) BTL5 Evaluating
ii) Show all instructions that are in the pipeline during these cycles (for all
iterations). (7)
Plan the pipelining in MIPS architecture and generate the exceptions handled
4 BTL6 Creating
in MIPS.(15)
5 Write in detail how exceptions are handled in MIPS architecture.(15) BTL6 Creating
11 Integrate the functional steps required in an instruction cache miss. BTL6 Creating
13 Summarize the various block placement schemes in cache memory. BTL 2 Understanding
15 Point out how DMA can improve I/O speed. BTL4 Analyzing
18 Assess the relationship between physical address and logical address. BTL5 Evaluating
PART-B
i) List the various memory technologies and examine its relevance in
1 architecture design. (7) BTL1 Remembering
ii) Identify the characteristics of memory system.(6)
2 Elaborate in detail the memory hierarchy with neat diagram. BTL1 Remembering
i) Give the advantages of cache.(7)
3 BTL 2 Understanding
ii) Identify the basic operations of cache in detail with diagram.(6)
Express the following various mapping schemes used in cache design.
i) Direct.(4)
4 BTL 2 Understanding
ii) Associative.(4)
iii) Set associative.(5)
i) Analyze the given problem:(7)
A byte addressable computer has a small data cache capable of holding eight
32-bit words.Each cache block contains 132-bit word. When a given
program is executed, the processor reads data from the following sequence of
hex addresses – 200, 204, 208, 20C, 2F4, 2F0, 200,204,218, 21C, 24C, 2F4.
5 BTL4 Analyzing
The pattern is repeated four times. Assuming that the cache is initially empty,
show the contents of the cache at the end of each pass, and compute the hit rate
for a direct mapped cache.
ii) What are the methods used to measure and improve the performance of the
cache.(6)
i) Define virtual memory and its importance. (7)
6 BTL1 Remembering
ii) Examine TLB with necessary diagram. (6)
7 i) Demonstrate the DMAcontroller.(7) BTL 3 Applying
ii) Illustrate how DMA controller isused for direct data transfer between
memory and peripherals ?(6)
i) Evaluate the advantages of interrupts.(7)
8 BTL5 Evaluating
ii) Summarize the concept of interrupts with neat diagrams.(6)
Design standard input and output interfaces required to connect the I/O device
9 BTL6 Creating
to the bus.(13)
10 Classify the bus arbitration techniques of DMA in detail.(13) BTL4 Analyzing
Point out the following in detail
11 i) Programmed I/O. (7) BTL4 Analyzing
ii) Instructions executed by IOP.(6)
12 Describe in detail about the methods used to reduce cache misses.(13) BTL1 Remembering
Discuss virtual memory address translation in detailwith necessary
13 BTL 2 Understanding
diagram.(13)
Calculate the performance the processor:
Assume the miss rate of an instruction cache is 2% and the miss rate of the
data cache is 4%. If a processor has a CPI of 2 without any memory stalls and
14 BTL 3 Applying
the miss penalty is 100 cycles for all misses, estimate how much faster a
processor would run with a perfect cache that never missed. Assume the
frequency of all loads and stores is 36%.(13)
15 Examine about Interrupts and its use.(13) BTL 3 Applying
UNIT V-PARALLELISM
Instruction-level-parallelism - Parallel processing challenges – Flynn‘s classification – SISD, MIMD, SIMD, SPMD, and
Vector Architectures – Multi-core processors and other Shared Memory Multiprocessors.
PART– A
BT
Q.No Questions Competence
Level
1 State the main idea of ILP. BTL 2 Understanding
Illustrate the overall speedup if a webserver is to be enhanced with a new CPU
2 which is10 times faster on computation than an old CPU.The original CPU BTL 3 Applying
spent 40% of its time processing and 60% of its time waiting for I/O.
3 Illustrate the three important properties of vector instructions. BTL4 Analyzing
13 Integrate the idea so fin-order execution and out-of-order execution. BTL6 Creating
20 Classify shared memory multiprocessor based on the memory access latency BTL 3 Applying
PART–B
i) Define parallelism and its types. (7)
1 ii) List the main characteristics of Instruction level parallelism.(6) BTL1 Remembering
i) Give the concept of parallel processing. (7)
2 ii) Summarize the challenges faced by parallel processing. (6) BTL 2 Understanding
PART-C
1 Explain how would this loop be scheduled on a static two issue pipeline for
MIPS?
Loop: lw $t0,0($s1) #$t0=array element
BTL6 Creating
Addu $t0,$t0,$s2 #add scalar in $s2
Sw $t0, 0($s1) #storeresult
Addi; %s1,$s1, -4 #decrementpointer
Bne $s1,$zero,loop # branch $s1!=0
Decide and reorder the instruction to avoid as many pipeline stalls as
possible. Assume branches are predicted, so that control hazards are
handled by the hardware. (15)
A pipelined processor uses delayed branch technique. Recommend any one
ofthe following possibility for the design of the processor. In the first
possibility,the processor has a 4-satge pipeline and one delay slot. In the second
possibility, it has a 6-stage pipeline and two delay slots. Compare the
2 performance of these two alternatives, taking only the branch penalty into BTL5 Evaluating
account. Assume that 20% of the instructions are branch instructions and thatan
optimizing compiler has an 80% success rate in filling in the single
delayslot.For these cond alternative,the compiler is able to fill the seconds lot
25% of the time. (15)
Consider the following portions of two different programs running at the same
time on four processors in a symmetric multicore processor (SMP). Assume
that before this code is run,both x and yare 0?
Core 1: x=2;
Core 2: y=2;
3 Core 3: w= x + y +1; BTL6 Creating
Core4: z= x+y;
i. What if all the possible resulting values of w, x, y, z ? For each possible
outcome,explain how we might arrive at those values. (8)
ii. Develop the execution more deterministic so that only one set of values
ispossible? (7)
Suppose we want to perform 2 sums: one is a sum of 10 scalar variables and one
is a matrix sum of a pair of two dimensional arrays, with dimensions 10 by
4 10. For now let’s assume only the matrix sum is parallelizable. What if the BTL5 Evaluating
speed up do you get with 10 versus 40 processors and next calculate the speed
up assuming the matrices grow to 20 by 20. (15)
5 Write about the Cluster Architecture and the types of clusters.(15) BTL6 Creating