Computer Organization
Computer Organization
INTRODUCTION
Chapter at a Glance
components one
Computer Organization concerned with the way the hardware
is
to a
the computer system. It refers the
and
Central Processing
Unit
Instructions
Program Control
Unit
Memory
Input
Output
Unit
Unit
Arithmetic Logic
Unit
Data
Block Diagram of a Digital computer
C0-2
COMPUTER ORGANISATION
Gi) Program Control Unit (PCU):
& sequences which instruction It
interprets&
in a program sequences instr
(ii) ister Sets: These
T are collections is to be executednstructions i.e., interprets
out (1/0) Unit: This of registers that first.
stem (computer) unit provides an efficient store data.
e centra & the outside mode
the must b entered into computer memory environment. Throughof communicatio tion between
data for processing& the I/O unit, programs &
utations must be recorded or displayed results obtained
from
to the user.
Operating Systems:
Operating Syste
stem is a program (or
system software)
An
user of a computer & the
t computer hardware. that acts as an intermediary
a Its purpose between
whic user can execute programs is to provide an enviroiment in
conveniently. So, an «
CO-3
POPULAR PUBLICATIONS
can detect
2.From a Source Code, a compiler b) Logical errors
NBUT
a) Run-time error d) None of these 2
c) Syntax error
Answer: (c)
3. How many minimum, NAND gates are required to make a flip-flon? WBUT
ha.
a) 4 b) 3 c) 2 d)5 20
Answer: ()
7. The circuit used to store one bit of data is known as WBUT 201
a) Register b) Encoder c) Decoder d) Flip-flop
Answer: (d)
c) Heap d) Stack
Answer: (a)
CO-4
COMPUTER ORGANISATION
Answer:(c)
Block
Diagram
Application Programs
Operating System
.
Computer Hardware
Operating System
Abstract view of the components of an
M Shared memory
Centralized system
In distributed system, a local memory is attached with each processor. All local memories
distributed throughout the system from a global shared memory accessible by all
processors. A memory word access time varies with the location of the memory word in
the shared memory. The degree of interactions among tasks is less. Thus probability of
bus conflicts is also less. The distributed system is depicted in figure.
Captions:
Inter P=CPU
connection LM Local
Network memory to a
CPU
It is faster to access a local memory with a local processor. The access of remote mei
attached to other processor takes longer due to the added delay through the is
connection network. Therefore, the distributed system is faster and in this regard,
it t
better.
CO-6
COMPUTER ORGANISATION
Von Neumann
Von architecture?
hat iiss
.What WBUT 2002, 2003, 2004,
2007, 2008, 2009, 2011, 2012]
Neumann bottleneck?
is Von
Whatis [WBUT 2002, 2003, 2004, 2006,
2007, 2008, 2009, 2011, 2012]
OR,
Neumann
Neumann bottleneck? How can this be reduced? WBUT 2015, 2016]
Whatis von
AnSwer:
Part:
Von Neumann was a mathematician who was a consultant on the ENIAC project
onic Numerical Integrator and Computer), the world's first general-purpose
edecronic digital computer
Naumann proposed the idea, known as the stored- program concept, which deals with
naking the programming process easier by representing programs in a form such that
hey can be suitably stored in memory alongside the data. So, a computer could get its
nstructions by reading them from memory & also a program could be set or altered
depending on the memory values.
The computer designed based on the idea of stored-program concept proposed by Von
Neumann is known as the LAS computer. It was designed at the Princeton Institute for
Advanced studies in 1952
ALU
Main
Input-Output
Equipment
Memory
PCU
CO-1
POPULAR PUBLICATIONS
in nature.
(e) The memory is read-write
are addressable by location.
() The contents of this memory
a sequential fashion from one instruction
(g) Execution generally occurs in
s
CO-8
COMPUTER ORGANISATION
Input
Devices
Memory
Control
Arithmetic Unit
Unit
Unit
Output
Devices
Output
CO-9
POPULAR PUBLICATIONS
CO-10
COMPUTER ORGANISATION
COMPUTER ARITHMETIC
Chapter at a Glance
rithmetic Logic Unit: The Arithmetic Logic Unit or ALU performs arithmetic and logical
operation s on data in a digtal computer. The various other units and devices of the computer
actually bring data into the ALU for its processing and then takes the results out from
stem
SALU. The ALU operation is mainly based on the use of simple digital logic devices that
binary digitsto perform various simple Boolean logic operations.
ell in brief, ALU is an important component in the CPU of the digital co computer that
erfoms various arithmetic and logical operations. ALU actually gets data and supplies the
perform
rocessed data from and to the various other units.
The various registers (temporary storage locations within the CPU) connected by signal paths
to
the ALU, actually hold the data sent to the ALU for computations and also the results of the
computations. The various flags (whose values are stored in CPU registers) are set by the
ALU as the result of an operation. The operation of the ALU as well as the data movement
into and out of the ALU is controlled by the signals provided by the control unit.
Diagrams:
Figure 1, shows the ALU inputs and outputs, whereas figure 2, shows the CPU and its various
components (control unit is not shown here).
ALU.
Registers
Registers
Fig. I: ALU inputs and outputs
Internal Bus
AC TEMP Flag
register
CO-11
POPULARPBLICATIONS
Exponent Fraction
Sign-bit
I52
Double-precision (64 bits)
division, it may give rise to an overflow result i.e. if the expected quotient of
is n-bits but the
actual quotient comes as nt] bits then that condition is an overtlow condition,
which must be
bit
Maximur 2's complement number is [WBUT 2007, 2009, 2015, 2018, 2019]
b) 2"-1 c) 2-1 d) Cannot be said
a) 2
Answer:(c)
01101107
o11011012 to 10100010, in 8-bit 2's complement binary will cause an
Adding
6
overtlow:
WBUT 2007, 2009]
True
b) False
a)
Answer: (6)
a) multiplication of numbers
b) multiplication of
numbers in 2's complement form
magnitude form
c)division of numbers in signcomplement form
d) division of numbers
in 2's
Answer: (b)
WBUT 2009]
8. The conversion (FAFAFB)16 into
octal form is d) None of these
c) 76737672
a) 76767676 b) 76575372
Answer: (d)
the binary
Approximately, how many wouldWBUT 2009]
A decimal no. has 30 digits.
0representation have? d) 90
c) 60
a) 30 b) 32
Answer: (d)
WBUT 2009]
1. The logic circuit in ALU is sequential
b) Entirely
a) Entirely combinational d) None of these
Combinational cum sequentia
Answer:
(c) WBUT 2011]
will be d) FAAFAF
12.
Equivalent hexadecimal of (76575372), FFFAAA
c)
a) FAFAFF b) FAFAFA
Answer:
(b)
CO-13
POPULAR PUBLICATIONS
fol
13. If you convert (+46.5) into a 24 bit floating point binary number following
convention, what would be the exponent? NBUT ER
c) 1100010
a) 00011100 b) 0000011 d) none 21
Answer: (d) ofhe
14. The maximum number of additions and subtractions are required for.
Booth's algorithm WBUT which
the following multiplier numbers 2014,20 g
in
a) 01000 1111 b) 0111 1000 c) 0000 1111
d) 0101010
Answer: (d)
15. By logical left-shifting the content of a register once, its content is WR
BUT
a) doubled b) halved 2019
c) both (a) and (b) d) no such decision can be
made
Answer: (d)
16. Floating point representation is used to store WBUT
201
a) Boolean values b) Whole numbers
c) Real numbers d) Integers
Answer: (c)
17. A given memory chip has 12 address pins and 4 data pins. It hasshe
number of locations. [WBUT2016
a) 2 b) 212 c) 245
d) 2
Answer: (b)
18. (2FAOc)16 WBUT 2016|
a) (195084)10 b) (00101111101000001100)2
c) Both (a) and (b) d) None of these
Answer: (6)
19.In a normal n-bit adder, to find out if an overflow has occurred, we make use of
[WBUT2017
a) AND gate b) NAND gate c) NOR gate d) XOR gate
Answer: (d)
20. For which of the following multiplier numbers in Booth's algorithm maximu
no. of additions and subtractions are required? WBUT 2018
a) 01001111 b) 01111000 c) 00001111 d) 01010101
Answer: (c)
CO-14
COMPUTER ORGANISATION
Signbit |
Exponent Mantissa
Bit 31 sign bit
Bit 30 to 23 exponent
22 to 0 mantissa
S is used to represent sign of a number.
S=0 for positive number
S=1 for negative number
M is the Mantissa which is a fraction and 23 bit long. The Mantissa is normalized tha
means it does not contain zero in its leading bits. a
b) How NaN (Not a Number) and Infinity are represented in this standard.
WBUT 2007
Answer:
NaN: NaN or Not a Number is the symbol for any invalid operation result. For example
dividing 0 by 0 or subtracting an infinite value from another would produce invalid
results, which would be represented by NaN. A NaN result would allow an user to
re
check a decision and figure out the problem.
Tnfinity: An exponent of all 1s and a fraction of all Os are used to denote the values of
+infinity and -infinity. The sign bit is used to distinguish between negative and positive
infinity.
6/What are the advantages of CLA over ripple carry adder? WBUT 2011
Answer:
A cascaded connection of n full adder blocks, can be used
to add two n-bit nuli
Since, the carries must propagate or ripple through this n is
cascade, this configura
called an Ripple Carry Adder.
CO-16
COMPUTER ORGANISATION
&Apply Booth's algorithm to multiply the two numbers (6)10 and (-9)10. Assume
the multiplicand and multiplier to be
5 bits each. [WBUT 2012]
Answer:
0 0110
X
Y
x 1 01 11
-I 10 0 -1
9
recoded multiplier
Add-A +1 1 0
10
Shift 11101 010
Shift Only
1
1110
Shift Only 1
1111 010
Add A 0
0
1
10
0 0 1
0 1
01 0
1 0
Shift 0 0 01 00 T0
1
1
0
Add-A +I
11i00 01010
1111 0 0 0-54
1 1
Shift
CO-17
POPULAR PUBLICATIONS
10. Explain IEEE single precision formats for representing 10.5. WBUT2014
Answer:
10.5 1010.102 1.01010x 2
=
=
127 130 10000010 f=01010
=le=3+
The single-precision representation is:
I
10000010 01010000000000000000000
The leading bit in mantissa (after binary point) is1, so the actual mantissa is (1.1)
Thus, the decimal number is= +(1.1> x 2 =+(11)>= +310
12. For Booth's algorithm, when do worst case and best case occur? Explain wih
2016
2015,
example. WBUT
Answer:
Worst case is one when there are maximum number of pairs of (01)s or (10)5 n
multipliers. Thus, maximum number of additions and subtractions are encountered nu
worst case.
equinng
Best case is one when there is a large block of consecutive is in the multipliers, requ
minimum number of additions and subtractions.
WBUT 201
13. Use restoring method to divide10100011 by 1011.
Answer:
(Unsigned numbers division)
Divide 163 by 11 using restoring division method.
Dividend, Q=163 = 10100011
CO-18
COMPUTERORGANISATION
=
M=11
M= 00001011, M2c = 11110101
Divisor,
Iteration Step/Action Accumulator (A) Dividend/Quotient Divisor/Remark
(Q) (M)
Initial values 00000000
10100011 00001011
Shift left A, Q 00000001
0100011
Subtract A-M 11110101
11110110
01000110 SA=1:Q=0
Restore A+M 00001011
00000001
01000110
Shift left A,Q 00000010 1000110
Subtract, M 11110101
11110111 10001100 SA=1:Q1=0
Restore A+M 00001011
000000010 100011 00
Shift left A, Q 00000101 000110 0
Subtract, M 11110101
11111010 000110 0 0 SA=1;Q20
Restore A+M 00001011
00000101 0011000.
Shift left 00001010 0011000
Sub: A-M 11110101
1111 00110000 SA1:Q=0
Restore A+M 00001011
00001010 00110000
Shift left 00010100 0110000
Sub: A-M 11110101
00001001 01100001 Sa=.Qu=0
Shift left 00010010 1100001
11110101
Sub: A-M
000000111 1000011 SaF1;Qs=0
Shift left
0000111 1000011
11110101
Sub: A-M
00000100 1000011 SA1,Q,=0
00001001 000011
Shift left
Sub:A-M 110101 SA=1;Q%=0
11111110 90001119
11111110 00001110
00001011
Restore A-M
00001001 Q00011I0
Quotient=14
Remainder = 9
CO-19
POPULAR PUBLICATIONS
14. Show how to implement a full adder, by using half adders. WBUT
20M8
OR,
How can a full adder be implemented using half adders?
alain wit
Explain with
WBUTproper
circuit diagram. 2019
Answer:
C
HA
HA
S
A full-adder can be constructed from two half-adders and an OR gate, as shown own in
Figure below. The explanation of why this works.is as follows. (In this paragran
raph, +
denotes addition, not the OR operation.) Consider the addition of x+ y+z. This can be
grouped as (*+ y) + z where (x+ y) represents the output of the half-adder that receiv es
x and y. This partial sum is added to z by the other half-adder, yielding the comple
sum bit S. As for C, consider that there are two possible ways to make C =1: fist, i
x+y=2, then adding z can only make the total sum 2 or 3, and either way C=1. In this
case, the first half-adder's carry-out is a 1. Second, if x+y =1, then C will be I onlyi
1 to make the total sum 2. In this case, the second half-adder's carry output will be 1.
Thus we see that C = if and only if at least one of the half-adders produces a carry-out
1
15. What is the difference between carry look ahead adder and ripple carry adder?
WBUT 2017
Answer:
A system of ripple-carry adders is a sequence of stândard full adders that makes i
possible to add numbers that contain more bits than that of a single full adder. Each full
adder has a carrying (Cin) and a carryout (Co) bit, and the adders are connected by
connecting Cout on step k to Cin On step k+1.
Carry lookahead adder is faster than ripple carry adler (also known as carry propagaio
adder) since it consists of carry lookahead circuit and all its inputs
given by G(x) and k
generator functions are calculated simultaneously.
But cost of Carry Lookahead Adder should be more since cost in digital logic means
many gates we are using, what is the FAN-IN of those gates. So in carry lookahead ac
we have carry lookahead circuit that contains many gates compared to carry propaga
To be precise, no. of gates used in carry lookahead circuit = O(n) which is much lag
CO-20
COMPUTER ORGANISATION
An 1
Bn- B A
Ao Bo
Fig: 1Block diagram of an n-bit
ripple-carry adder
Cs
C2
Co
C-1
Fig: 2 Logic diagram of a 4-bit carry look ahead circuit
CO-21
POPULAR PUBLICATIONS
16. Represent the decimal value (-7.5) in IEEE single precision format.
WBUT
OR,
2
Represent the decimal value - 7.5 in 1EEE-754 single precision floating
fina.
format. WBUT2
Answer:
Thedecimal number-7.5 =- 111.1 in binary=- 1.11 x 2
The 23-bit mantissa M =0.111000 000000 000000 0000
The biased exponent E' = E+ 127 = 129 = 1000 0001
Since the number is negative, the sign bit S = 1. Therefore, the IEEE single-nres
-precision
bit) representation
is
1 10000001 111000 000000 000000 00000"
A7. Multiply decimal number (-17) and (-9) using Booth's multiplication
with step by step explanation. metho
WBUT 2018
Answer:
Multiplication between -17 and-9 using booth's Algorithm:
1I10,1111 -17
1111 0111 -9
000-1 100-1 Recorded
multiplier
Add-A 0001 0001
shift 0000 0001
1
1
111000 1001
Shift I111 10001001
Add-A 0001 0001
0000 1001 1001
Shift 00000100 11001
Shift only 0000-0010 011 001
Shift only 0000 0001 001 1001
Shift only 0000 0000 10011 0011
en used to describe data fields. Both type of files have advantages and
often
I is
disadvantages
access is bett than sequential access.
Randon
oresent the decimal value-12.5 in IEEE single precision format. WBUT 2019
Represent
19
Answer:
1100.10% = 1.1001x 23
12.5
le=3+ 127= 130= 10000010f=01010
single-precision representation is:
The
10000010 01010000000000000000000
Complementer and
parallel adder
QR register
AC register
CO-23
POPULAR PUBLICATIONS
its sign-bit.
Kegister BR: It holds the multiplicand along with
each stage of multiplication.
Register AC: It holds the partial product after
sign-bit.
Register QR: It holds the multiplier along with its
multiplier.
n I designates the least significant bit of the
en+ This is a flip-flop with the purpose of double-bit inspection
of the multiplie
1in the multiplie
Sequence Counter (SC): Keeps track of the number of bits and
multiplicand.
decrements by after each multiplier bit is multiplied to the
I
Booth algorithm gives a procedure for multiplying binary Integers in signed ed -Ts
complement representation.
Multiplicand in BR
Multiply Multiplier in QR
AC-0
Qn1-0
SCn
10 = 01
QQn+
AC-AC+BR+1 AC- AC + BR
= 00
11
#0
SC
END
D
Example
The binary representation of 9 = 01001
ne binary representation of-9 2's complement of 01001= 10111 (multiplicand
The binary representation of 13 = 01101
CO-24
COMPUTER ORGANISATION
io101 | 000
0001110101
The answer is:
CO-25
POPULARPUBLICATIONS
(integer
fraction).
Now, -7.5= -111.1 =-1.111 * 2 to the power +2
So, bit 31 = 1
1. Serial Adder adds one bit at a time. 1. Parallel Adder adds the whole thingat sance
2. Serial adder is comparatively slower than
parallel adder.
2.adder.
Parallel adder is much faster than serial
3. Hardware needed for serial adder is less. 3. Hardware needed for parallel adder is more
4. Circuit in serial adder is less complex. 4. Circuit needed for parallel adder is morn
complex.
b) Explain and draw the 4-bit binary decrementer circuit. WBUT 2003
OR,
Explain and draw binary decrement unit.
a WBUT 2011
OR,
Design a 4-bit combinational circuit decrementer using four full adders.
WBUT 2016, 2018
Answer:
GRD
2 Y
L Output
Output
c Output
Output S1
Output
CO-26
COMPUTER ORGANISATION
floating-point binary
32-bit number has a
umbers in the mantissa bit plus a sig
sign for the exponent.
tive
Negativ
epresenta What are and exponent
the longest and smallest are in signed-magnitua
cluding zero? Explain with es that can be
positive qualities
ented exclu example.
rnlain with diagrams, Serial & Parallel dders.
ADD
A+B, 1 63.11236589 x 10 &B 0.002365991 x 1029. WBUT 2009
Answer:
the. 32-bit
floating-point number system, negative numbers
ln are represented in
)
complement orm, where the leading bit is the sign bit. If, 24
npand 8 bits are reserved for bits are reserved for
mantis signed exponent, then the maximum
mber is + (longest)
positive
number +[2-1]* (2) and the minimum (smallest) positive
number is (0)
228
Serial Adder:
b)
adder is a binary adder that adds the two numbers
serial adde
A bit-pair wise. Each bit-pairs
added in a single clock
ock pulse. The carry of each pair is propagated to the next pair.
are
Circuit diagram:
DFF
CARRY
ADDER CLK
CO
SUM
LI
cO-27
POPULAR PUBLICATIONS
Parallel Adder:
A parallel adder is a binary adder that
generates the arithmetic sum of of two
cascaded full-adder circuits. Here the Dinary
numbers of any lengths using multiple output
from one full-adder is connected to the input fullat Her
carry of the next high order full-adder. a
pulse.
the entire addition is done in a single
X
XY
Carry
Cout
C2 in in -input
Co)
8
3
(a)
41-bit
adder
out CIn
(b)
binary
Parallel adder is the digital circuit that generates the arithmetic sum of two
constitute a paralle! adet.
numbers of any lengths. Multiple cascaded full-adder circuits
next high orde
The output carry from one full-adder is connected to the input carry of thefull-adders. 1
full-adder and so on. So an n-bit parallel (binary) adder requires n
R1) whie n
augend bits of X (say, n data bits) come from one register (say, Register
addend bits of B (n data bits) come from another register (say, register SubsCr
addend bits.
R2). u
numbers from right to left designates the augend bits and the
higher-order bit. Inemultiple
denotes the lower-order bit while the subscript n denotes the
input carry to the n
are connected in a chain through the full-adders. Co is the eneralted
cascaded binary adders and Cout is the output carry. The required
sum bits are
t(Sy
regicontent)
full-adders. The sum can be stored either to a third
by the outputs of the
S
its previous
Register R3) or may be in any one of the source registers (replacing
CO-28
COMPUTER ORGANISATION
operation
Cample ofce that
'10 1.e.
1010 is to be added to
5' i.e. 0101. So the augen bits of
Ao
SUpill be
re 0, 1,
0 and (1.e. Ag will input
I
0, A will input 1, A2 will input 0 and
hroug
t
1). Similarly, for B also (the addend
1111 (1.e. 15).
bits). Adding the two numbers will
1
addition: 12622473
4731780000000
Result of
2 [(R- M)+M]-M= 2 Ri -M
CO-29
POPULAR PUBLICATIONS
1 000
Initially A O 0000
M 0 0011 1
00O First cycle
Shift O 000
Substra 111011 0000
01 1 10
Set LSB
100
0 o0
Shift
1 1
Second cycle
Add 00011
Set LSB 1 111
1 1 1
10
o0O Third cycle
Shift
Add 00011 oolo1
Set LSB Go001
0001 O olo Fourth cycle
Shift
Subtract 11101
111
olo1 10
Set LSB 1
Quotient
1 1 1 11
Add Restore
00011 remainder
Remainder 0 0010
ADD/SUB
SignL Control
Divisor
Shift left
2nd
Part:
An
dn-l
Dividend E
Control
Sequencer
dn- do
Divisor D
CO-30
COMPUTER ORGANISATION
initial
nitial values in 1001, in M 01000 (5-bit register) and that
Therefore,
register). 2's complement of M is = 11000 i
00000 (5-bhit considered while subtracting
A; qocleared if a is -ve and set
as explained below:
division steps are
The
Cycle:
Q Explanation
A
ao 94 93. 92 qi qo
2. aa 0 0 11 Initial Values
0 0
00 0 0 0
1
1 0 Shifted Left as a Pair (A and Q)
00 01 1
0 0 10 1
M is subtracted from A
110 00 0 0 10 1
n 0 00 0 10
Since result is -ve, A is restored (Add M to A)
qo is cleared
00
2 Cycle:
0 0 01 0 01
0 100
0 0
I/!! 1 1
Shifted Left as a Pair (A and Q)
M
0 is subtracted from A
II01
0 10 0 11 0 0 Since result is-ve, A is restored (Add M to A)
0
0 010 0 00
1
go IS cleared
00
00
Cycle:
1
0 0
/I
11
0 0 0
0
00
Shift Left as a Pair (A and Q)
M is subtracted from A
I 1100 11 0 00 Since result is -ve, A is restored (Add M to A)
0 0 00 00
1
1
1 1
0 0 0 go is cleared
00
Cycle:
0 00 Shift Left as a Pair (A and Q)
01 0 0 110
10 0 00 Mis subtracted fromA
00 0 0
1
restóred (Add M to A)
Since result is -ve, A is
00 0 1 1
00 0010 Go is cleared
0 0 1
100 10
remainder (the extra sign-bit is not
00011 is the =
A
Answer:
B cell
Ji
Bit-stage cell
B3 A B2 B Bo
B cell B cell
B cell B cell
C C
S3
S2
P 2
Carry-lookahead logic
G2 G Go
CO-32
COMPUTER ORGANISATION
Answer
ally, the operation
Finctuonall of typical ALU is represented
nown in diagram beloW,
as shov
$3 $2 S1
A0
FO
Al-
A2-
F2
A3-
F3
ALU
BU
BI
Cn+4
B2-
B3 P
-G
between devices using the Cnt4 output, or for carry look-ahead between packages
uSing the carry propagation (P) and carry generate (G) signals. P and G are not
affected by carry in.
For high-speed operation the device is used in conjunction with the ALU carry look-
ahead circuit. One
carry look-ahead package is required for each group of four ALU
devices. Carry
look-ahead can be provided at various levels and offers high-speed
capability over extremely long word lengths. The comparator output (A=B) of the
CvIce goes HIGH when all four function outputs (FO to F3) are HIGH and can be
logic equivalence over 4 bits when the unit is in the subtract mode.
do toIS Indicate
an open collector output and can be wired-AND with other A=B outputs to
The open drain output A=B should be used
d Comparison for more than in4 bits. order to establish a logic HIGH level. The A=B
t external pull-up resistor
can
Ihe
also be used with the Cn+4 signal to indicate A> B and A < B.
enerates
A minus when
a arry is applied.
CO-33
POPULAR PUBLICATIONS
y add:
actually performed by complementary addilion
Because subtraction is carry IS generated when there (ls
carry out means borrow; thus, a isno
complement), a
when there is underfloW.
generated
under-tlow and no carry is active LOw inputs producin.
indicated, the ALU can be used with either outputs
Cing active
As active HIGH
HIGH inputs producing
LOW outputs or with active Active high inputs and
outputs
Mode select inputs Arithmetic
S0
Logic (M=H)
Ss S (M=L:C=H)
A
A
A+B
A+B +B
AB minus
logical0
A plus AB
AB A minus B minus
AOB
AB minus 1
AB A plus AB
A+B A plus B
H L AOB
|
H H B (A+B) plus AB
AB AB minus
logical 1 A plus A
(A+B) plus A
A+B
A +B A
H H L (A + B).plus
A minuS
H | H H
A
Notes to the function tables
1.Each bit is shifted to the next more significant position.
2. Arithmetic operations expressed in 2s
complement notation.
H=HIGH voltage level
L = LOW voltage level
sequence o
holds
A the 8-bit number 11011101. Determine the
9. Suppose register
by a circular shift-1g
binary values in A after an arithmetic shift-right, followed
and followed by a logical shift-left.
b) Describe Booth's multiplication method and use this
to multiply decln
WBUT 2015
numbers -23 and 9.
Answer:
a)
CO-34
COMPUTER ORGANISATION
Right
CircularShit
Rer
Left
ogicalShift
keare no simple algorithms for directly performing division on signed operands that.
Comparable to the algorithms for signed multiplication. In division the operands can
Preprocessed to transform them into positive values. After using restoring or non-
g division method the results are transformed to the correct signed values as
ary Here if we divide (-15) with (-3) are will get "0' as remainder and 5 quotient.
0 00000
S 00101
Q-15
M=3
A 00000
Q-01111
M= 00011
M =11100
M+1=1110
CO-35
POPULAR PUBLICATIONS
Restoring method:
M A Q
00000 01111
00011
1111 Shift AQ
00000
11101 A A-M
1101 11110 Qp-0
00011
11110 Restore
00000 A
00001 1110 Shift AQ
11101 A A-M
110 11100 Q0=0
00011
00001 11100 Restore A
00011 1100 Shift AQ
I1 101 A A-M
11 101
A =A-M
A= Remainder
000 00101 Qo-
Q-Quotient
M+1=11101
CO-36
COMPUTER ORGANISATION
pf-restoring method
M A
00000
00011
01111
00000
1111
11101 Shift AQ
A=A-M
11110 Ql0-0
T1011
1110 Shift AQ
00011
A= A+M
11100 Qfo]=0
11101
1100
Shift AQ
00011
jo000 A A+M
11001
00001 1001
Shift AQ
11101
A=A-M
11110 10010 Qf0-0
11101
0010 Shift AQ
00011
A=A+M
0 0000 00101 ofo]=
ARemainder
0-Quotient
CO-37
POPULAR PUBLICATIONS
Answer: below:
Algorithm for Non-restoring division is given in
a)
Start
A 0
M Divisor
Q-Dividend
Count N
yes
Shift Left A. Q
Shift Left A, Q
A=A+M A A-M
yes no
A<0
Count-Count-1
no
Count-0
yes
yes
A=A+M ASO
no
End
Initialization:
Set Register A = 000000
Set register Q= 101011
Set M Divisor 001011
M' 2's complement of M=110101
Set count= 6, since 6 digits operation is being done here.
CO-38
COMPUTER ORGANISATION
Action
Initial 000000 Q Count
101011
SHL (AQ) 000001 6
A2.0 01011
A A-M 101010
01011
A000
A <0 SiiL (AQ)
101010
010100
010110
10110
A A+M 101011
10110
A<0-Qo=0 101011
101100
<0SHL (AQ) 010111
A=A +MM 101110
01100
A 01100
A<0Qo=0(AQ)
101110 011000
011101 3
A0SHL
=A +M1 110100
T1000
A 11000
A0Q=0(AQ) 110100
101001
110000 2
A<0SHL 10000
A=A+M 000000 10000
000000
A<0Q=0 100001
by
Overflow:
Overflow occurs when there are insufficient bits in a binary number representation to
portray the result of an arithmetic operation. Overflow occurs because computer
Co-39
POPULAR PUBLICATIONS
d2
Co
C Ca
S So
S
A 4-bit adder-subtractor circuit is shown in the above figure.
The mode input sub controls
the circuit becomes an
the operation. When sub=0 the circuit is an adder and when sub=I
inputs of b. When
subtractor. Each exclusive-OR gate receives input sub and one of the
input carry is 0, and
sub-0,we have b 9 0=b. The full adder receives the value of b, the inputs
a
the circuit performs plus b. When sub =1, we have b 1=b' and Co =1. The b
the
1 is added through the input carry. The circuit performs
are all complemented and a
gives (a-b) if a
operation a plus the 2's complement of B. For unsigned numbers, this
is (a-5) providco
or the 2's complement of (b-a) if a<b. For signed numbers, the result
that there is no overflow.
b) Non-restoring division:
Refer to Question No. 6 of Long Answer 1ype Questions.
c) Booth's algorithm:
Refer to Question No.
Il
of Long Answer Type Questions.
CO-40
COMPUTER ORGANISATION
aok-ahead Adder:
Look-
CaryDuestion o. 7 ofLong Answer Type
Questions.
o
Rr
Designof
4-bit ALU:
No. 8 of Long Answer Type Questions.
Fixed-
Fixed-point Representation:
nOverllowin
in
Is an iimportant consideration when
handling is
Oerlow digital implementing signal
w
ypical digital signal processing CPUs processin
include hardware
fgorithms. support forharidiing
RISC process may
Some include in these modes.
wr
oWh
Overilow
2s complement integers occurs when the Tesult of an additionor
WIin 2's
tion is
larger the largest integer that can be represented, or smaller integer. In
fixea
represe he largest or smallest value depends
resentation, the on the format of the number.
int ASSume, 32 bit register, a CPU with saturation arithmetic
me. a 32
Suppose, would set the result
overtlo
on an overflow; corresponding to the integer values 0 x 800000000.
or +I
Resorting Division
Algorithm:
gRestoring division operates on IIXed-point fractional numbers and depends on the
divisi
following
assumptions:
D<N
ND < 1.
0< med from the digit set {0,1}.
The
q are
quotient digits
is the dware method of performing division operations.
Restoring division technique
Here
after each division step, the partial
remainder obtained, restored by adding the
FHOoating
point is used to represent firactional
values, or when a wider range is needed than
Bprovided by fixed point (of the same bit width),
even if at the cost of precision. Double
precision would be
may be chosen when the range or precision of single
Pesion
Insufticient.
CO-41
POPULARPUBLICATIiONS
IIIIIIIIIIIIIIIIIIIIIIIIN
63 52
COMPUTER ORGANISATION
INSTRUCTION
SET
Chapter ata Glance
Instru
tion set: Instruction set is the set of instructions
Instruction
cular machine has its own set of instructions that a machine is able to execuc.
Each parti i.e. an instruction set, which
instructions used in that particular consists
of ang computer, varies from computer
On the specific organization and architecture to computcr
of the computer.
depion
Instructio format: nstruction format deals with
ion has three parts. The opcode part, the looks of a basic instruction. Eacn
the 'addressing mode operands or
part and the op
address' (i.e. operand address) part. The operation field is called
the 'opcode or the
ation code. The operand/address fields contain either
the operands themselves or the
addresses of storage
age locations of the data or
arguments (i.e. addresses of operands) in main
or in the processor depending on the various addressing
modes () as specified in a
particular instruction.
Three, Two, one and zero address instructions:
) Three-address instructions:
to
these type of instructions, all operand addresses are explicitly defined. Here the instruction
farmat has three different address fields specitying a memory
or a processor register operand.
Advantages:
in short programs when evaluating arithmetic expressions.
0t results
(i) Less execution time.
(i) Two-address instructions:
Here the instruction format has two different address fields, each specifying either a memory
or a processor register operand.
Advantages: Less execution time compare to one-address instructions.
(ii) One-address instructions:
Such instruction format has a single explicit address field and uses an implied accumulator
(AC) register for all data manipulation.
Advantages
) Much less number of bits is required to specify the single operand address.
(i) Less complicated decoding and processing circuit is needed.
(iv) Zero-address Instructions:
PUSH and POP
uch instructions do not contain any explicit addresses (except for
operands required must be
nstructions). As the operands are stored in a pushdown stack (the
tnere in the top positions in the stack), hence no addresses are required.
Auvantages: Do not contain any explicit addresses. So instructions are simple.
Different types of addressing modes:
) Implied Mode
() Immediate Addressing Mode
(m) Register
Mode or Register Direct Mode
(v)Register Indirect
Mode
) Auto-increment
(vi) Auto-decrement
Mode
ode
(Vin)
Direct Address
Mode
Co-43
POPULARPUBLICATIONS
Mode
(viii) Indirect Address
Address Mode
(ix) Relative Addressing Mode
Program Counter) Relative
(a) PC (i.e. Addressing Mode
Mode or lIndex Register Relative
(b) Indexed Addressing
(c) Base Register Addressing Mode
(x) Stack Addressing Mode
15. The addressing mode, where you directly specify the operand value is
WBUT 2019]
c) Definite d) Relative
a) Immediate b) Direct
Answer: (a)
WBUT 2019]
16. How address of base-register calculated?
is the effective
contents to the partial address in instruction
a By addition of base register
to the partial address in instruction
D By addition of implied register contents
contents to the complete address
in
c) By addition of base register
in
instruction
register contents to the complete address
y addition of implied
instruction
Answer:
(a)
CO-45
POPULAR PUBLICATIONS
CO-46
COMPUTER ORGANISATION
Use:
In all stack-type computers.
Given an
a example and explain
Base-index Addressing.
Answer: [WBUT 2007,
2011, 2012]
In ase-Index addressing
mode, the effective
cific base register and
speci address is the
sum
addressing mode
that of the specific index register. of the contents of the
could be useful in accessing For example, such
elements of an an
reaister would hold the array. In
starting location of the this case, the base
would contain the location specified array and
of the offset. the index register
ii) How many bits are there in the data and address inputs of the memory?
WBUT 2013, 2016)
Answer:
is of 32 bits.
i) Memory has 256K words = 2 words so need 18bit address bus, word size
represent
So one instruction is also of 32 bits size. There are 64 registers, so 6 bits need to
the registerpart. Hencefor opcode part we need 32-(1+18+6) =7 bits.
ii)
indirect bit operation code register code address part
(1bit) (7 bits) (6bits) (18bits)
ii) There are 32bits data input and 18bits address input in memory.
CO-48
COMPUTER ORGANISATION
indirect ad ress mode. How
Explain is the effective
address calculated in this
CAse? [WBUT 2016]
Answer:
Pstion No
Duestion No. Iof LongAnswer Type Questions.
Referto
STOR X
AC - AC +B
X AC
LOAD C AC -C
ADD D
AC- AC +D
MUL X
AC X* AC
(v) Zero-address
machine:
PUSH
A TOP= A
PUSH
B TOP B
ADD
TOP A+B
PUSH
C TOP C
PUSH
D TOP D
ADD
TOP C+D
MUL
POP
TOP (C+D)*(A+B)
X M[X]= TOP
CO-49
POPULAR PUBLICATIONS
PC Relative
Index
Addressng Register Base
Mode Register
Relative Addressing
Addressing
Mode
Mode
) Implied Mode:
In this mode the operands are specified
'implicitly' in the definition of the instructionie
the operands are implied instruction definition. Operands
need not be specified explicitly
Example:
Complement Accumulator: The above instruction is
an implied-mode instruction because
the operand in the accumulator register is implied in
the definition of the instruction. The
operand need not be specified explicitly.
Example:
LOADI 99 or LOADtmmediate
99
Instruction
This means that 99 (i.e. the data or the
LOADI 99 operand) are to be loaded in the
Accumulator as has been shown in the
figure. In this mode the instruction has an
Accumulator operand field rather than an address field.
CO-50
COMPUTER ORGANISATION
Register Mode or Register Direct Mode:
4e
ilthismode the operands reside in registers
directly in the CPU registers.
that reside within
the CPUi
U i.e. the operands
reside
Example:
ADDRegister direct B
Register B
Here B is a
CPU register and the
99 content of which
is 99 i.e. this content
reside directly within
the CPU register
B (means
the address of this operand
is
the CPU register B).
Hence, this content
Accumulator must get added
to the content of the
accumulator.
CPU
Example:
ADDRegister Indirect 5
Memory
Register B
Here the content of the CPU register B
(i.e. W) is the memory location
that
contains the operand 99. So the register
99 w B contains the address of the operand
99. This operand (99) is to be added
to
Accumulator the accumulator content.
ADDAufoincrement/ Autodecrement B
CO-51
POPULARPUBLICATIONS
Suppose the CPU register B has in it the memory location address 2010
memory Let the
location has this address 2010 containing the operand 99. So this operand
c
Is
added to the accumulator content. Again if there is a table of memory locatio Wil
from address 2010 (and increasing downwards), then just incrementing hSarin
ng
content by 1(2010+1=2011), the operand in 2011 location can be accessed and registe
new accumulator content. This may continue until the operands in all all the tded
memory
locations in the table are added to the previous accumulator content.
If however memory is increasing in descending order, then the register content
conte needs
be decremented by each time.1
to
Example:
LOAD Memory Direet X
Memory
Instruction
In the example, the memory
LOAD
location X contains the
operand 99 to be loaded in
the accumulator.
Accumulator
Example:
LOAD Memory Indirect W
Memory
In the example, the memory
Instruction W location w
contains X, which is the memory location
LOAD W
whose content is the actual operand 99. This
operand is to be ultimately loaded in the
99 X
accumulator.
Accumulator
Uses:
addressing mode often used with branch-type
is
Knode instructions.
This mode
also resultsin shorter address field
in the instruction
can be specified with a smaller number format as the relative
of bits compared to the number of
required designate the entire memory address. bits
Example:
ADDPC-Relaive 25
Instruction 99
ADDcRelane Memory
In this example, the
address part of the
instruction i.e. 25 is added
to the
content of the PC (i.e. 2050) and
the
memory location (i.e. 2050 +
2050
25
2075 2075) is looked
99 upon and its content
(i.e. 99) is added to the content
of the
accumulator and 1he
result after
addition is stored in the accumulator
Accumulator itself.
Uses: Same as in relative address mode.
CO-53
POPULAR PUBLICATIONS
Example:
ADDBase Register Relative
Diagram and explanation of the example is same
as the PC-Relative Mode tha.
CPU register is now base register instead the PC. onlv that
of the
Uses:
Such modes are used in computers to
facilitate the relocation or programs
in memory.
) Stack Addressing Mode:
Here the address of the operand is specified
by the stack pointer (SP). The
instruction is the shortest as it does length of
not include any address of the memory
mention any register just like implied location or
mode of addressing). After each stack
the contents of SP are automatically incremented operation.
or decremented. PUSH and POP the
two commonly used instructions of this are
type.
Example:
PUSH A To push the content of accumulator to the
top of stack (TOS).
Uses:
Useful when PUSH and POP instructions
are used in a program by the programmer.
When interrupt occurs the contents
of important registers are saved into
this stack addressing is used. the stack. For
CO-54
COMPUTER ORGANISATION
Two-adaresSS
machine
MOVE T, A
MULTIPLY T, B
T-A
MOVE X,C T-T B
X, D
X-C
ADD X-X+D
T,X
DIV X-T/X
One-addresS iachine
LOAD A transfer certain memory content accumulator
to
MULTIPLY B AC - AC *B
STORE T transfer AC content to memory location T
LOAD C transfer C to accumulator
AC- AC +D
ADD D
DIV T AC -ACIT
STORE X transfer result to memory location X.
CO-55
POPULAR PUBLICATIONS
4. Discuss in detail the various factors that need to be considered while designi
the ISA of a processor. WBUT
2017
Answer:
The Instruction Set Architecture (1SA) is the part of the processor that is visihl.
soe e to
een software
programmer or compiler writer. The ISA serves as the boundary between the
hardware. The ISA of a processor can be described using catagories:
5 and
Bus Sizes
What size data bus do we want? This effectively sets the natural word size the
of
ISA.
And because the CPU will want to fetch in word units, this also
influences the size of
our instructions.
generally, each instruction will be word at minimum, or a multiple the word
1
of
size.
What size address bus do we want? This determines how much
memory the CPU Can
address.
But then we need the ability to express every
address in some way.
If the address size is too big, it can make the instruction size
For example, if the address bus is 64 bits, how too big.
will we encode the operation: 10au
word from address X into register R3?
The instruction will be at least 64 bits
long to hold the address, plus DIs
describe the load operation and the register
which is the destination.
CO-56
COMPUTER ORGANISATION
operattons
manyoperations do we want to have?
ave lots, this provides
a rich
I set of operations that rogrammer can
perforn but it will make implementing them the progr
in silicon much
need more bits in each instruction more difficult
We will also i
32 operations, 6 bits=> 64
to encode the operatio
ation:
bits operations etc.
we mignt choose to
On the other hand, have only a small
may force the programmer set of simple instructio
This to have to combine
something done, but the advantage is fewer
2 or more instructions to get
bits required to encod
code an operation, and
simpler CPU design.
a
Operands?
How Many
pWith the number of instructions decided, how
many operands will each
require?
operatro
If the CPU gets most or Its data from registers, then we probably
want to have
some 3-operand instructions like
ADD RI, R2, R3, 1.e. Add R2 and R3, and save the result
into RI
so the instruction format needs to have bits set aside to identify each of the three
registers.
Other 3-operand instructions include instructions which compare and then divert the
PC to a new instruction, e.g.
BGT RI, R2, 100, i.e. if RI> R2, branch the CPU to instruction at current PC + 100
Not all instructions have 3 operations. Examples of 2-operand instructions include:
LOAD R3, 4000, 1.e. get the value from memory location 4000 and load it into
register R3.
SAVE R4, 5000, i.e. write R4's value out to memory location 5000.
SET R6, 23, i.e. set R6 to the literal value 23 (not the value at location 23).
And, of course, a CPU designer may think of l-operand instructions, such as:
INCR R4, i.e. increment the value in R4. The Java equivalent is R4++.
Later on, we will talk about the various addressing modes which a CPU designer
might wish to use.
Literal Values
Many instructions require literal values.
e.g. in Java when we write for (1=0; iIKI00; 1t+), there are two literal values: 0
and 100.
Are we going to be able to find space. in each instruction to put in literal values?
If so, that will be great, but it will be wasted space if programs dont have many
literal values.
to have to be stored
can't find space, then each time there is a literal, it is going
Iwe to memory to fetch the literal value.
dregister, or we are going to have to go out
CO-57
POPULAR PUBLICALIONS
A Hypothetical Example
Before we go any further. Iet's make the above concrete by doing some ISA desi
a
Let's design an ISA with 8 registers, a 16-bit data bus and word siže, and
address bus: quite suitable for an embedded CPU, C.g. in a microwave or eno
4
engine
control system.
Let's also have 3-operand instructions where the operands are all sters:
Rdest-Rsrc1 OP Rsrc2
We need 3 bits to encode each register's number, so that's 9 bits out of 16 used e
up,
leaving 7 bits.
Let's use 1 bit to encode the size of the data being manipulated: 8-bit byte or 16-hit
int. That leaves 6 bits. t
We could go for a single instruction format:
OperationSize Rdest RsrclRsrc2
6 bits
bit 1 bit 3 bits 3 bits3bits
But now there's no way to copy values between the regiIsters and the main memory,
nor is there any way to put literal values into an instruction.
Let's add a second instruction format, still 16-bits long, but which contains a literal
value:
Inst 1ype Operation Size RdestRsre1 Rsrc2
0 5 bits |1 bit 3 bits 3 bits 3 bits
CO-58
COMPUTER ORGANISATION
1-word
instruction tormat
forma
a with 22=4 possible
operations on one
8-bit literal
8-b1
value, and register and an
instruction format
with 22=4 possible
memory location operations on one1 register and a
24-bit
pecision
akiugwe
havent considered how we
are going
p can deviate from the normal "next to modify the value in the
r
t instruction" flow
of execution.
eed a way
ay to skip Over instructions, based on a decision,
statement so as to implementr
We also
eed to branch bacKward, based on
a decision, so as
constructs. nplement loop
to impl
need to Jump to the start of a function, and also know
e how to return back to
where we left.
Allof
of the above change the default PC behaviour: move
to the address of the next
instruction.
What decisions are we going to provide?,
<
<=,>,>=?
ome of these we could leave out, e.g. if (R3 < R4) is the
same as if (R4> R3).
ral choices here. We could design
There are several an instruction mat which
encodes:
two operands to be compared,
what type of comparison to make,
what change to make to the PC if the comparison is true.
CO-59
POPULAR PUBLICATIONS
A non-MRI is defined as an
instruction that does not have an address pait. A cno
program by any one of the three-letter RI
recognized in the instruction field of a
the register-reference and input-output instructions. A symbol
address in the is
ction
for
c) Instruction Foriat:
an instruction, an instruction
An instruction format defines the layout of the bits of
zero or more operandt
must include an opcode and implicitly or explicitly, S. An
instruction is normally made up of a combination of an operation code and an ooperand
most commonly by its location or address in memory. An instruction set architectur e is
Opcode Mode Address or operand
d) RISC:
RISC stands for Reduced Instruction set computer
It is a microprocessor that is designed to pertform a smaller number of types of comuter
instructions so that it can operate at a higher speed. Some advantages of RISC are-
A new microprocessor can be developed and tested more quickiy 1t one of its aims is
to be less complicated.
Operating systems and application program who use the microprocessor's
instructions will find it easier to develop code with a smaller instruction set.
The simplicity of RISC allows more freedom to choose how to use the space on a
microprocessor.
Higher level language compilers produce more efficient code than formerly because
they have always tended to use the smaller set of instructions to be found in a RISC
computer.
The characteristics of RISC Architectures are
i) It is highly pipe lined.
ii) It has fixed length instructions and few addressing
mode
iii) it is mainly controlled by hard wired.
iv) It has single cycle instructions, and three
register operands allowed per instruCuO
(Exampleadd Ri, R2, Ra)
CO-60
COMPUTER ORGANISATION
MEMORY ORGANIZATION
Cache Main
Memory Memory Auxiliary/ Secondary
Memory
LI Cache L2 Cache
Memory Memory RAM ROM Magnetic
Magnetic Magnetic
(primary cache (secondary Disk
1ape Disk
memory) cache memory)
(CD-ROM)
Static Dynamic
RAM RAM Hard Floppy
Disk Disk
Flash
Memory
CO-61
POPULAR PUBLICATIONS
follows:
of memory hierarchy is,as
Memory Hierarchy: The block diagram
Magnetic
tapes Main
I/0
processor memory
Auxiliary memory
Magnetic
disks
CPU
Cache
read pulse
main memory is selected by the chip
system the chip
select(CS)
Required word is
sent to the data bus Through the Activities the
Required via the bit lines,
sense/write required word
word is sent .sense/write
to the CPU circuits, 'read line
Circuits, data
pulse is given
Output line
CO-62
COMPUTER ORGANISATION
&Dynamic RAM:
Stalic
StaticRAM:
' of intermal flip-flops that store the binary
consists information. Stor information
long as poweris applied to the unit. Stored remains
idas RAM: A dynamic RAM
Dyamic loses its stored information
though tne power in a very shortrt time (a few
milliseconds) even supply is on.
Cach memory 1S
Cache
or: Cache
memory: a very small
but very fast memory. t but
mong all other memory It is the
iastest
units. A very-high-speed
cneed of processing memory, it is sometimes to
by making current programs u
increa
it lies between the cU andthe main memory
and data availablele to the CPU at
1
rapid unit.
a
CPU Cache
Memory Main
Memory
memory: It is a tecnnique thal allows
the execution of processes that may not
in main memory. his concept used in
Com
user to
construct programs as thougn a
programm
e
some large computer systems permit the
large memory space is ava able.
Virtual memor 5
mmers the illusion that
used to give they have a very large memory at their disposal.
eventhoughoh the computer actually has a relatively small main memory.
Diugranm
The below figure shows the organization that implements virtuak memory.
Processor
Virtual address
Data IMMU
Physical address
Cache
Main memory
DMA transfer
Disk storage
2. Cache
memory WBUT 2006, 2008, 2011, 2013]
a) increases
performance b) reduces performance
C)
machine cycle increases d) none of these
Answer:
(a)
CO-63
POPULAR PUBLICATIONS
4. How many RAM chips of size (256 K * 1 bit) are requiredto build
memory? WBUT 2006, 2009, ME
2015
a) 8 b) 10 c) 24 d) 32 201a
Answer: (d)
6. The principle of locality justified the use of BUT 2007, 2012, 2015,201
a) Interrupt b) Polling
c) DMA d) Cache memory
Answer: (d)
CO-64
memory COMPUTER ORGANISATION
Virtual i system allOws
More than address space the employmentof
c) More than hard disk capacity b) The full WBUT 2010]
address space
Answer: (a) d) None of
these
12. A
system nas 48-bit
48-bit virtual
virtua address,
How many virtual 36-bit physical
memol and physical address and 128 MB main
pages can
the address space suppor
a) 2, 24 b) 22, 236
c) 24, 234 [WBUT 2010]
Answer: (b)
d) 24, 236
13.
Maximum
imum number of directly
sor having
processor addressable
10 bits wide locations in the memory
control bus, 20 OT a
is bits address bus
and 8 bit data ous
a) 1K b) 2 K
c) 1 M WBUT 2012]
Answer: (C)
d) none of these
Periodic refreshing is
14.
needed
a) SRAM b) DRAM [WBUT 2012]
Answer: (b) c) ROM
d) EPROM
Physical memory
15.
broken down into groups
a) page b) tag of equal size
is called [WBUT 2012]
Answer: (c) c) block/frame
d) index
17.
Micro Instruction are
kept in
a) main memory
c) cache memory b) control memory BUT 2012]
Answer: (5) d) none of these
18.
Size of virtual
memory is equivalent to the size
a) main memory of WBUT 2013]
c) secondary memory b) cache memory
Answer: d) both (a) and (c)
(c)
19.The
sociative access mechanism is followed in
a) main memory [WBUT 2014]
c) magnetic b) cache memory
Answer: disk d) both (a) and (b)
(d)
CO-65
PUBLICATIONS
POPULAR
WBUT
by 2014
of memory is supported c) both d) none of
20. The users view these
b) segmentation
a) paging
Answer: (a) WBUT
is due to 2014
accessing data on disk rotation time
in
21. The largest delay b)
a) seek time d) none of these
c) data transfer time
Answer: (a) me
data needs to be deposited in memory
location for fetching
22. Address of memory [WBUT 2014
in c) IR d) status register
c) MBR
a) MAR
Answer: (a)
of WBUT 2014
is equivalent to the size
23. Size of virtual memory c) floppy disk d) none of these
a) hard disk b) CPU
Answer: (a)
n be the size of each register, then
in ordar
24. If k be the number of registers and of
construct n-line common bus system using tri-state buffers, the total number
to WBUT 2015]
would be
tri-state buffers and the size of decoder b) n'k and log2 k-to-k
a) n'k and 2-to-4
d) n'k and log2 n-to-n
c) k and log2 n-to-n
Answer: (6)
RAM) when WBUT 2016]
25. RAM is called DRAM (Dynamic
a) it is always moving around data
b) is requires periodic refreshing
c) it can do several things simultaneously
none of these
d)
Answer: (6)
memory
26. In order to execute a program instructions must be transferred from
8 bit byte can be
along a bus to the CPU. If the bus has 8 data lines, at most one in this case to
transferred at a time. How many memory accesses would be needed WBUT 2016
transfer a 32 bit instruction from memory to the CPU?
b) 2 c) 3 d) 4
a) 1
Answer: (d)
many p
27. A computer's memory is composed of 8K words of 32 bits each. How
are required for memory address if the smallest addressable memory un 2016]
WBUT
word?
a) 13 b) 8 c) 10 d) 6
Answer: (a)
CO-66
COMPUTER ORGANISATION
memory refers to
ache
a0cheap memory
memory that can
be plugged into [WBUT 2016]
2 memor the mother board
pres to expand mau
fast memory present on the processor
b accessed data chip that is
used to store recent
on of main memory
erved portion
spe area of memory on the used to save important data
acial
d) a chip that is used
data to save frequently usea
Answer: (b)
is generally
generally used
********* to. increase the apparent size
30. memory of physical memory
a) Seconaary b) Virtual memory
WBUT 2017]
c) Hard disk d) Disks
Answer: (b)
3. To get the physical address from the logical address generated by CPU we use
WBUT 2017, 2019]
a) MAR b) MMU c) Overlays d) TLB
Answer: (b)
34. During transfer of data between the processor and memory we use
[WBUT 2017]
a) Cache b) TLB c) buffers d) Registers
AnSwer: (d)
CO-67
POPULAR PUBLICATIONS
R1, 45 does WE
36. The instruction, Add and stores 45in
in that asUT
20.
a) Adds the value of 45 to
the address of R1 address2019
R1
b) Adds 45 to the value
of R1 and stores it in
45 and adds that content to that of R1
c) Finds the memory location
d) None of these
Answer: (b)
on chip cache memory for an n-add
37. What could be the maximum size of 1-address
WBUT bit
processor? 2019
a) 0 b) 2 c) infinite d) decided by manufactur
Answer: (c)
2 bytes and hence 256 MB 2' X 2 2) in the main memory addres orthe
address size of main memory is 28 bits.
21
=
2 /2 = 2. So number of bits in the block field 13. Now out of the totai
memory address size of 28 bits, word field contains 7
bits and the block field conlau
bits. Hence, the number of bits the tag
in field is 28-(13 +7)=8.
Block Tag Word
CO-68
COMPUTER ORGANISATION
eub-fields for set-assOCiative
su
e ofthe ere are 8 blocks per mapping cache schemes:
ca cache set
this the cache memory are and the total numbers of cache blocks are 2.
Innumber oI sets inthe
o number of bits
Hence
bi in the set 2/8 23/2=20
field is 10 and that
in the word field is 7. So number
thetag field 28-(10+ 7)= 11.
=
Set Tag Word
10 11
7
Main Memory Address
3. Discuss with suitable logic diagram the operation of an SRAM cell. WBUT 2006]
OR,
SRAM celI. WBUT 2013]
Draw the internal cell diagram of
Answer:
type of semiconductor memory where the
a
random access memory (SRAM)
1S
Static
word static indicates that, unlike
dynamic RAM (DRAM), it does not need to be
bit. SRAM
periodically refreshed, as SRAM uses
bistable latching circuitry to store each
that data is
remanence, but is still volatile in the conventional sense
exhibits.data.
eventually lost when the memory is
not powered.
CO-69
POPULAR PUBLICATIONS
WL
Vad
M2 M
Ms
M Ms
BL BL
Each bit in an SRAM is stored on four transistors that form two cross-coupled inverten
This storage cell has two stable states which are used to denote 0 and 1. Two additional
nal
access transistors serve to control the access to a storage cell during read and wrie
operations. A typical SRAM uses six MOSFETs to store each memory bit. In aditiont
such 6T SRAM, other kinds of SRAM chips use 8T, 101, or more transistors per bit. This
is sometimes used to implement more than one (read and/or Write) port, which
may be
useful in certain types of video memory and register files implemented with multi ported
SRAM circuitry.
Generally, the fewer transistors needed per cell, the smaller each cell can be. Since the
cost of processing a silicon wafer is relatively fixed, using smaller cells and so packing
more bits on one wafer reduces the cost per bit of memory.
Memory cells that use fewer than 6 transistors are possible- but such 3T or 1T cells are
DRAM, not SRAM.
Access to the cell is enabled by the word line (WL in figure) which controls the two
access transistors Ms and M, which, in turm, control whether the cell should be connected
to the bit lines: BL and BL. They are used to transfer data for both read and write
operations. Although it is not strictly necessary to have two bit lines, both the signal and
its inverse are typically provided in order to improve noise
margins.
During read accesses, the bit lines are actively driven high and low by the inverters in tne
SRAM cell. This improves SRAM bandwidth compared to
DRAMs-in a DRAM, the Dit
line is connected to storage capacitors and charge sharing
causes the bitline to swIng
upwards or downwards. The symmetric structure of SRAMs also
allows for differen
signaling, which makes small voltage swings more easily
detectable. Another differen
with DRAM that contributes to making SRAM faster is
that commercial chips accep
address bits at a time. By comparison, commodity
DRAMs have the address mulup
in two halves, i.e. higher bits followed by lower bits, order
over the same package pin5
to keep their size and cost down.
The size of an SRAM with m address lines and n data x S
lines is 2" words, or 2
CO-70
COMPUTER ORGANISATION
Virtual Address
Data MMU
Physical Address
Cache
Data
Physical Address
Main Memory
DMA Transfer
Disk Storage
CO-71
PUBLICATIONS
POPULAR
memory? WBUT
mean by Stack 20
6. What do you OR,
WBUT
CPU.
Explain stack based 2018
Answer: most computers is a STACL
useful feature that is included in the CPU of
A stores information m suL lasti
first-out (LIFO) list. A stack
is a storage device that
is the first one to be retrieved. Stack is
a manmer
FULL EMPTY 63
DR
relocation
-
register
14000
logical physical
address address
CPU
memory
346
MMU
CO-73
PUBLICATIONS
POPULAR
256 x 4. Desinnn a 2K x
RAM chips each of size
we are given building block.
Draw a net logic diagram 8RAM
8. Suppose as the WBUT ofyo
chip
system using this 2015,
implementation. 2
Answer:
bytes in the RAM
2KB 2*8 chips of 256*4 which means these are 256 rc ws with4b
We have RAM in
nibble of data.
each row that is one
= *2=2**2=8 *2.
(2 8/(2' *4) (2) columns of 256 * 4 chips.
needing 8 rows and2
So we will be selected
rows, rest Will be same and the chips wiil be
selected on the
t
show two basis
Below we
decoder output.
74189
2 iCS WR
WR
<CS
74189
74189
<<CS WR
WR-
CS WR
74189
CO-74
COMPUTER ORGANISATION
escribe stack based CPU
9.
Answer:
WBUT 2015]
nswe
Stack-base computer operates
instructions,
stack list of data words
PU of most
with a Last-In,based on a data structure called stack. A
included in the CPU computers. First-Out
acsive A portion (LIF0) access me method that is
successive locations can be of memory
in address for the top most considered as unit used to store operands
the operand in the a stack in computers. The register ster that holds
rations performedd on the operands stack is called
stored in a stack a stack point
ointer (SP). The two
end only,
erands are pushed
oper: are the PUSH
or popped. H and POP. From one
operandat at the
the top of stack and it The PUSH
decreases the operation results in inserting
eleting
results in del one operand
from the top
stack pointer on
register. The POP operation
register. of stack and it increases
ample, the stack pointer
For example, Figure showS a stack
of four data words
structions require an address field in the memory. PUSH
each. The PUSH and POP
PUSH <memory address instruction has
the format:
SP
Top data of the stack
Stack
-21
56
Bottom data
2-1
CO-75
POPULAR PUBLICATIONS
rganizations
general-register based CPU organization
There are three main advantages of over
stac
based CPU organizations.
CPU organizations, reading a register does not no affect
(a) In general-register based
organizations reading value from the
value its
content, whereas, in stack based CPU topofthe
stack.
stack removes the value from the
any register from register fil
(b) In general register-based CPUU organizatiDns,
chosen to keep values while writung a program; whereas,
in stack baso a
nat CPU
organizations, accessing values is limited by the LIFO (last-in first-out) nature
of the
stack.
(C) Since, fewer memory references are made by programs Written in general register.reo
based CPU organizations, the effective execution is faster than that in stack
CPU organizations, where generally stack is implemented by memory locations
and
locations are accessed in LIFO nature.
10. Two 1024x4 bits RAM chips are given. Design a memory of size 2048x4 bits
[WBUT
2017
Answer:
In a 1024x4 memory has 1024 word capacity and it can store 1024x4 = 4096 bits T
expand the memory size from 1024x4 bits to 2048x4 bits, two 1024x4 RAM ICs are
required. Figure I shows the connection of two 1024x4 RAM to develop a 2048x4 RAM
Ten-address lines Ao to A are directly connected with memory IC terminals. The chin
select line is connected with most significant bit address line Ajo and inverted MSB is
connected with chip select line of the next IC. So that memory addresses from 0 to 1023
are located first memory IC, and memory addresses from 1024 to 2047 are also located in
memory IC2. One memory will be selected at a time and data out from one memory only.
Therefore, corresponding output terminals are connected together for output.
Address inputs
Ag Ay
Data input
RAS
CAS
RIW D D, D, D
Q Q Q Qu
Data output
Fig: Two 1024x4 RAMs
expanded to design a 2048x4RAMs
CO-76
COMPUTER ORGANISATION
b index=address % 8
tag address /8
Address reference Index Tag Hit/Miss
2 0 Miss
0 Miss
Miss
16 0
21
Miss
Miss
13
Miss
64 Miss
48 0 Miss
Index Hit/Miss
48
CO-77
POPULAR PUBLICATIONS
Answer:
Part:
The limitations of direct-mapped cache:
Each block of main memory maps to a fixed location in the ne cache,
cache herefore
different blocks map to the same location in cache and they are continually if
two blocks will be continualy swapped in and out, which known as Thrashing
is Thrashi
2md
Part:
We are dividing both main memory and cache memory into blocks of Same size
bytes ie.n
Therefore, cache size = (Number of sets) * (size of each set)* (cache line size
So, using the above formula we can find out the number of sets in the cache men
2 (Number of sets)* 2*2
Number of sets 2/ (2*2)=25
When an address is mapped to a set, the direct mapping scheme is used 4 then
associative mapping IS used within a set.
15. a) If a direct mapped cache has a hit rate of 95%, a hit time of 4ns, and a miss
penalty of 100ns, what is the average memory access time?
b) If an L2 cache is added with a hit time of 20ns and a hit rate of 50%, what is the
new average memory access time? WBUT 2019
Answer:
a) In a direct mapped cache,
Hit rate= 95%
Hit time =4 ns
Miss penalty = 100 ns
Miss Rate 1- Hit rate =1-95%=0.05
:. Average memory access time = Hit time + (Miss rate x Miss penalty)
= 4+ (0.05x100) = 9ns
CO-78
COMPUTER ORGANISATION
Cache
he memory has 2K blocks. Block 32 bit
16.
is provided. The machine is byte size is of 4 words 16 bytes.
address
is the bit length for each field in addressable.
What length for Direct Mapping?
the
the bit length for each field
What isis thethe bit length for each
in 2-way set associative mapping
Whatis field in 4-way set associative mapping
i) [WBUT 2019]
Answer:
length foreach field in direct mapping =x (left)
i) it = words 4x
:Block size 4 16 bytes
bytes 2° =6 bit
64
Block size of 4 words 16 bytes 2 bytes
i)
Therefore, Number of bits in the Word field= 4
heche size = 22K-byte =2" bytes, Number of cache blocks per set= 2
umber ofsets che size/ (Block size Number of blocks per set)
- 2 (2
* 2) 2
Therefore, Number ofbits in the Set field 6
Total number of address bits 32
=
Advantage
1. Simple and easy to implement and hence it is most commonly used ache
method. write
2. Main memory and cache memory always contain the same data in them.
3. Effective in DMA transfers as the /0 device communicating ng with
with main
main memoy
always receive the most recent updated data from the main memory.
Disadvantage:
. Slow (time consuming), as always two memories(cache and main memory) ory) no
need
get updated simultaneously to
2. The policy will not work if the specified address location in the cache memory
memor
does
not hold the required word to be updated.
Write Back: In this method only the cache location is updated during a write
operation
ation.
The location is then marked by a flag so that later when the word is removed froms
the
cache it is copied into main memory.
Advantage:
1. Faster than the previous policy as cache and main memory 1ocations
do not get updated
simultaneously with every write operation with only the cache memory getting regularly
updated and the final copy of the updated word gets stored at the main memory
Disadvantage:
1.In a write back policy, data (modified or not) is written to the main memory finally
Now supposc if the data is not modified at all, then the same data (unmodified) will be
again written to the main memory i.e. same data will get overwritten in the main memory.
But this is time consuming and henee acts as an overhead.
b) Explain the difference between full associative and direct mapped cache
mapping approaches. WBUT 2004, 2007, 2009, 2011, 2014, 2015, 2019
Write the advantage of virtual memory. [WBUT 2008, 2010]
Answer:
1s Part:
Differences between full associative (i.e. set-associative) and direct mapped cacnc
mapping approaches areas follows:
Direct mapping Full-Associative mapping
Suffers from contention probiem as Choice of block replacement is more and hence
provides few choice of block replacement. Suffers much less from contention
problem.
2. Slow process. Much faster compared to direct mappi
|technique.
3.Less expensive (har fware). Much less expensive than direct mapping
CO-80
COMPUTER ORGANISATION
Part:
Advantage
efficien
rOvides fficiently the total available memory
ammer is not required to
programn space to shared by different users.
The take care of storage allocation while Writlns
programs.
The accesS
rate is high
progran execution is made independent
The of capacity and configuration of
memory.
size
access time Registers
(min) speed cost
(min)
(max) (max)
Cache
L2 Cache
Main Memory
Flash Memory
Magnetic Disk
Optical Disk
Magnetic Tapes
CO-81
POPULAR PUBLICATIONS
he
term for RAM is Sequential access memory or SAM. i.e, data can be accesse oppositg
kind of media in a sequential manner only. Tape drives are claslassic examples d from
of SAN th
Sequential access
Y 7 8
Random access
1
6 5
CO-82
COMPUTER ORGANISATION
Answer:
le of non-destrucuve read-Out memory:
Example
Static Semiconductor memories
Access Memory (SRAM).Static
Ranductor memory where the word random access memory (SRAM)
static indicates that, unlike namic RAM
(DRAM), it does not neea to be periodically dynan
refreshed, as SRAM uses bistable
circuitr to store each bit. SRAM exhibits latchin
nse that data is eventually data remanance, but is still volatile in the
tional sense
cO le of destructive read-out memory:lost when the memory is not powered.
These are magnetic-core
core memories. memories or ferrite
"core" comes from conventional
erm "core
The term transformers whose windings surround a
gnetic core. In corore memory the wires pass
once through any given are
single-turn devices.
vices. The magnetic material for en core-they
a core memory requires a high degree of
netic remanance, the ability to stay highly magnetized,
c energy is required to change the magnetization and a low coactivity so that
direction. Magnetic-core memory was
the predominant forn of random-access computer memory
magnetic tororoids (rings), the cores, through which for 20 years. It uses tiny
wires are threaded to write and read
information. Each core represents one bit of information.
Word Line
Bit Lines
Memories that consists of circuits that capable of retaining their state as long as power is
applied are known as static memories. Figure shows a static MOS cell. Two inverters are
cross connected to form a latch. The latch is connected to two bit lines by transistors T
and T2. These transistors act as switches that can be opened or closed under control of the
word line. When the word line is at the ground level, the transistors are turned off, and
the latch retains its state.
Read Operation:
line is activated to close
Order to read the state of the static MOS cell, the word b is high and the signal in
T and T,.If the cell is in state 1,the signal on bit line
Ches cell is in state 0. Thus b and b' are
ine b is low. The opposite is true if the
CO-83
POPULAR PUBLICATIONS
Answer:
Following are the types of memory;
1) CPU registers:
working memory for temporary storage
The high speed registers in the CPU serve as the
a general purpose register file for storing
data
of instructions and data. They usually form register
is typical of a register file and each
as it is processed. A capacity of 32 data word
within a single clock cycle.
can be accessed that is, read from or written into,
referred to as a gigabyte (1 GB). Access times of five or more clock cycles usual.
3) Secondary memory:
main memoy
This memory type is much larger in capacity but also much slower than
arc
Secondary memory stores system programs. Large data files and the like that
capae
continuously required by the CPU. It also acts as an overflow memory when the
to De a
of main memory is excused. Information in secondary storage is considered nation
line but it is accessed indirectly via input/output programs that transfer inodan
between main and secondary memory. Representative technologies for Selow
memory are magnetic hard disks and CD-ROMs, both of which have relatively
electromechanical access times are measured in milliseconds.
CO-84
COMPUTER ORGANISATION
st computers now have another level
Most
Cache: ealled cache memory, of IC memory-sometimesSvveral
levels which in positioned
main memory. A caches storage logically between the CPU
ngisters nd capacity is less than that of
access
cess time of one to three cycles, main memory,
ith an
with som the cache is much faster than main
emory because
bult Ise some of all or it can reside on the
nonents of high-periormance computers that same IC as the CPU. Caches a
essentialco aim to make CPI S
1.
CPU
Cache Cache
Regist Main Secondary
(level 1) (level 2)
file memory memory
(microprocessor)
ICs2: m
1
IC
TCs m n
Diagram:
Aio-0
A14
ADDRESS
Ais To CHIP SELECT CS
input of the RAM chip
2KB RAM
A CS
CO-85
POPULAR PUBLICATIONS
6. a) Draw the internal cell diagram of PROM and explain its functionality
WBUT
2000
Answer:
ADDRESS
DECODER
ADDRESS
BUS
02 D1 DO
CO-86
COMPUTER ORGANISATION
cell is programmedby applying
The bit across the gate a high-voltage
aorma peration and substrate pulse not encountered luring
Oxide, or 30M V/cm) of the thin oxidetran
transistor (around 6V for
to break down
a 2nn itive voltage on the
The ransistor's gate formsthe oxide between gate and strate.
Phe gate, causing
below theadditional a tunneling current to flowan inversion channel in the substrac
roduces additic traps in the oxide, through the oxide. The current
melting the oxide and formingincreasing the current through rough the oxide and
ultumant a conductive
currer required to form the conductive channel from gate to suosrat
The channel
breakdown occurs in approximately 100us or is around 100uA/100nm. m2 and the
less.
memory? How
cache me
b) What is does it increase the
What is hit ratio? performancee of a computer??
OR, WBUT 2008]
What is locality
ity of reference? Explain
the concept of cache memory
withit.
OR, [WBUT 2009]
What is Cache memory? Why is it needed?
OR, WBUT 2012]
Alhat is cache memory? what do you mean by
hit ratio 75%? WBUT 2013]
Answer:
1 Part:
Locality of referencethe property that shows for large
is
number of programs, references
to memory at any given interval of time tend to be confined
within a few localized areas
in memory.
2nd
Part:
Cache memory is random access memory (RAM) that a
computer microprocessor can
access more quickly than it can access regular RAM. As the.
microprocessor proceses
data, it looks first in the cache memory and if it finds the data
there (from a previous
reading of data), it does not have to do the more time-consuming reading
of data from
larger memory.
A special very high-speed memory called a cache is sometimes used to increase the speed
processing by making current programs and data available to the CPU at a rapid rate.
Ihe cache memory is employed in computer systems to compensate for the speed
difterential between main memory access time and processor logic.CPU logic is usually
Taster than main
memory access time, with the result that processing speed is limited
primarily by the speed of main memory. A technique used to compensate for the
in operating speeds is to employ an extremely fast, small cache between the
dcn
and the main memory whose access time is close to processor logic clock cycle
he cache is used for storing segments of programs currently being executed in the
CPU and
temporary frequently needed in the present calculations. By making
data
CO-87
POPULAR PUBLICATIONS
1S possible to increase
the perfar
performar
available at a rapid rate, it
programs and data rate
of the computer. tastest, smallest but the
most expensive among the
Cache memory is the frequentlu
program segments and data that are needed CPU
devices. It stores
current executions.
the
n
measured in terms of e
of memory Is frequently
Hit ratio: The performance find the word in the cache, if the word i found
i
the CPU needs to
called hit ratio when the cache, it is in
its produces a hit if the word is not found in n
then main
the cache
of number of hits is divided by
the total CPU r
memory as counted miss the ratio ference
is called hit ratio.
of memory
ratio=number hits/(number of hits+ number of
miss)
hit of
total times the CPU accesses memory is hit
So if hit ratio 75% then 75% of the
is
will get the desired data
For example if CPU accesses memory for 12 times ihen CPU ed
for 9 times and won't find it 3 times.
disk is (1 -0.96 -0.036) = 0.004. Note that the sun of the probabilities is
1.
7. Giventhe following, determine the size of the sub-fields in the address for direct
mapping, associative mapping and set-associative mapping cache schemes:
WBUT 2008
Main memory size 512 MB
Cache memory size 1MB
Address space of processor 512 MB
Block size 128 B
8 blocks in cache set.
CO-88
COMPUTER ORGANISATION
Answer:
the main ory is 512 MB hence
e size of 2 there are 29 bits (as 512 MB
2
1
Tag Word
Block
139 7
Main Memory Address
12
Main Memory Address
Answer:
a) Given: Hit ratio (h) 0.9, cache memory access time (tcache) = 160ns.O ns, man
access time (main)960 ns memory
Now, to access a word, the average required access time (vernge) is given by:
averageh.ache+(-h)main
So, taverage0.9 x 160 + 0.1 x 960 = 240 ns.
main 960ns
960-240 720
system effieiency = x100 % = x100 1% = 75%
960 960
. System efficiency=75%
9. a) State L1 and L2 cache policies with
suitable figure. WBUT 2009
Answer:
CPU
LI Cache Memory
L2 Cache Memory
Main
DRAM
Memory
System Interface
CO-90
COMPUTER ORGANISATION
16 12 11 10 9 8 1 RD WR Data Bus
Decoder
2 CS1
CS2 256x8
RD Data
RAM1
R
AD8
| CSI
CS2 256 x 8
RD RAM 2 Data
WR
AD8
CS
CS2 256x8
RD Data
RAM 3
WR
ADo
CSI
C'S2 256 x 8
RD Data
RAM 4
WR
AD8
CSI
CS2 512x8
Data
ROM
AD
us connection to the CPU connecting four RAM chips and one ROM chip
CO-91
POPULAR PUBLICATIONS
CO-92
COMPUTER ORGANISATIÓN
12. What is Belady's anomaly for page replacement technique? Explain with
example. WBUT 2010]
Answer:
Deladv's anomaly, introduced in 1969, is a very common concept discussed in context of
naoe faults.
It proved that while dealing with page faults, it is possible to have more page
faults when increasing the number of page frames if a first-in first-out (FIFO) method of
frame management is used.
The explanation is as follows:
In a computer memory, information is loaded in the main memory
in the form of pages,
which are specific sized storage chunks. It is possible to load only a limited number of
is need
pages at a time in the memory. For each page to be loaded, an equal sized frame
in the main memory. If a required page is not found in the main memory,
a page fault
occurs and that page is brought from the disk or secondary
memory. It might happen that
there is no free or empty frame in the main memory at the time of
occurrence of the page
it is required
fault to accommodate the new page in the main memory. In such instances,
to free a frame to accommodate the new page. Before
the introduction of Belady's
anomaly, it was acceptable that the common page replacement
algorithm producing
acceptable results was the FIFO one. But, the anomaly proved that
wrong.
3 2 0 1
3 2 4 2
Page Requests 0
2 1 3 2 4 4 4
Newest Page 3
3 2 1
0 3
Oldest Page
2 32 4
4
Page Requests 0 3 2
Newest Page 3 2 1
0 0
1
0 2
3
3
3 3
Oldest Page
CO-93
PUBLICATIONS
POPULAR
frames, 9 page
anomaly: Using three page
An example of
Belady's
page frames causes l0 page taults to occur. Page faults are
OCCur
faults
Increasing to four inbold
italics.
m
a main memory of 64K * 16 and a cache nemory
13. a) A computer has of
uses direct mapping with a block size of 4 words K
words. The cache in tag, index, block and word
fields?
How many bits are there
cache word?
What is the size of one
accommodated in the cache? WBUT
How many blocks can be 2013
OR mem
a memory unit of 64K x 16 and a cache mory 1K
A digital computer has
words. The cache uses direct
4
mapping with a block size of words. How
formabits
m0
block and words fields, of the address
are there in the tag, index,
calculate address format for associative
mapping and for 4-way set ociative
aseas
WBUT 2015
mapping.
Answer:
Direct Mapping
16 bitaddresses (can address 64K words memory)
4 words block (offset is 2 bits)
IK words of cache
Number of lines IK/2 2
Bits to specify which line = loga(2°)=8
6bits 8bits 2bits
|
Tag Line/Index Offset
b) A processor's TLB has a hit ratio of 80% and it takes 20 ns to search the TLB
and 100 ns to access main memory. What will be the effective access time?
WBUT 2013]
Answer:
Effective access time 20 ns + (100 x 20%) ns = 40 ns
14. a) Write down difference between Dynamic RAM and Static RAM. [WBu
Answer:
Dynamic RAM is the most common type of memory in use today. Inside a u namic
RAM chip, each memory cell holds one bit of information and is made up of [wO Pparts:
and
a transistor and a capacitor. These are, of course, extremely small
transiso holds
capacitors so that millions of them can fit on a single memory
chip. The capac
CO-94
COMPUTER ORGANISATION
intormation a 0 or a 1.
bil ot The transistor
the on the memory chip read the capacitor acts as a swito
cutryO
Iike
like a small or change its itch that lets the control
acitor is bucket that is state.
Capa
the bucket able to store electrons. To store a l in the
ory cel, he
A is lilled with
bucker electrons. To
itor's bucket is that it has
capacitors store a 0, it is emptied.
a leak. In The probien
ith theDecomesmes empty
empty. heretore, for a matter of a few milliseconds a
hckel controller has to come dynamic memory un
ory along and recharge all to work, either the CPU Or
heme discharge. To do this, the memory of the capacitors holding a
Rlore controller reads
back. This refresh operation
"
CO-95
PUBLICATIONS
POPULAR
system effieiency=50-87-x100
150 %=x100%=
150
42%
.System efficiency= 42%
CO-96
COMPUTER ORGANISATION
ogic
aw the logic diagr of the cell of
diagram
logic. one word in associative
read and write memory including
tive memoaIT
the
Answer:
WBUT 2016]
2016]
of Associative Me
Input
Write
R Match
To M,
Read ogic
Output
TAG INDEX
block Word
8 bits 2 bits
7 32 7 32
16. A
hierarchical Three-Level Memory (Cache, Main memory, Hard Disc) system
has the following specifications:
Cache Memory Access Time is 10nsec
i) Disc Access Time is 150nsec
ii) Hit ratio of Cache Memory is 0.97
V) Hit ratio of Main Memory is 0.9
What
20Snould be the Main Memory access time to achieve an overall access
20nsec?
time of
WBUT 2016]
CO-97
PUBLICATIONS
POPULAR
CPU
Level 0
registers
Cache memory
(SRAMs) Level 1
Increased capacity
and accesS time
Main memory Increased cost
(DRAMs) Level 2
Magnetic disk
Level 3
Optical disk
Level4
Magnetic Tape
CO-98
COMPUTER ORGANISATION
short notes of the following:
organization
a) Stack
ache Replace ement Policies
WBUT 2007]
tual address to real address mapping [WBUT 2008]
Static and dynamic memory WBUT 2009]
d)Paging
e) WBUT 2011, 2017]
Answer: WBUT 2012]
ory: Refer to Question No.
a)Sta 6 of Short Answer
Type Questions.
Cache Replacement Policies:
decision of the right block
The getting replaced is
factor. The objective is to keep the blocks in the an important system
performance
(needed by the CPU) in the near future. cache that are likely
As per the property to be referenced
said that the blocks
said of 'locality
can be that have been referenced of reference' it
So when a block to be overwritten,
1S recently will be referenced again
Snoest time without being réferenced. itThis is needed to
overwrite the one that has gone
block is called the
block
(LR
hile
and the technique is called
the LRU replacement
least recently used
algorithm
Whil using the LRU algorithm, the cache or policy.
ac controller must track references
computation proceeds. A counter to all blocks
is used to track the
Denending on the
number of references tracked by references to each block.
hits and misses) each counter (i.e. by the number of
it is decided which block is used
recently used block). the longest time back (i.e. the least
rec And that block
aloorithms can
is then replaced. Though very effective LRU
lead to poor performance when accesses
are made to sequential elements
of an array that is slightly too large to fit into the
cache.
Other replacement algorithms are however
not as effective as LRU. Another algorithm
that replaces the particular block in the cache
set that has been in the cache for the
period of time is called the first-in-first-out longest
(FIFO) algorithm. The third algorithm that
replaces the particular block in the cache set that has
experienced the fewest references is
called the least-frequently used (LFU) algorithm.
Apart from these, using an algorithm
that randomly chooses
the blocks be replaced, is also getting effective.
to
Pages
and Frames:
h
physical (main) memory is broken down (i.e. memory space is divided) into groups
down (i.e.
addS1ze called blocks or frames while logical (virtual) memory is brokenframes
udress
be of
space is divided) into grou of equal sizes called pages. Pages and must
equal sizes.
CO-99
POPULAR PUBLICATIONS
Memory
Virtual address Main memory Main memory
mapping table
register address register
Memory table
buffer register Main memory buffer
register
transtemed intc
into the 10 1oW-order bits of the memory address register (main memory
space has 4K= 2 words 1.e. 2 bit block
ddress nal number and 10 bit line num0ci A
to main memory then transfers the content of ory
sig
read regist ady to be used by the CPU.
the word to the ma
bufter presence
However, the bit
the word read from the page table is it signifies that the
in
wor 0,
the word reterenced
content ofthe by the virtual address
does not reside in main memO1
age fault' occurs if that page is needed in the main memory and it is needed to
Then
fetch
nage
that page
from
from the disk to the main memory to resume
further computation.
Diagram:
Page No. Line number
0 1
01 01 00 1 1
Virtual
Table address
address Presence
Dit
000
001 11
MBR
d) Static memory:
It
of internal flip-flops that store the binary information. Stored information
consists
remains valid as long as power is applied to the unit
satic memories, consisting of Static RAM chips are memories consisting of circuits
Capable of retaining their state as long as power is on.
Dynamic memory:
aynamic RAM loses its stored information in a very short time (a few
milliseconds)
Even though
the power supply is on.
is stored in a dynamic memory cell in the
form of charge on a capacitor and
Laon can be maintained only for a very few milliseconds.
As the charge on the
ge gets turned off after the
Citors leak away as a result of normal leakage, the capacitor
for a much longer time, the cell's
Con secConds. So, to retain the cell information
be periodically refreshed to restore the
capacitor charge to its full value.
st
CO-101
POPULARPUBLICATIONS
e) Paging:
Paging is a concept of transfer of pages between main
memory and an
ary
like the hard disk. So, in paging, relatively inactive pages are removedfrom store
for om
memory to make places for pages, which are needed by the memory for execution
phe
physi
instruction. For example, nowadays all Windows O.Ss come with built-inlon
ilt-inpagingof
ng
Page files are in megabytes, created during the WindowS XP installation fles
the hard drive. The actual size of the page fileis based on how much RAM isinstallet
amount
the computer. By default, XP creates a page file that is 1.5 times the amount ll
ofinstal
RAM and places it on the hard drive where XP is installed. stalet
COMPUTER ORGANISATION
CONTROL UNIT
Chapter at a ance
Au Instructie
Ai instruction Cycle consists
Instruction cycle: of one or multiple machine cycles.
Examl
A sequence of operations involved in
processing an instruction constitutes an
ction cycle. It has 2 major phases:
inst
ecle: during this phase instruction is obtained from the main memory.
ecution
(i)
cycle: this phase includes decoding
erforming the operation specified by
the instruction, fetching any requuc
operands,I the instruction's opcode.
Awired control unit: In a hardwired control
unit, all control signals are generated by
Haaf hardware using conventional simple logic
design techniques. Each step in nc
ence of control signals is executed in one clock period.
e hasic units of the hardwired control are: (a) A clock (b)
A counter (c) A decoder (d) An
encoder
ach micro program Comprises
Eac! or a sequence of micro operational
steps. Each micro
nerational steps comprise or one or more micro operations
and needs a number of control
signals to be activated. The control signals needed to execu each micro
operational step are
nenerated simultaneously. So, in each clock state a
micro operational step is performed i.e. in
ch clock state, the necessary control Signals are generated & the corresponding micro
each
operations are performed.
Micro-programmed control unit: This is a control unit whose binary variable (i.e. the
control functions that specities a microoperation) remains stored in memory i.e.
such type of
control unit is software (1.e., microinstruction) based.
Control Words:
Control words are words whose bits are used to control certain specified microoperations or
eneral' operations, These are basically string of 1's and 0's. Each of the bits in different
Cne
cotrol words generates different microoperations related to the instruction. Control words
,are generally stored within control memory.
Routine: Meaningful sequence of instructions is called a routine (or a program).
Microroutine: Microinstructions are stored in control memory in groups. Each of these
groups specifies a microroutine. So a meaningful sequence of microinstructions constitutes a
microroutine. Now the microinstructions within a microroutine must be sequenced and there
must be options of branching from one routine to another.
Microinstructions: Microinstruction is an instruction whose bits carry out a of
set
microoperations at the same time.
Microprogram: A meaningful sequence of microinstructions constitutes a microprogrant.
CO-103
PUBLICATIONS
POPULAR
example of NBUT
2. A UART is an ship 201
asynchronous data transmission
a) serial
b) PIO
controller
c) DMA
d).none of these
Answer: (8)
Control program
memory can be reduced by WBUT
3. b) Vertical format nicro-program201
a) Horizontal format d) None of these
c) Hardwired
control unit
Answer: (b)
WBUT
4. The cylinder in a disk pack
is
2018
a) collection of all tracks in a surface
b) logical view of same radius tracks on different surfaces of disks
c) collection of all sectors in a track
d) collection of all disks in the pack
Answer: (c)
CO-104
COMPUTER ORGANISATION
Answer:
Next address Control
Control
generator address Control data
Memory Control word
(Sequences) register register
(ROM)
|Instruction Starting
register (IR) address
generator PC: It is basically the CMAR
Control Store: It is the Control Memory.
The CMDR is not shown here, as it Is
optional
Clock
Cl APC
The rts of
the microprogrammed control unit are Control Memory Address Register
HAR), Next Address Generator(sequencer), Control Memory Data Register(CMDR),
(CMA
Control Memory.
CO-105
POPULAR PUBLICATIONS
Microinstruction. NBUT
3. Write short
note on 2017a
Answer: control Signals that must
stbe assermed
microinstruction defines a set of aatapath
Each means, we assert the control.
a microinstruction in
spedfie
given state. Executing
by that microinstructi0n. microinstruc
tructions
the control unit as a program composed of
Designing Is alle
"microprogramming.
have and
of fields a microinstruction should and which .
I |Opcode Address
Opcode
Address
FI F2
F3 CD
BR AD
Fig: Microinstruction code
format (20 bits)
CO-106
COMPUTER ORGANISATION
CO-107
PUBLICATIONS
POPULAR
Questions
Long Answer 1ype
memory read operation. WBUT
1. Draw time diagram for OR, 200
writing operations
of basic memory read and
Give the timing diagrams WBUT
200m
OR,
WBUT 2008,
diagram for memory write operation. 2011,201
Draw the time
Answer: signal is issued by the CPU clock ia mer
In synchronous data transfer the timing
the CPU clock. This type of data
oy
transfer occurs mainlv between
operates according to
CPU & main memory.
CLOCK
Address
Address
(from master
Read Status
Control (trom slave )
(Irom master)
Data
Data (from slave )
Steps:
sends the address of the
As shown in figure above, in the 1" clock period, (T1) CPU
memory location to be read, in the address bus.
At the same time (in T), CPU places 'read signal in the control line.
sends back the
On getting the "read' signal as well as the address from the CPU, memory
is because,
required data to the CPU via the data bus in the next (T,) clack period. This
tor une
there is sufficient delay in main memory in receiving the CPU signals, searching
the ne
required data and then placing the data in the data bus. So, data is sent back in
clock period.
to resyu
The 'status' signal is optional. It indicates whether the main memory is ready
to the CPU request or not.
So, only if the main memory is ready to response, it will place a 'status Signariu
the control bus on getting the CPU request. Then the main memory will place da data
the
main memory is not ready to response, it will not place the data u
on
Hence if the
bus.
CO-108
COMPUTER ORGANISATION
Memory W
Write (i.e. CPU writing to
the memory):
T
CLOCK
Address
Address
(from master)
Write
Control
(from master
Data Data
(from master)
Steps:
CPU sends 'address of the memory location to write,
in the 1s T-state (T).
CPU then sends the write' control signal.
eDI
after some delay, sends data to be written, in the next (T2) clock
period/T2 state.
. Drawand explain the instruction state cycle. WBUT 2013]
OR,
Fxolain the various phases of instruction cycle in a basic computer. [WBUT 2016]
OR,
Explain Instruction Cycle with suitable flow chart. WBUT 2018]
Answer:
The basic phases of an instruction cycle (generally it consists of instruction fetch cycle
and instruction execution cycle) are:
To fetch an instruction from the memory.
To decode the instruction.
fit is an indirect address instruction, then the effective address is to be read from the
memory (i.e. the operands needed to be fetched from the memory one by one).
To execute the instruction.
The first three phases constitute the instruction fetch cycle and the last phase is the
instruction execution cycle. On completion of step (d), the control again goes back to the
step (a) to repeat the same cycle for the next instruction. This continues until a HALT
instruction in encountered.
ne instruction cycle has got two main phases: the instruction fetch phase (this has three
Sub phases) and instruction execution phase. The flowchart shows the instruction cycle of
any processor.
CO-109
POPULAR PUBLICATIONS
Start
SC0
AR-PC.
T
IR-[AR], PC - PC+1
12
Decode operation code in IR (12-14)
AR-IR (0-11), I-
IR (15)
(Register or 1/0) 1
=0 (Memory reterence)
3 T T
Execute Execute AR-M[ AR] Nothing
Input- output Register- reference
Instruction Instruction
SC-0 SC-0
Execute
Memory-reference
Instruction
SC-0
CO-111
POPULAR PUBLICATIONS
2nd part:
(IR)
lnstuuction register
13 11 Other inputs
3 x8
decode
6513,21
Do
Combinational
D7 Control Conte
loaic snals
TL
tt14..
15 2 10
16
f decoder
Clear
4-bt Cloc
(SC COnte
COMPUTER ORGANISATION
BUS STRUCTURE
Chapterat a Glance
is a set of wires/cables designed to
Bus: A bus transfer all bits of a w-bit word from a
source to
to a specified destination.
specified The source & destination are ypically registers.
spe
So
s is a communication pathway connecting
two or more registers within the system
modules namely CPU, Memory, /O etc. A bus structure consists
or of a set of common
each bit of a register, through which binary information transferred
one is one bit at a time.
may be unidirectional 1.e. capable of transmitting
data in one direction only, or t ay
A bus
ectional i.e. capable of ansmitting data in both direction.
be
Register B Register CC
Register A
Register D
Date Lines
Bus
Address
Lines
JUL Control
Lines
1
Fig:
CO-113
PUBLICATIONS
POPULAR
some.
constructed with multiplexers has us disa
Tri-state buffer: Bus system connected by the bus, multiplexers cannot co
registers are support
If more number of registers (connected to the bus) draw some
me urTent that
Also as all
and voltages drop. the bus voltage drops and thusfrom
not transmitting at that time, the
even if they are thettans
becomes unreliable. tri-sto
these problems a device (or a digital circuit) called -state buffer
So to counter
exhibits three states, two inputs and
0, logic
one
I
output. The output can
and a high-impedance' state.
be in one
of is
thethree
stat
(signal values) namely, logic
4. The main purpose for using single Bus structure is [WBUT 2017
a) Fast data transfer
b) Cost effective connectivity and speed
c) Cost effective connectivity and ease of attaching peripheral devices
d) none of these
Answer: (c)
CO-114
COMPUTER ORGANISATION
Ansher
a)i)
Num of selection lines= 4 (as 216), since there are 16 registers.
The size of multiplexers will depend on the number of input lines, Number of data
lines = numb
mber of registers. Hence 16 data input lines must be there. So, the
input
multiplexers will be 16:1.
size of
The number of multiplexers needed to construct the bus
number of bits in each
register. Hence 32 multiplexers are needed.
modules I/Oetc.
Early microcomputer Dus systems were essentialy a passive backplane connected
irectly or through bufter amplifiers to the pins of the CPU. Memory and other devices
uOuld be added to the bus using the same address and data pins as the CPU itself
used,
comnected in parallel. Communication was controlled by the CPU, which had read and
CO-115
POPULAR PUBLICATIONS
Receive C
Receive
D.DD,D B D:DDD
CLK A D;D;D,Do
CLK B
CLK C DD.DD
Q:0.00 Q0:00 Q:0:010 CLK
D
O090
Bus line 0
Bus line 1
Bus line 2
Bus line 3
3. What is tri-state buffer? Construct a single line common bus system using t
state buffer. WBUT 2015
Answer:
1" part:
A tri-state gate is a digital circuit that exhibits three states out of which two
states are
normal signals equivalent to logic 1 and logic 0 similar to a conventional gate.
The third
state is a high-impedance state. The high-impedance state behaves like an open cireuit
which means that no output is produced though there is an input signal and does have
not
logic significance. The gate is controlled by one separate control input C. IfC is high the
gate behaves like a normal logic gate having output or 0. When C is low, the gate does
1
not product any output irrespective of the input values. The graphic symbol of a tri-state
buffer gate is shown in Fig. 1.
Normal input X Output Y = X ifC = 1
High-impedance if C =0
Control input C
Fig: 1
Graphic symbol for a tri-state buffer gate
2nd Part:
A common bus system with tri-state buffers is described in Fig. 2. The outputs of tour
buffers are connected together to form a single line of the bus. The control inputs to tne
buffers, which are generated by a common decoder, determine which of the four no
inputs will communicate with the common line of the bus. Note that only one buffer
ecoder
be in the active state at any given time. Because the selection lines So, Si of the dec
the
activate one of its output lines at a time and the output lines of the decoder ac a then
control lines to the buffers. For example, if select combination SSo is equal to u
CO-116
COMPUTER ORGANISATION
decod
oder will be activated,
output of the which then activates
and thus the bus line content will the top-most tri-st
hutler be currently Ao, 0th
bit of A register.
0 line of common bus
Bo
Co
Do -
Decoder
-to-
CO-117
POPULAR PUBLICATIONS
Answer:
The main memory size = 4096 blocks 2
Hence, the tag and set field combine will have 12 bits.
Each block consist of 128 words =2'words.
Hence, the word field length will be 7 bits.
Hence, total size of main memory in word length = 2x2 219
2nd Part:
Bus can be of 4 types,
Internal bus: This runs within the CPU. Internal bus connects all the registers within th
CPU.
T
B C
Internal Bus
External/ System bus: This runs outside the CPU i.e. the external bus connects all he
three subsystems (i.e. connects all the registers within the CPU,
Memory and I/O unit) or
a digital computer. This is a set of shared communication
lines via which the regisie
inside the Input-Output processors& the CPU share a
common access path to man
Memory registers.
CO-118
COMPUTER ORGANISATION
Memory
CPU 1/0
/O
SharedBus
are Several registers can
Here be connected via a single
common bus with the restriction that
anly one register can senu data at any time.
Co here
the number ot buses and thus the number
of cables required are much less. Cost
Cables required, hence, 1S much less. However, shared
buses do not permit
cintultaneous data transters between different pair
of registers, so this leads to a loss of
nerformance compared to dedicated buses. To implement shared buses,
more complicated
logic circuits are needed.
Dedicated Bus
It unique source and a unique destination i.e. within each pair of registers there is a
has a
pair of dedicated bus for both way transmission of information.
f 'n' registers are interconnected by buses in all possible ways, then the number of
dodicated buses required is 'n (n-1)'.
Here the number of wires required is more. The number of wires required however
varies
with the number
of registers to be connected. More the number of registers to be
Connected, more the number of wires needed.
As the
number of system components and thus the number of buses to be connected
ncreases, the number
of pin requirements and the cost of cables along with the cost of
complicated circuits also increases.
Here the simultaneous transfer of information between different pair of devices is
possible.
CO-119
POPULAR PUBLICATIONS
Register A
Register B
Register DD
Wires/cables
Register C
Functioning
The tri-state buffer has three output states namely
logic 0, logic 1 and a high-impedane
state. It has two inputs (figure a). The inputs
A (normal input) and C (control input)
ordinary binary signals that assume only the values
0 & 1; the output Y can assumi
it
values 0, 1& high-impedance.
The special input line C, called the 'output enable'
or 'control input' when set to figure 1
CO-120
COMPUTER ORGANISATION
Normal input A
Normal input A
-Y
Control input C
Y=A
(a) logic symbol
C-1
(b) close-circuit, when C is enabled
Inputs Output
A
Normal input A
0 0
Y high-impedance 1
state
0 0 Z
Control input
C0 0 Z
(c) open-circuit, when C is disabled (d) truth table
PUBLICATIONS
POPULAR
INPUT-OUTPUTORGANIZATION
Chapter at a Glance
com
Input-Output (VO) organization of a puter
Input-output organisation: The world i.e. with 0Vides
the computer and the outside help
mode of communication between The I/O devices that are attached ofthe
with the computer.
1/0 devices, users can interact to the
computer are also known as peripherals.
commonly used in a computer are:
Some of the I.O devices that are
Joystick, Scanner etc.
Input Devices: Keyboard, Mouse,
Output Devices: Printer, Monitor etc.
transfer occur between
Direct memory Access (DMA): In programmed /0 data ad
occurs between 1/0 devices and the
the peripherals. However in DMA, data transfer
only initiates the transfer by sunnio
unit without direct intervention by the CPU. CPU
is to be transferred and the number
starting address of the memory location from where data
of words (bytes) to be transferred.
DMA Controller:
Address bus
Address register
DMA select DS
Word count register
Internal bus
Register select RS
Bus grant BG
Interrupt: Interrupt is a signal from an L/O device to let the CPU know that it is reauy
this
transfer data and that it is requesting service fron the CPU. As soon as CPU recei
vice's
signal, it leaves its current unfinished task as it is and branches to the interrupting del
agaln
interrupt service routine and executes it to process the transfer. When finishea,
comes back to its unfinished task and continues with it.
CO-122
COMPUTER ORGANISATION
Differer types of
lnterrupts: There
Cyernal nterrupis: Such type are generally three types of interrupts, w
(a) m of interrupts may
from 1/0 devices when they are ready come from any exte xternal sources like,
atthe time of an event is over, it
to transfer
may occur due
data, from a timing devtcee signify
nternal Interrupis: Such type of to some power failures c
erroneous conaitions in interrupts, called
the program (i.e. traps, may occur due to som
program). illegal or erroneous
in the use of instructions o u
Software Interrupts: Such type
of interrupts
(9rooram
progr as an instruction by a programmer may be incorpora orated or embedded in the
instruction (interrup and are thus initiated by execu at
nstruction). So the programmer
interrupt procedure at any desired if want to initiate any sort
point in the program,
instruction at that point in the program. he may write an
n
ple of software interrupt is: INT 32
Examp
(say). On execution
control branches to the ISR of the number 32 of this interrupt 1nstructto
interrupt (i.e. 32 number
aVectored Interrupt: In this method, the interrupt line).
branch address (i.e. address
oned to a fixed location in the memory and
assign of the ISR) 1s always
location.
particular
the processor always branches to ae
Vectored Interrupt: In this method, the branch
the interrupting address (i.e. address of the ISR) is supplied by
I/O device itself and the processor
branches accordingly.
Pipelining: Pipelining is a technique of decomposing
a sequential task into subtasks, With
each subtasks, with each subtask being executed in
a special dedicated stage (segment) that
onerates concurrently with all other stages. Each
the way the task is partitioned.
stage performs partial processing dictated by
Result obtained from a stage is transferred
to the next stage in
the pipeline. The final result is obtained after the instruction
has passed through all the stages.
All stages are synchronized by a common
clock. Stages are pure combinational circuits
performing arithmetic or logic operations over the
data stream flowing through the pipe. The
stages are separated by high-speed interface latches (i.e., collection
of registers). Figure below
shows the pipeline concept with k stages.
L
S. S L
I/P *********
O/P
Clock
(L: Latch, S: ith stage)
Concept of pipelining
CO-123
POPULAR PUBLICATIONS
5. BIOS is
a) a collection of l/O driver programs WBUT 2013
b) part of OS to perform /O
operation
c) firmware consisting of l/O driver programs
d) a program to control one of
the l/O
peripherals
Answer: (6)
7. The contention
for the usage of a hardware device
a) structural hazard is called WBUT 201
c) deadlock b) stalk
Answer: (a) d) none of these
CO-124
COMPUTER ORGANISATION
MA transfer is initiated by
The WBUT 2019]
S Processor
a) devices b) The process being executed
c)/O d) OS
Answer: (c)
Short
Answer Type Questions
What are the different hazards in Pipeline?
1. OR, WBUT 2007, 2019]
Explain
lain
Pipelining and Hazards
WBUT 2017]
nswer:
line hazards are situations that prevent the next instruction in the instruction streai
PIpvecuting
executing duri
during its designated clock cycle.
from There are three types of pipeline
hazards:
i) Control hazards
i) Structural hazards
Data hazards
i)
Controlhazards: They arise from the pipelining of branches and other instructions that
content of program counter (PC) register.
han the
euctural hazards: Structural hazards occur when
Struc resource
a certain (memory
nctional unit) is requested by more than one instruction at the same time.
Data hazards: Inter-instruction dependencies may arise to prevent the sequential (in-
order) data flow in the pipeline, when successive instructions overlap their fetch, decode
and execution through pipeline processor. This situation due to inter-instruction
dependencies is called data hazard.
2. What are the different types of interrupt? Give examples. WBUT 2008]
Answer:
Refer to Chapter at a Glance.
CO-125
POPULAR PUBLICATIONS
2 Part: Non-Vectored
Interrupt
Vectored Interrupt
address (1.e.1. In this method, the hranaanch address
branch
1. In this method, the ISR) alwa
by the addresS of the is always
address of the ISR)
is supplied
assigned (
processor fixed location in the memory
to
interrupting /O device itself and the
processor always branches to that and
branches accordingly. thatparticiula
location.
2. The address of the service routine is
hard- 2. The address of the service
routiner
be supplied externally by the device
Wired.
4. a)Where does DMA mode of data transfer find its use? WBUT
2009,2014
Answer:
In interrupt-driven I/O (as well programmed /0) transfer of data between memory
an 1/0 module takes place with the active intervention of the CPU. The sDeeda
data transfer is often limited by the speed with which the CPU services a vice.
transfer of small volume of data such CPU intervention (and thus limited speed |
transfer) is ok, but transfer of large volume of data via the CPU takes a lot timo
of
while transfer of large volume of data between memory and I/O module by DMA h
I/0 method, CPU is removed from the path (CPU only initiates the transfer)
flows very fast directly between the memory and the concerned I/O module(s) and lata t
with
VO device managing the memory buses. e
Also during interrupt-driven I/0 method, CPU, along with handling
busy handling other tasks. This to some extent
/O tasks, is alta
hampers the 1/O transfer rate. Howeyer
with DMA based I/O method nothing of that sort occurs.
Hence in the above two circumstances DMA mode of
data transfer find its use.
b) What are the different types of DMA controller and how
functioning?
do they differ in their
[WBUT 2009, 2010, 2012, 2014
Answer:
There are three types of DMA controller:
(i) Cycle Stealing DMA, (ii) Burst Mode DMA,
(iii) Flyby DMA.
Their functioning:
() Cycle Stealing DMA:
In this mechanism, DMA
controller transfers le
control of the bus to the CPU. Then word at a time and then returns tne
again after a CPU cycle, the control comes
the DMA controller, which again backu
send one word, and gives
CPU. This carries on until back the bus control to
the entire block of
virtually 'steals' one memory data is transferred. So, DMA Ua
in between every CPU
cycle.
(ii) Burst Mode DMA:
Burst Mode DMA, in
contrast, generally
addresses can take transfers assumes that the destination SOurce
as fast as the controller a
up the controller, and can generate them. The 1Ses
then (perhaps after
the entire source block is a single ready indication prou
copied to the destination. from a poelsive
The DMA controller gains
CO-126
COMPUTER ORGANISATION
the bus for the duration of the
CCESS
Sshut do
transfer, during
efectively down. Burst mode DMA which time the program
whi is
can transfer data
very rapidly indeea.
DMA:
Flyby
gi) DMA, somnething
mething that is not supported
on many controllers,
The MA Controller gains access to the is a beast of a difierei
color Then, bus and puts the sourc
urce or destination
en, it initiates what iS in
addressout. etfect a read and
read from the source address, a write cycle simultaneousiy
Tiheda and written to the destination,
nlies that either the sOurce or
implies destination does not at1the same time.
This
ely that both would use the same. require an address, since it 1s
very An example might
o a FIFO port the source address (a be copyingg data from
mem pointer to memory) increments on eac
hile the destination is always the same FIFO. Flyby
read/write cycle pair iS transactions are very Tast
Since the reuced to a single cycle. Both burst and
synchronous
es of transfers can be supported.
What
Ihat are differences between Serial and Parallel
i. transmission? [WBUT 2012]
MSwer:
rial transmission, bits are sent sequentially on the
same channel (wire) which reduces
for wire but also slows the speed of transmission. Also,
for serial transmission,
come Overhead time is neeaea since bits must be assembled and sent as a unit and then
disassembled at the receiver.
In parallel transmission, muitiple bits (usually 8 bits or a byte/character) are sent
simultaneously on difterent channels (wires, frequency channels) within
the same cable,
radio path, and synchronized to a clock. Parallel devices have a wider data bus than
serial devices and can therefore transfer data in words
of one or more bytes at a time. As
result, there is a speedup in parallel transmission bit rate over serial transmission bit
Interrupt-initiated I/OO
Medium
in speed.
Medium
cost.
Slightly
complicated.
PU cycle is
not wasted.
CO-127
POPULAR PUBLICATIONS
Interrupt request
INT
CPU
Daisy-Chain Diagram
CO-128
COMPUTER ORGANISATION
CO-130
COMPUTER ORGANISATION
are and hardware means are used
(d) to solve the problem
software-based schemes. also. Methods an
The snoopy-cache 0
protocol uses the hardwar
based schemes.
2 How
does polling work?
[WBUT 2012]
Answer:
Alihing the priority of simultaneous interrupts can be
Establ
done by software or hardware.
alling procedure is used to identify the highest priority source by software means. n
method there is one common branch address for all interrupts.
Theprogram that
takes
s of interrupts begins at the branch address and
care
polls the interrupt sources in
ence. The order in which they are tested determines
seq
The
the priority of each interrupt
highest priority source is tested first, and if its interrupt
signal is on, control branches
service routine for this source. Otherwise, the
next-lower-priority source is tested,
and
so on. Thus the initial service routine for all interrupts consists
of a program that tests
the interrupt sources in sequence and branches to one of many possible
service routines.
The particular service routine reached belongs to the highest priority
device among all
devices that interrupted the computer. The disadvantage of the software
method is that if
here are many interrupts, the time required to poll them can exceed the time available to
service the /O device. In this situation a hardware priority-interrupt
unit can be used to
speed up the operation.
1. a) Give the main reason why DMA based /O is better in some circumstances
than interrupt driven l/O. WBUT 2007]
Answer:
In
interrupt-driven I/O (as well programmed I/0) transfer of data between memory and
an
O module takes place with the active intervention of the CPU. The speed of such
data
transfer is often limited by the speed with which the CPU services a device. For
tansfer of small volume of data such CPU intervention (and thus limited speed of data
tasfer) is ok, but transfer of large volume of data via the CPU takes a lot of time. So
hile transfer of large volume data between memory and /O module by DMA based
of
0 method, CPU is
removed from the path (CPU only initiates the transfer) and data
lows very
fast directly between the memory and the concerned l/O module(s) with the
device managing the memory buses.
during interrupt-driven 1/0 method, CPU, along with handling I/O tasks, is also
ndling other tasks. This to some extent hampers the 1/0 transfer rate. However
DMA based 1/O method nothing of that sort occurs.
CO-131
PUBLICATIONS
POPULAR
is better than into
above two reasons DMA based l/O method P-di
Hence for the
large volume of data between memory andnd I/o module.
/O iven
I/O method while transfer of
Steps:
(a) An 1/0 device when ready to transfer data to the memory, it sends a DMA reguee.
the DMA controller it is attached to.
(b) On getting the request, the DMA controller enables the BR line to request the CPI
releasethe bus.
(c) Now two cases will arise:
BG 0 means buses are still not released by CPU and CPU will communicate wit
the DMA controller. CPU writes (with the help of the WR line of the DMA
controller) into DMA address register the initial address of the memory location from
where data is to be transferred, CPU writes the number of words to be transfeed
into the DMA word count register, CPU specifies the mode of control whether read'
or 'write'. Also CPU reads the status of the DMA controller through the RD 1ine
means that CPU has granted the DMA controller's request
BG=I of releasing the
bus and responds by enabling the bus grant line. The bus is now free and DMA
controller can now control them.
(d) Now the bus is under the control of the DMA controller. CPU now opts out of the
transfer and carries on with other tasks.
RD WR Address
Data
RD WR Address Data
Read Control
Write Control
Data Bus
Address Bus
Address
Select
RD WR Address Data
DS
Direct memory DMA acknowledge
RS access controller
I/0
BR (DMA) Peripheral
BG DMA request Device
Interrupt
CO-134
COMPUTER ORGANISATION
Exp different hazards in
6 a) vector interrupts? pipelining.
How are WBUT 2015]
interrupts? they used in
teruesDeedup, throughput implemenoLT hardware
20151
What is and efficiency WBUT 2015]
e) of a pipelined architecture
Answer: WBUT 2015, 2018]
erto Question No. 10 ofShort Answer
Type Questions.
vectored interrupt 1/0 method,
b)in a inforr
ormation (i.e., the source device
the starting address that interrupts, supplies the
branch
CPU. This
information is called of interrupt
the interrupt vector,
service routine (ISR) to the
location. which is not any fixed memory
To impl
ment interrupts, the CPU uses
a signal, known
the interrupt handler as an interrupt request est (INTR)
signal to or controller hardware,
ce at can issue an interrupt to it. Here, which is connected
cted to each 1/0
en that
interrupt controller
hehalf of I/O devices. Typically, interrun
ealy, interrupt controller
is
makes liaison with the
also assigned an interrupt
acknowledge (INTA)TA) line that the CPU uses to
signal the controller
and begun to process the interrupt request by that it has received
below employing an ISR. The following
shows the hardware lines for implementing figure
interrupts.
CPU
INTA
INTR
Interrupt controller
IMR
Device Device 2
1.
Interrupt from interrupt controller when data transfer is needed.
2. Using IE flip-flop, CPU detects interrupt.
3. CPU branches to a respective device's ISR after enabling INTA.
Ite
interrupt controller uses a register called interrupt-request mask register (IMR) to
ec any interrupt from the /0 devices. If there is n number of I/0 devices in the
em, then IMR is n-bit. register and each bit indicates the states of one I/O device. Let
MR
Content be
denoted as E,E,E. When E, =I then device 0 interrupt is
g1zed; When E 1, then device interrupt is recognized and so on. The processor
1
tlag bit known as interrupt enable (1E) in its states register (SR) to process the
upt. When this flag bit is 1', the CPU responds to the presence of interrupt by
it NA line; otherwise not. When the INTA is accepted by a device, device puts
Nn interrupt vector address (VAD) to the data bus using interrupt controller
CO-135
POPULAR PUBLICATIONS
S =nkr
kr+(n-1)r
nk
k+(n-1)
E,
k+(n-1)
Obviously, the efficiency approaches when n0,
1
and a lower bound on E, is 1/k
when n =1. The pipeline throughput H, is defined as the number of tasks (operations
performed per unit time:
k(-1)k+(n-1)
The maximum throughput
=
f occurs when E>1 as no.
Note that H, E, f=E,/T=S, /k
7. a) What are the hazards of instruction pipelining? How are these taken care of
b) Explain the Strobe Control method of Asynchronous data transfer. What are tne
disadvantages of this method?
oWhatdo you understand by the term Program Interrupt ? Explain with the2016 helo
of suitable diagrams. WBUT
Answer:
a) Structural Hazards
vare
Structural hazards occur when two instructions in a pipeline need the same
naha
resource at the same time. Structural hazards can be avoided by stalling, duplicating
resource, or pipelining the resource.
For example, suppose the processor only has a single port to memory usea 10 h data
or
and instructions. Then there is a structural hazard between the MEM phase o load fime
store instruction and the IF phase of the instruction that needs to be fetched at that TwO
This hazard can be avoided by either stalling the instruction fetch or by nav
CO-136
COMPUTER ORGANISATION
y rts. Most modern processors
e oives them two memory ports. have
YC separate
Separate data and instruction
eftect, giv caches which,
addition, real processors nave some
long latency instructions
execution step cannot be completed in a Cney instructions- instructions whose
modified multipiy single cycle. One
circuitry, example is an integer multiply.
WIions without stalling the second. you cannot handle two successt
instruction.
ssive multiply
ith
with long latency
Todeal units, instructions, the
execute circuitry
onal each handling a small Circuitry is generally divided up into
func number
nits can he
pipelined by adding of similar instructions. These functiona
pipeline registers.
nsiructhoils very cycle. This lets you start long latency
Control Hazards
Control Hazards occur when conditional
branches interfere
Pireh The problem is that it is not with instr
struction fetches ina
known whether
taken until some time after the cycle for fetching or not a conditional branch will be
targetaddress needs to be computedift the next instruction.
branch is taken. Also, the branch
control hazard could
c be handled
A by stalling the
significant impact on performance, next instruction fetch.
a
especially in tight However that has
dmuch of their time. A common technique loops, where many pro programs
ntrol hazards is speciiattve for reducing the stalis associated
and
execufion guess whether with
nd fetch the next instruction or not the branch will
based on the guess. be taken
ables containing intormation To do this, the machine
about recent branches: needs two
,A branch history table records bits
about recent branch history,
a branch was taken. T that is, whether or not
he processor uses these
will be taken. bits to guess whether or not a branch
.A branch target table holds target addresses for recent branches.
the time needed to
determine the branch target address. This table reduces
Speculative execution
also requires a mechanism for
executed based on backing out of instructions
incorrect guesses and resuming
sequence execution of the correct instruction
b) Strobe Control Technique A single control line is used by the strobe control
merl
asynchronous data transfer to time each transfer. The strobe may be activated
the source of the destination unit. A source-initiated transter is depicted in figure y either
below. The source takes care of proper timing delay between the actual data sipnai(Ist)
the strobe signal. The source places the data first, and after some delay, and
generates t
strobe to inform about the data on the data bus. Betore removing the data,
the SOurce
removes the data. By these two leading and traiing end delays, the
system ensures
reliable data transfer.
Similarly, the destination can initiate data transfer by sending a strobe
signal to the source
unit as shown in figure(2) below. In response, the source unit places data
on the dath
bus. After receiving data, the destination unit removes the strobe signal. Only
after
sensing the removal of the strobe signal, the source removes the data from the data bus.
The disadvantage of the strobe method is that the source unit that initiates
the transfer
cannot know whether the destination unit has actually received the data item what was
placed in the bus. Similarly, a destination unit that that initiates
the transfer cannot know
whether the source unit has actually placed the data o the bus.
)
Source Destination
unit
unit
(a) Block diagram
Data bus
-Valid data
Strobe
(b) Timing diagram
Fig 1: Source-initiated strobe for data
transfer
CO-138
COMPUTER ORGANISATION
Strobe
Valid data
Data bus
(b) Timing diagram
Fig 2: Destination initiated
strobe for data transfer
CO-139
POPULAR PUBLICATIONS
Interrupt handler
User program
Interrupt
Occurs here i+l
2" part:
Consider a k' segment pipeline with clock cycle time as Tp. Let there
be 'n' tasks to he
to take 'k cvcles
completed in the pipelined processor. Now, the first instruction is going
will take only 1' cycle each.
tocome out of the pipeline but the other 'n -1 instructions in a pipelined
ie., a total of 'n -1 cycles. So, time taken to execute 'n instructions
processor:
ETpipeline
=ktn-l cycles Tp
(k +n-1)
instructions will be:
In the same case, for a non-pipelined processor, execution time of 'n
ETnon-pipelinen *k Tp'
*
When the number of tasks 'n' are significantly larger than k, that is, n >K
S n*k/n
S=k
where 'k are the number of stages in the pipeline.
CO-140
COMPUTER ORGANISATION
Data accepted
Fig:
1
(a)
CO-141
POPULAR PUBLICATIONS
Data valid
Data valid
Data bus
Fig: 2 (b)
Valid data
CO-142
COMPUTER ORGANISATION
hazards:
Pipeline wont hazards
differ (problems) that
The
lelay its normal cause an instruction pipeline deviate rom its
or delay
peration
conflicts
operation are
the following: to
Resource
ResO
Such
rds are caused wnen two segments
oth instruction and data are tries to access memory
simultaneou
SupPon is fetched and in stored in the same memory
instruction another segment data and in one segment
So this
ll
wil lead to resource contlict. Using separate
is fetched from the memory y at a time.
problem. instruction and data mer can
solve this memories
Hardware interlocks
Interlock is a circuit, which further delays the instruction that is stalled (for non-
availability of results) thus resolving the conflict.
Operand forwarding
This method after detecting the conflict by means of special hardware, avoids it by
routing the data through special paths within the pipeline segments.
Delayed load
In such technique, compilers detect the data hazards and handle them accordingly.
CO-143
POPULAR PUBLICATIONS
Branch difficulties
Such conflicts occur from branch
instructions or other such instruction changing
instruction (both conditiona and uncond
change the PC value. The branch .
that
normal sequence of flow of instruction stream and thus instructionnal)
ction brealk
the pipeline
difficulties in operation. fao
Loop buffer
This very small register file placed in the fetch segment, stores any
detected rogram
loop, which can be executed directly if needed. If the buffer
is large enough to contain all
the instructions required in a loop, then those instructions
need to be fetched fro
memory only once, for the first iteration. So it is very effective
for loops and called lao
buffer.
d) Instruction Pipeline:
We know that an instruction execution
cycle may consist of many operations like, re
instruction, decode instruction, fetch
operands, execute instruction, and write-back
result into memory. These operations
of the instruction execution cycle can be
u
through the pipelining concept. realli
Each of these operations
Each operation may require forms one stage of a Pip
one or more clock periods
instruction type, processor and to execute, depenaing nthe
memory architectures 1on
ofthe operations through the pipeline provides used. The overlapping ofexc
Thus, the pipeline used
for instruction cycle nomal execution
a speedup over the normal
A typical instruction pipeline operations is known as rpeline
is shown in figure instrucuo (
fetches instructions from
memory, presumably struction fetch stage
below. The instr
stage (1D) resolves one per cycle. The instru ction-deco
the instruction function performed an
identifies the operands like, add or subtract,
needed. The operand etc., to be pernoaes
fetch stage'(OF) fetches oper
the
CO-144
ORGANISATION
COMPUTER
CO-145
POPULAR PUBLICATIONS
Start 1/0
routine
Got /O port B
status register
End
vi Instruction cycle is
b) fetch-execution-decode
a) fetch-decode-execution
d) none of these
) decode-fetch-execution
Group-B
(Short Answer Type Questions)
a line common bus system using tri
usina tri-state
2.a) What is tri-state buffer? Construct single buffer
b) What are guard bits?
STRUCTURE, Short Answer Type Question No. 3.
a)'See Topic: BUS
b) See Topic: COMPUTER ARITHMATIC, Short Answer Type Question No. 3,
5. Evaluate the following arthmetic expression into three-address, two-address, one adts
address instruction format. X = (4+B)*C
See Topic: INSTRUCTION SET, Short Answer Type Question No. 1.
6. a) Explain the difference between full associative and direct mapped cache memoy ma
nappng
approaches.
b) What are "write back' and "write through" policies in cache?
a) See Topic: MEMORY ORGANIZATION, Long Answer Type Question No. 1(b).
b) See Topic: MEMORY ORGANIZATION, Long Answer Type Question No. 1(a).
Group-C
(Long Answer Type Questions)
7. a) Suppose register A holds the 8-bit number 11011101.
Determine the sequence of binary
values in A after an arithmetic shift-right, followed by a circular shift-right
and followed by a logica
shift-left. 3
b) Describe Booth's multiplication method and use this to multiply
decimal numbers -23 and 9.
c) Suppose we are given RAM chips each of
size 256 4. Design a 2K x 8 RAM system using ths
x
chip as the building block. Draw a net logic diagram
of your implementation.
a) &b) See Topic: COMPUTER ARITHMATIC, Long
Answer Type Question No. 9.
c) See Topic: MEMORY ORGANIZATION,
Short Answer Type Question
No. 8.
CO-148
COMPUTER ORGANISATION
( Explain
in thei
the basic DMA operations for transfer of data between memory and peripherals
c) Topic: CONTRO UNIT, Long Answer Type
See Question No. 3.
a)
See Topic: BUS STRUCTURE, Short Answer Type Question No. 4.
Topic: INPUT-OUTPUT ORGANIZATION, Long Answer Type Questipn No. 3(b).
Se
Explain different hazards in pipelining.
11. a)
H What are vector interrupts? How are they used in implementing hardware interrupts?
c)What is speedup, througnput and efficiency of a pipelined architecture?
Se Topic: INPUT-OUTPUT ORGANIZATION, Long Answer Type Question No.6.
QUESTION 2016
Group-A
(Multiple Choice Type Questions)
1. Choose the correct alternatives for the
following
RAM) when
) RAM is called DRAM (Dynamic
a) it is always moving around data
b) is requires periodic refreshing
d) none of these
) it can do several things simultaneously
CO-149
POPULAR PUBLICATIONS
aa reserved
special
portion main memory used to save important data
memory on
of
d) area of the chip that is used to save frequently used data
c)
includes many processing units under the supervision of a common
control unit
d) none of these
i) (2FAOC)16
a) (195084)10
b) (00101111101000001100)2
c) Both (a) and (b)
d) None of these
Group-B
(Short Answer Type Questions)
2. Explain indirect address
mode. How is the effective
See Topic: INSTRUCTION address calculated in this case
SET, Short Answer Type
Question No. 7.
CO-150
COMPUTER ORGANISATION
Combinational
comb
Design a
COM
na 4-bit circuit decrementer
PIITER ARITHMATIC, using four full adders.
3 Topic: Long Answer Type
See Question No. 4{D)
computer has common
digital computer has a bus system for i
muitiplexers 16 registers of 32 bits eacn. The bus
ructed with
selectio
ction inputs are there in
How many each multiplexer?
Ho many multiplexers are there in the bus?
i) 21S STRUCTURI
STRUCTURE, Short Answer
Topic: BUS Type Question No. 4.
See
Group-C
(Long Answer Type Questions)
1.a) A computer uses a memory unit with 256 Kwords of 32 bits each: A binary instruction code is
rad in one word of memory. Ihe instruction has four parts: an indirect bit, an operatiorn code, a
register code part to specity one of 64 registers, and an address part
0 How many bits are there in the operation code, the register code part, and the address
part?
Draw the instruction word format and indicate the number of bits in each part
) How many bits are there in the data and address inputs of the memory?
b) Use restoring method to divide 10100011
by 1011.
c Suppose we are given RAM chips each of size 256x4. Design a 2Kx8 RAM system using this
chip as he building block. Draw a net logic diagram of your implementation.
in a basic computer.
Explain the various phases of instruction cycle
) What is Von Neumann bottleneck? How can this be
reduced
CO-151
POPULARPuBLICATIONSs
11. a) What are the hazards of instruction pipelining? How are these taken care
of?
b) Explain the Strobe Control method of Asynchronous
data transfer. What are the disadvantages
of this method?
c) What do you understand by the term Program
Interrupt ? Explain with the help of suitable
diagrams.
See Topic: INPUT-OUTPUT ORGANIZATION, Long
Answer Type Question No. 7.
QUESTION 2017
Group-A
(Multiple Choice 'Type Questions)
1. Choose the correct alternatives
for any ten of the following:
)The main purpose for using single Bus structure is
a) Fast data transfer
b) Cost effective connectivity
and speed
c) Cost effective connectivity and ease of attaching
peripheral devices
d) none of these
CO-152
. Sgenera
aenerally used to increase the
. Secondary memoy
a)
c)
Harddisk
b) Virtual memory
d) Disks
COMPUTER ORGANISATION
When perfor
Derforming a looping operation, the instruction gets stored in the
v Registers b) Cache c) System heap d) System stack
a)
of
MIn a normal n-bit adder, to find out if arn overflow has occurred, we make use
b) NAND gate c) NOR gate d) XOR gate
a) AND gate
by CPU we use
To get the physical address from the logical address generated
c) Overlays d) TLB
a) MAR b) MMU
B
Group-
Questions)
(Short Answer Type representation.
standard format for floating point number
henyexplain the IEEE 754 IEEE single preciSIon format.
the decimal value (-7.5) in
esent COMPUTER ARITHMETIC, Short Answer Type
Question No. 4(a).
hsopie:
bj See Short Answer Type Question No.
16.
COMPUTER ARITHMETIC,
C
CO-153
POPULAR PUBLICATIONS
4 What is the difference between carry look ahead adder and ripple carry adder? Explain
of operating system ina computer system. heroe
" Part: See Topic: COMPUTER ARITHMETIC, Short Auswer Type Question No. Is
2 dpart: Se Topic: INTRODUCTION, Short Answer Type Question No. 3.
Group-C
(Long Answer Type Questions)
7. a) Present the Booth's algorithm for multiplication of signed 2s complement number in a flow
a
chart and explain.
b) Multiply(-12) and (+6), using Booth's mutiplication algorithm.
c) Divide(-15) by (-3) using Restoring & Non-restoring Division algorithm.
a) Sce Topic: COMPUTER ARITLMETIC, Long Answer Type Question No. 1.
b) See Topic: COMPUTER ARITHMETIC, Short Answer Type Question No. 7.
c) See Topic: COMPUTER ARITHMETIC, Long Answer Type Question No. 10.
8. Discuss in detailthe various factors that need to be considered while designing the ISA
fa
processor. Compare and contrast of RISC and CISC architecture.
1" part: See Topic: INSTRUCTION SET, Long Answer Type Question No. 4.
2d part: See Topic: INSTRUCTION SET, Short Answer Type Question No. 3.
See Topic: INPUT-OUTPUT ORGANIZATION, Long Answer Type Question No. 3(b).
CO-154
COMPUTER ORGANISATION
See
b)See
To
.
Con re importance.of a common
b)Explain the
c)
systembus?
.INSTRUCTION
e)1pa.t: See
2
part: See
Topic:
Topic
BUS
IS STRUCTURE,
bus system in a computer. Why l/O bus is different from a
c)
Instruction pipelining
Concept of programmed /O
d)
e) Bus organization
using tri-state
NSTRUCTION
Topic: INST SET, Long Answer.Type Question No. 5(a).
a) See Topic:
See MEMORY ORGANIZATiON, Long Answer Type Question No. 20(d).
b)S
e) See
Topic: PUT-OUTPUT ORGANIZATION,Long Answer Type Question No. 9(d).
See Topic: INPUT-OUTPUT ORGANIZATION, Long Answer Type Question No. 9(e).
el See Topic:
BUS STRUCTURE, Long Answer Type Question No. 2.
QUESTION 2018
Group-A
(Multiple Choice Type Questions)
1.Choose the correct alternatives of the
foliowing:
i) Instruction cycle is
b) fetch-execution-decode
a) fetch-decode-execution
c) decode-fetch-execution d) decode-execution-fetch
CO-155
PUBLICATIONS
POPULAR
disk pack is
vi) The cylinder in a
all tracks in a surface
a) collection of surfaces of disks
logical view of same radius tracks on different
b)
collection of all sectors a
in track
c)
d) collection of all
disks in the pack
Group-B
(Short Answer Type Questions)
2. Multiply decimal number (-17) and (-9) using Booth's muitiplication method with step
y step
explanation.
See Topie: COMPUTER ARITHMETIC, Short Answer Type Question No. 17.
Group-C
(Long Answer Type Questions)
7. a) Explain the basic
block diagram of interface
circuits with them?
Computer System. Why do peripheras ned
set-associative
tive cache consists of a total
DIOCk of 64 blocks divided into 4 blocks sets. The
contains 4096 blocks, each consisting
) A men
nemory of 128 words.
man many bits are there in a main memory address?
oW many bits are there in each of the TAG, SET and
Word fields?
How STRUCTURE, Short Answer Type
i) BUS Question No. 5.
opic
See
write through and write back' policies in cache memory?
Whatare ORGANIZATIO
ORGANIZATION, Long Answer Type Question No. 1(a).
c) Topic:MEMORY
See
QUESTION 2019
Group- A
(Multiple Choice Type Questions)
following
1
Choose the correct alternatives for any ten of the
uSually in
) A source program is
b) Machine level language
a) Assembly language
d) Natural language
c) High-level language
i) In straight binary code, N-bits or N binary digits can represent.. different values
iv) The addressing mode, where you directly specífy the operand value is
a) Immediate b) Direct c) Definite d) Relative
CO-158
COMPUTER ORGANISATION
usaa
for the usage of a hardware device is called
contention
sian
Group C
(Long Answer Type Questions)
6. Write short notes on the following:
a) Resorting Division Algorithm
b) Direct Memory Access
c) double precision format
JEEE
a) See Topic: COMPUTER ARITHMETIC, Long Answer
Type Question No. 12(g).
by See
Topie: INPUT-OUTPUT ORGANIZATION, Long
Answer Type Question No. 9().
J See Topie: COMPUTER ARITHMETIC, Long Answer
Type Question No. 12(h).
a) See Topic: MEMORY ORGANIZATION, Long Answer Tlype Question No. 1(hic .1b)
b) See Topic: MEMORY ORGANIZATION, Long Answer Type Question No. 1(al
(" Part)
ary
16.
c) See Topic MEMORY ORGANIZATiON, Short Answer Type Question No.
8. a) What is the difference between isolated l/O and memory mapped /0?
b) Explain Cache Coherence
c)Explain the different hazards in pipelining
a) Sce Topic: INPUT-OUTPUT ORGANIZATION, Long Answer Type Question No. 4
b) See Topic: INPUT-OUTPUT ORGANIZATION, Short Answer Type Question No. 12
e) See Topic: INPUT-OUTPUT ORGANIZATION, Short Answer TypeQuestion No.1.