EXCEL ENGINEERING COLLEGE
(Autonomous)
ELECTRONICS AND COMMUNICATION AND ENGINEERING
IV Semester II Year
20CS408 – Computer Architecture and Organization
Regulations 2020
Question Bank With Answer Key
UNIT – I (BASIC STRUCTURE OF A COMPUTER SYSYTEM)
Q.No. Questions
1 Define Computer Architecture.
It is concerned with the structure and behavior of the computer.
It includes the information formats, the instruction set and techniques for addressing memory.
2 List the four functions of control unit.
It is also called as a brain of the processor.
It controls the flow of information through the processor and coordinates the activities of the other units within it.
It fetches and analyses the instructions one-by-one and issue control signals to all other units to perform various
operations.
For a given instruction, the exact set of operations required is indicated by the control signals. The results of
instructions are stored in memory.
3 Define Amdahl’s law.
the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of
time that the improved part is actually used
which gives the theoretical speedup in latency of the execution of a task at fixed workload that can be expected of
a system whose resources are improved
4
List the five Components of a Computer System.
Input unit
Memory unit
Arithmetic and Logic Unit
Output unit
Control unit
5 State Performance measure.
Computer performance is characterized by the amount of useful work accomplished by a computer system or
computer network compared to the time and resources.
6 Classify the four types of operations required for instructions.
Data transfers between the main memory and the CPU registers
Arithmetic and logic operation on data
Program sequencing and control
I/O transfers
7 Identify the Zero Address Instruction.
It is also possible to use instruction where the location s of all operand are defined implicitly.
This operand of the use of the method for storing the operand in which called push down stack.
Such instructions are sometimes referred to us zero address instruction.
8 Mention the MPIS Code for the statement f=(g+h)-(i+j).
add $t0, $s1, $s2
add $t1, $s3, $s4
sub $s0, $t0, $t1
9 Identify the Instruction Format.
Instructions are represented as numbers .Therefore, entire programs can be stored in memory to be read or
written just like numbers(data).
Thus simplifies software/Hardware of computer systems.
Each instruction is encoded in binary called machine code
10 List the three need for indirect addressing mode .
This is the mode of addressing where the instruction contains the address of the location where the target
address is stored.
Indirectly storing the address of the target location in another memory location.
LOAD R1, (1005)
11 Define Throughput and Throughput rate.
Throughput -The total amount of work done in a given time.
Throughput rate-The rate at which the total amount of work done at a given time.
12 Name the performance equation.
N denotes number of machine Instructions, Suppose that the average number of basic steps needed to execute
one machine instruction is S, where each basic step is completed in one clock cycle.
If the clock cycle rate is R cycles per second, the processor time is given by T = (N x S) / R. This is often referred
to as the basic performance equation.
13 State CPI.
The term Clock Cycles per Instruction which is the average number of clock cycles each instruction takes to
execute, is often abbreviated as CPI
𝐶𝑃𝐼 = CPU clock cycles/ Instruction count
14 Define MIPS.
MIPS: One alternative to time as the metric is MIPS(Million Instruction Per Second)
MIPS=Instruction count/ (Execution time x1000000).
This MIPS measurement is also called Native MIPS to distinguish it from some
Alternative definitions of MIPS
15 Classify the eight types of addressing modes.
1. Register addressing mode 2. Immediate addressing mode. 3. Base or displacement addressing mode 4. Pc-relative
addressing mode 5. Pseudo- direct addressing mode 6. In direct addressing mode 7. Auto increment addressing mode 8.
Auto decrement addressing mode
16 Compare If computer A runs a program in 10 seconds, and computer B runs the same program in 15 seconds,
Compare how much A is faster over B.
Performance A Execution time B
−−−−−−−−−− = −−−−−−−−−−−−−−− = n
Performance B Execution time A
Thus the performance ratio is 15/10 =1.5 and A is therefore 1.5 times as fast as B.
17 List three types of data transfer techniques.
Arithmetic data transfer
Logical data transfer
Programmed control data transfer
18 Define Instruction.
The words of a computer’s language are called instructions, and its vocabulary is called an instruction set.
Instruction performs Data transfer between register and memory, ALU operation, Program control and
sequencing, I/O transfer
19 Name the six methods used to improve system performance.
The methods used to improve system performance are
Processor clock
Basic Performance Equation
Pipelining
Clock rate
Instruction set
Compiler
20 What is Execution time/Response time?
Response time also called execution time.
The total time required for the computer to complete a task, including disk accesses, memory accesses, I/O
activities, operating system overhead, CPU execution time, and so on.
1. Explain the components of a computer with block diagram in detail.
Computer
Computer is an electronic device which can perform the operations based on the instruction
given by the user.
The list of instruction is called a computer program and the internal storage is called computer memory
Computer Architecture
Basic Components of a computer system
A computer consists of five functionally independent main parts
Input Unit
Arithmetic and Logic unit (ALU)
Control unit
Output Unit
Memory Unit
INPUT UNIT
Input devices read the data from the source, such as keyboard, and translate that data into electronic
signals and transfer it to the CPU/Memory.
Example: Joysticks, trackballs, mouse, key board, scanners etc are other input devices.
Central Processing Unit
The brain of the computer system is the CPU
The part of the computer which executes the program instructions is known as central processing unit.
CPU processes the data transferred into it from one or more input devices
It then transfers either an intermediate or final result of the output devices.
It consists of two parts
Arithmetic and Logic Unit (ALU)
Control Unit (CU)
ALU or DATAPATH UNIT
It performs the arithmetic and logical operations.
Arithmetic operations include addition, subtraction, multiplication and division.
Logical operations include comparisons such as equal to , less than, greater than
The entire operation can be done with the help of registers.
Registers are temporary data storage, which is faster than memory.
Registers can hold variables and intermediate results.
Memory traffic is reduced, so program runs faster.
CONTROL UNIT
Ex. Magnetic disk, Hard Disk, CD, DVD, Floppy Disk.
It is also called as a brain of the processor.
It controls the flow of information through the processor and coordinates the activities of the other units
within it.
It fetches and analyses the instructions one-by-one and issue control signals to all other units to perform
various operations.
For a given instruction, the exact set of operations required is indicated by the control signals. The results of
instructions are stored in memory.
OUTPUT UNIT
The function of output unit is to produce processed result to the outside world in human understandable
form.
Examples of output devices are Graphical display (Monitor), Speakers, Printers such as inkjet, laser, dot
matrix.
MEMORY UNIT
Memory is nothing but a storage device. It stores the program and data.
It is divided into ‘n’ number of cells. Each cell is capable of storing one bit information at a time.
There are 2 classes of memory.
1.Primary
2. Secondary
Primary Memory
Data storage capacity is less than secondary memory.
It is too expensive than secondary memory.
CPU can access data directly. Because it is an internal memory.
Data accessing speed is very fast than secondary memory.
Ex. RAM & ROM.
Secondary memory
Secondary memory (Nonvolatile storage) is a form of storage that retains data even in the absence of a
power source and that is used to store the programs between runs.
It is made up of magnetic material. So it is called magnetic memory.
Data accessing speed is very slow than primary memory.
2. Discuss the eight ideas of the Computer architecture which empowered the computer
design over the past decade.
Application of the following great ideas has accounted for much of the tremendous growth in computing capabilities
over the past 50 years.
Design for Moore's law
Use abstraction to simplify design
Make the common case fast
Performance via parallelism
Performance via pipelining
Performance via prediction
Hierarchy of memories
Dependability via redundancy
Design for Moore’s law :
It states that integrated circuit resources (transistors) double every 18–24 months.
The computer designer must predict the rapid change in IC capacity & design it accordingly. Moore’s Law
graph to represent designing for rapid change.
Use Abstraction to Simplify Design
Abstraction uses multiple levels with each level hiding the details of levels below it. For example:
The instruction set of a processor hides the details of the activities involved in executing an instruction.
High-level languages hide the details of the sequence of instructions need to accomplish a task.
Operating systems hide the details involved in handling input and output devices.
Make the Common Case Fast :
Make the common case fast to enhance performance better than optimizing the rare case.
For this idea the common case has to be carefully identified and experimented.
Example: increasing speed level for a sports car is very easier than to a minivan
Performance via parallelism:
Parallelism means simultaneous execution of source task on multiple processors in order to obtain the result
faster
Computer architects have offered designs that get more performance by performing operations in parallel.
Example: Dual- quad processor
Performance via pipelining
Pipelining- Pipelining is an implementation technique in which multiple instructions are overlapped in
execution.
A particular pattern of parallelism is called pipelining.
In pipelining more than one instruction are executed at the same time to increase the performance and
throughput
Pipelining improves performance by increasing instruction throughput.
For example, before fire engines, a human chain can carry a water source to fire much
More quickly than individuals with buckets running back and forth.
Icon Used: pipeline icon is used. It is a sequence of pipes, with each section representing
one stage of the pipeline.
Performance via Prediction
A statement about what will happen or might happen in the future.
In some cases, based on prediction.
It is better to start working based on prediction or average guess to make the performance faster rather than
working until you know for sure.
Hierarchy of Memories
Computers not only need to be fast, they need to be dependable by including redundant components.
Since any physical device can fail, the systems have to be made dependable while including redundant
components that can take over when a failure occurs and to help detect failures.
Dependability via Redundancy
Computers not only need to be fast; they need to be dependable.
Since any physical device can fail, we make systems dependable by including redundant components that
can take over when a failure occurs and to help detect failures.
Icon used: The tractor-trailer
Since the dual tires on each side of its rear axles allow the truck to continue driving even when one tire fails.
3. Interpret the performance of a computer and derive the basic
performance equation.
Pezfotman ce : -
inmportant
The pertorman e
for the sleetion Loupálar.
attibute
Dening ps oYmane:
’ Nhen We
computer in aster
than another speeds
we compaYe heircompiter
and observes ha thelessfaster
time than
Yuns progTam in
oher compu ters.
time (or) Exeuon time i
Responte. he toto tine yaquited
dfined do compate task.
emputer
the (or) Bandwidth the umber
wnit tine.
tasks complet
We naed to
ma ximize. per orman
mini mË Ze time toy executoin time.
Pero
mane ’X ’ time
1heMensuting
1ime
econds as qyeattehanr X his
exeuton
Proqram Then Can
and Permn
Pexforman
PerHomane y e Exeuhon1ime x
Jast
ime jn Execuony
Por y=
mputar Perkozwane, the Y,meansthat
per
otmaney 1 relate
he exeution n' i
a
thmeasure the the cowpute'xr:
ram. zasure nXimes
Paformaney > cahon
TimExe pes
is Exeution omputrstoqor
performan
perfoherms time pertormanu.
tasterExecutow"ime. y jormane
4. X.
1
fas computer om
than e and
Measured tert. sametask Y
n. Y 4
peryman, n'tmes ,then x
axe
in uten
Execuhontim|’ne.
CP
ne
’ CPW
CPutime
where averagthnumber
eby CPU cPu called Ahe waiting
compu°ttspund
asking or
systam exe
clok.PL
C Ahe
exe executhon CPutime and
cuton
time time
uhon
Tlo o
dlockdescy proqram.
peroiming .speunt doasnot time
Bnstruction
count strucione
time can tiCor) time
Clock me be the
Clock
Yate. be =
pent
= aske
= CP the Yumni
diiprgrg
othne?g in cPu
timthee CPLtime :
eyees stvuctouexecuteol
Jnstrachan in clock
CPLydes lock c
rate.
clock and ded chude
per clock on the
y
operatins ino pariular
theas de time
nstruie. CPT mu ame"
CPU
cy behal} frogram
count time too
tip s spend
led
4. Elaborate the different types of MIPS addressing modes in computer
architecture.
Asdzecaing and Addrescing, modes:
that potussog Can
-’ The difernt ways
acessdata refrred
"AJdzesstng sehames Addreesing modes
Tpes Addveseiny mads:
) Regiotr Addresiag, mode:
Hhe contets t proussox
’ he operand
Vegiote!
Jhe name
in dhe nstructon.
Sntruchan
Ragistexs'
Oçetond.|
E! Mov R,R1
don copies the
the contents
Thio instru
of reglst R2
Absdute oyDiract Addsesins, made:
2
address d dhe Jocation the
as a part
opsrand.
instuuctiö.
he ront
in# toused
jb
itly,
oxçh
given
explicitly
gven
yopzand
the
opies
intruchon
Thin opiek opevand.
Memoy moda: inThistruehon
sThe value.
Addesting A.
Jocatien doperand
The ondOpe Instnehon an
egister
Address
dnsdruetion addecs etion
instru
the A
a0, valuethat
A
R000, Îmmaetaid
3)
mstrutou opurand.
MoV in.th
MoV the
Eq:
Here E: 20 of
mai
the
given
whieh
opezand. Operand contts
ecopies
Mamoy
mode the contents
4memory addess
MemoryOpaxand regatr A.
de:mode, addvessing
addrus the-
xegintr
mo whose Registers
Addzessina,
singaddress a nrudiou
Tris by
addres rese
add 5)tteeivelocahän
indivect
Registr addressed
dnstueton R]
contets dnsttuehu Cnto
Address
this the the
Todizact The explcitl A
(Ro)
dn contains
velers he mmory MOv mamoy
4) Eg:
has
instruetim by
regioter
compted
modle jo
1eferenced Memory
Opaxand
(EA)
addrassine.
Dibplaument
6) made xegistex.
Referenud
2)
address
ields
addresing. Vale
contentsValve
EA=
value.
the
to
addrss
too effetie dntucton
Registes
value
1) R
tin adding
tn The
’ ’
5. Summarize the types of operations in the computer architecture.
Typas o Opetations,
) Dsta troner opura ions
2) Asuthnetie operaons.
3)
Logical oparation.
4) 2]0 operations
s) Contrl oprations,
DData transter opurations
Move. Transtess word ot block rom Soure
dto destinahin.
memoy to
- Traners word om memory
Load
ProessSoy.
souTL. and
Exchang - Swaps contents
destinatio n.
d Cs to oetinaton
Claat - Tranters werd destinaton
TransteYs word d Is do
Sat -
Push Transus word rom sourle to to
dt stack.
Transfrs word romm top d
Bop stack to destination.
) Asihmatic opexo ions:
oddihon a tao oprands.
Add .Pertoms oparands.
sublractien dq tioo
Sutract - Pesfosms operando
Perfore malhiplahon too
Multirly - division o too operands.
Divide Pertorms absolut
Absolut Raplaes opexand by its
value
Changs he sign of oparand.
Negate to oçarand.
Tneremnt - Aods I om operund.
Dacrement - Subtrats
Lagical oparalions
AN D
Prfoxvms Jogtcal AND
oR
Prjorms Jagical OR
Performs Lastcad NoT
NOT
oR
Ex- OR
Tast Tests Speciied tondition and
set las, accordingly
oY arithmeti'e
Compare Makes Aogical
compicon Opernde
Logical shift - There are hoo ypes
Laft
9Logread sift Lett
) Logcal vacant
ohit rigt
posions creato
Here
within the Tagioter ue to shift
operation uoith zeYoes.
Here the vacant posihons
Arithmctic shit -
Creatd whi le ehiing are
llad oith '.
Rotate Two types Rotate
9 Left
2) Rotate Right.
chitted
Here brte hat are
out one aho o the operond
ore movd backnto ethe
othes ond.
4) Tlo Oparatians :
Tnput (read) Transtr data rom paci fied sto port
to olestination.
Output (onite) - Transfu data trom speufe
do tlo port.
Start Tlo Trans<er instuctins to T|0lo
proessor to ini tiat Tlo oparation.
Transfer status Sntomatio n
Tast Tlo -
qrom zlo syctem do spedted
destination.:
5) Conts sperations:
Un condi tional Pe with
txanster, doads PC
Tump spated addrass
conditanal- Tests speuied condition Tf
Tump ton dition is tue. , Joad pa with
speifed address, oherwis e,
do nothing
Call to subotie Plaes urent progr
stack and
veturn addses
speified addvesr.
Retrn - Load yotwn add yess rom stack
isto Pc.
Exocuts an instrution
Tneremnts Pc do skip next itvudan.
Skip -
Tests speatied condi tisn. L4
Skip conditonal- condition Jo rua, skip the next
nstructin ,otherwise , do nothing.
Stops prgram exeutin.
Halt
stops peqram axeuuton , Lhecks
Nait (Hold) -
ly y.
Spei fed condition Yepan teolcondi
Tesume xeution when hion
|No operation - No operátion io
6. Describe the various elements of instruction and types of operands used in
computer architecture.
nstuctions :
Ihe operalion ahe CPu and the cemputr
system. is determined by the nstrutio ns
by the
aYe knon as
omputr instuhons.
Jnstuctiard in the om of binary cods.
A- partiudar sagune a sthese binary cooes
partiular task i known
program.
Operatien od perfomed.
do be
peifus he aperalan binary cad.,
The opeYatian *peä_ed bycode o% opode
hene the
the name operaton
aSowre | Dutination operand
dt peties he
4or the nstrucion.
opevand
*sourle opexand
opexand. addzess : nrtrucon
spe u ed by' the
The. opaxotion more. parande.
may require
*Dasination opeand addvess: by the
The operation exeeuted
CPU
is stored
xsult
may psoduee. operand
in the destination addegt:
Next instru tion
next mstru ction addiecs tll the
The the next
do feteh
rom where.
CPu qrom exection
mstruchon atr coupeton
t ument instuehon.
Locations tur Souze and Duination Oyeyonds.
1) ProussoY rgters
1) Main oy Vicd mamory
3) Tlo evice
4) Tmme diate value. TeL valve o the soure
instrnetion
Oparand may be in the.
itselg
Reprasentation ot snstacian:
Opode Operand Address perond Addrees z
6- bits
4-bits 6-bits
Tupes o operands :
£ach mstucion in pragvam spei tus
opration do be pumed ond data to be
proessed
An instruction is divided into too parts
’
12opcode
Operonds may agpear n diteront torims.
) Addzesres :
’ The addrescee in tat afom oq data.
a
Addresses Ca
be considered unsiyned
integer opexand
) Numbexs:
The common numerte data typs are
oT fixed point
Trtegr
* Floating point
* Dewmal
3) ChaTacters:
prm of
data
’ for documertaien comm0
text or charactr stings.
most the conmputrs
’ Today Standasd Code tor
Ascn ( American code for
dntomation dnterehange ) uniqne 7-bit
chazacter reprasantac by
pattern ond thus )23 Jag di}erent
chaxaetirs can be Yapresented.
Logtcad data :
4) soNs intespret data as
The io Les wod
bit, byt Aaa
have vales
’ Fach bit may
considered as
OY
it
as
logteal data.
Logical data store
Aatas.
array of Boean os binary.