Decode
Decode
Introduction to
11 Computer Architecture
computer some
t 1s a programmable
that takes in input, performs
device
desired output.
arithmetic and logical operations over
it and produces
which
device on a chip
in simple words, microprocessor is a digital
a
them and give
decode and execute
can fetch instructions from memory,
Tesults. understand
However, to
ideal microprocessor.
here is nothing like an
have introduced this hypothetical
we
unction of the microprocessor
tne
device.
Fig. Q.1.1 shows an
Output
ideal microprocessor P Microprocessor device
Input
with n inputs and m device
outputs.
Input signals are
(11- 1)
Digital Electronics and Logie Deslgn 11-2 Logle Deslgn
a n dLogtc 1-3 Introducton to
ComputeIrntrArchl
oductteloctnure
o elal
Electronics Computer Architecture
Address
bus
Interconnection structure
Fig. Q.4.1
Students
A Guide for Engineering
OIcODE
A Guide
for
Engineering Studen's
11-
Inrodacti
Comer Archikertre
T
bes
E de iroupieig af address and àata
23
o asaress and cata b s
C111 D e t p i e x g
Fg
(ALEsi ie
e ts Address Lsteh Enabie
xi
Susias
Engneeing
Garie or
andLogleDesign I1.7
Ngd ElmomÁs and lege vvmksa
Dsan 11-6
ComputerIntrAroductchiteloctnureto
Dunng the first
phase ot machine cyele,
ComputerInirAroducchittelcson 11.31 Microprocessor Based
mulipleva Jare
address and data bus and the address is Systems Basic Operation
latehes the aidress AL E
sent byymiroprwessor signal is pt on
In the
remaining part of the
utput of the lateh remains machine cycle, inc
at
yc ALE signnl
the
output af the actatch.
ivated principle
unehanged. na his timeis multiple- This a eh e
the two components of:a microprocessor based
address and data bus is
Q.12 What is the
used as a data bus. During this
need of bus drivers
ime disslableded so microprocessor based
Ans: Bus
drivers, buffers are used to
the miervprocessor buses. inerease the
exed multiplexed ApsiA microp
rdWare a
software. The
GSOT
fware
based system
hardware
two has
is the principle components
Q.13 What
drivino e i c e s ,a n dt h e
is the
collection of and circuitry
physical
is DMA and DMA to
the hardware get the desired
p e r a l e st h eh a r
programs which controls
Ans.: To
increase the speed of
controller? output. and
the hardware data transfer lectronic components
used in the
Direct Memory controlled VO
Access (DMA). The
is used. It is between mem.
mory and VO,
whole, are refered to as hardware. microprocessor
based system, as
ransfer is commonly refa
commonly known as DMA hardware which controle nd loo 1 7Draw and explain the block
diagram of simple
Q.14
Explain the function
controller. controls his dat haSed system.
microprocessor
Ans. The
DMA
of DMA controller. ata ia
ADs. Fig. O.17.1 shows the block
to
initiate data controller sends a HOLD YStem. The major diagram of a simple
microprocessor
sends HLDA transfer. In response to signal to the the microprocessor components of microprocessor
based
signal HOLD micron. ocessing Unit (CPU), memory based are Central
and control as an
buses to the DMAacknowledgement signal,
and release micron.
and input and output
cireuitry or 10
ports
Then the data controller. essor These components
withour the transfer is controlled at high
of
microprocessor based are connected using three
intervention of the
controller sends speed by the ces parallel lines called buses. The three buses
of
low on microprocessor.
address and control the HOLD pin, which After data transfer,
DMA Cont
ontDM
roller
data bus and control bus. are address bus,
the current
acknowledging (INTA) (Interrupt instruction andresponse. device Memory
interrupt by
the
request of the Acknowledge), output control sends
interrupting
routine. This transíering the
program
device. It then line,
completion of intermupt
it was
service routine
the task, it
interrupted.
control
performs
to
the
an
services
interrupt
the
service
Address bus
retums control to desire task and Fig. Q.17.1 Block diagram of microprocessor based system
the main after
program at the point Central Processing
Unit ( CPU): Central Processing Unit is a
OECODE and is often referred as Microprocessor
microprocessor
Unit (MPU). Its
11-9 Introduction to
Diginel
coded
instruchons from
memory, decode the Computer Architecture
is to fetch
binary is program ?
ntrol signals
required to execute
control What
purpose the a10
and generate
letched
instnuctions
contains an hmetic Logic
Anth
Unit Program is a series of
the instructions.
The CPU
subtract, OR,
AND, ID, invert and
exchusiveU) (ALUu s.
.
instructions that can be
operations on binary words.
perfom add,
The CPU also contains a program cou erform
a pecified task. executed in order to
which can
perlornm
- OR
p COnsider a
ot the next
xt inct us Co
simple task to
which is used to
hold the
address
instruction nter
Let
of understand the
register
memory, general
purpose registers wh or
which are usedata
omponents a
microprocessor. The task functioning of the
to be fetched from involves following three
for temporary storage of binary
data, and circuitry which which generates used
the operations
AA
primary functhon efa maroprocessor 1s to execute
sevral registers
o
stratos sored &
memory. which is extem te sequen Control unit
rocess The sequenc ot operatuons ence
ction comsttutes a mtucbon cycle.
imvolved in to the
nal data bus is used
21 ritt a nete ot
instrectioa cycle.
processi
cessing an dvnces.
to transmit data between
these logic
A The coepiete mstructiom
decede ssé esecution cycle involves thr
three operations Fe
Fetch Data bus
Fetch
acoprocessor sends the address of the Instruction
Temp
Macoprocessor also scnds memory Tead ruction to the meme register Generai
signal to mory
purpose
mory contro
rol regsters
Macroprocessor reats insruction byte
enable Instruction
a a bas (opcode)
places 1 in the Instructio sent from ALU
Cecoder
cproewr
mstruu
ieis te opÓE oi the
s decTmine which instruction stored in he Fig. Q.22.1 Simplified block diagram of
microprocessor
a
operation is to be Q23 Write a note on ALU.
ISPPU: June-22, Marks 6
Mrouun
es elrs te
speciied operation. This
Ans.One of the microprocessor s major logie devices is
logic unit (ALC) It contains the microprocessors data processing logc. It
the anithmetic
wd tha are
op art
ompiement the data wond nstructions tell the
microprocessor
t to legK , and all important that thes
exactly how to solve a
Taie
the e bit ii
f s instructions must be
smc of te funtns of der to get the corTect result. This executed in a
perfiomed
ed the sequence of instruction
by the
by
ALU n.Onitofed by the progam counter.It
monitored
AND
in
most is s being used and what the next instructionkeeps track of which
will be.
OR untet gives the address of
F r O g r tc o u n t e r
SRet
inCremeat Exclusive OR next
instruction
is to be fetched.
decides the
Due to this
the length of
counter maximum program the
2
abile Q231
Last the basic Functions pertormed by ALU
Decrement microprocessor that has 16 bit
program
length in bytes. For
registers of
T A m p l e ,
is a
ecoD series important Auxiliary Carry : The auviliary curny' bt of status register is set when
of
instructions registers
stored in ne
the
in an addition in the first bits causes a cary into the fifth bit. This is
A
Guide for
Engineering Students OECOD
A Guide for Engineering Students
cs and Logk Design I1-15
-1 ComputeIntroduction
r Architectureto
hen refemed
haf cRo intermedhate
a CommputermerArcht
educteloctnurto t is
stack pointer ?
ACD anthmetc cay
This is FO (last in, first
stackis
a
implemented
most
represent sgn and remaning bits signif holds the address of the top location and data. The
magnitadc of aamber used ificant bi is of the stack Sack
register
are
This ag 5 set if the to
ter
persbon toc large te fit result ot a what is instruction decoder?
Sbt mumer) 1e
represent it
in the number of bits available a signe
ble
Tepresent
(7-bits fot
For
example. It decodes the opcode from instruction
decamai)
if
vou add the S-bit signed oded output. This decoded is
register
output
and generates
the
and the S-bi
signed number used by control
resut will e 10101100( 172 10 (5401110 0 (+118
number 00110110 n t r o lsignals. logic to generate
decimal),
result but in thus case it 1s too
magnitude n an S-bit signed number.
which is
large to fit in the the
1-bits
decimal).
The
ct binary
What is the function
g34 What of control
logie ?
ths The
operation to ndicate that the result overfloOw flag will allowed for The control logic is a important block in the
nto the of the the ADs
30 What is microprocessor.
microprocessor power-up sequence. It also processes inteTupts
general purpose
memory address Q.35 What is subroutine ? Explain the use of stack and stack
Ans. The register ?
pointer in the execution of subroutine program.
memory address
microprocessoOT wantsregister
hat the
gives the address Ans.: The instructions must be executed in a proper order to get the
holds 16-bit to use.
That is, of memory location
binary
drives the 16-bit number. The memory address
corect result. This does not mean that every instruction must follow the
address bus. Thisoutput of the memory address register last instruction in the memory. But it must
follow the logical sequence of
location output is used to register the instructions.
select a part of a program that is not
in
Q.31 What is memory In some situations, it is better to execute
instruction register? sequence (don't confuse with logical sequence) wth the
main program.
Students
CECODE A Guidefor Engineering
ORCODE
Digital Electromia and Logic Design i1-16
Like the
pointer. 27FD C Cn P propogate output
Ag An Ay Ap AAz Ay A B, B B, B
74LS181 74LS181
ALU) M M (ALU,)
PGFF F, Fo SoS PG
FFa F Fo
TTTTT SorS3
Mode
control
Select lineS
C, (Cu)
output of ALU,
cary of one stage is
the
propagated to next stage. Theinput
gives final carry.C
of
n -
4
Q.41 Show how
the circuit
for following operations. designed in the
previous example works
1. A B 2. A + B 3. A
and B =
44. XOR B 4. A AND B
Assume : A =
56
Ans.: A = 561 0011 1000, and B 4510 =
=
0010 1100,
Substraction
0 0 1
o 1 10 o B Addition
1
10 10 0 1 ********"******T*****************"***
1 1 1
1
1's comploment of B Carry
1 10 1 Add 1 0: *****....
01
11 0 0 0 A
1 0 1 0 0 2s complement of B 0 0:1: 01 1
0 0 B
****
01 1o 0 1 00
1 1 1 ***- ******..
*******
Result
:0 0 1 Carry
11 0
lgnore 1 10 10 1 0 0 A
0 O0 91 0 0 7s
complement of B
10 0i Result
A Guide for
Engineering Students OrCOD
XOR oporation AND operation
1 1 0 0 o A
o 0 1
AND
XOR
00 10 1 1 0 0 B o 10 1 1 0 B
01 0 0 Resut 00 1 0 1 00 0 Resuit
0 0 0 1
(ALU,) (ALU)
Mode
Select inputs
Output
Control
A B S B S Binary
M
S,S5,
1000 1J00 0100 0001 0100
0011 0010 0001
3. A XOR B
o9
E
gal
Elecnonlcsan. Logic Desigm 11-25 Introductlonto
Computer Architecture
Digial Elamomix end Legi* Desisa ComyputerInroduction
Architectureto 4-bit multiplier andmultiplicand
3 Steps 1 and are repested n ames to get the desired result nnsider
Start
B
C.A0
1101
Initial Values
S Multiplicand A
QMutiplier
Count n 1011
0
1 1 0 1 101 1 Add First cycle
Shift
0 011 0 11 0
No Yes 1 00 1 1 110 1 Add Second cycle
11 1 0 Shift
Q12 100 1
0 10 0 1 11 10 No Ado Third cycle
11 1
Shit
C.A A+B 0100
0 0 0 1 1 1 1 1 Add Fourth cycie
111 1 Shit
10 0 0
Finai Product
Shift right C,
A and Q Q.42.3 Multiplication
process
Fig.
Count Count 1
11.8:Memory Organization
address ?
Q.43 What is memory
memory is
No Each register in the
Ans. Memories are
made up of register: 1denutied by an address
called
Count=07? storage
location. Each
location is
one
memory address.
unit.
diagram of
memory
Yes the block
unit. The n data
Q.44 Explain block diagram memory of
shows the the k address
Stop Ans.: Fig. Q44.1
to be stored in memory
and
intormation
available. The
the the many
provide word chosen among
Fig. Q.42.2 Flowchart for lines
the particilar direction transfer.
multiplication operation lines specify and wnte) specify the
Let us see one control input
RW(read
example.
Students
A Guide for Engineering
OrcOD (OECODa
A Guide
for Engineering Studens
11 - 27
Introduction to
ctronics and Logic Design
I1-26 Introduction
Computer Architectureto Dgltul
Computer Architecture
Digiral Electronics and Logic Design
4-Bit Data inputs
Bi-directiona
Data lines
Memory Input
buffers
Address 2
lines n-bit words
Memory Location0
RW Memory Location 1 MW
Read/Write Memory LOcation 2
control
4:16
Decoder
MR
CS
(Chip Select) A Memory Location 14
Memory Location 15 AND2 AND1
of memory unit
Fig. Q.44.1 Block diagram
Output ChipSelect
bufrers (CS)
.When R/W signal is HIGH, read operation is activated and data bus will
to perform
steps
Give the
are
address lines and operation
16 decoder is used to decode the contents on Q.47 read bus.
The 4 : memory
on the address
locations. to perforn1 to be
read
select one of the sixteen possible memory Ans. Steps location
bus.
address
of the the controi
on
the signal
T w o AND gates circuitry controlled by (RD) (WR) ,
and (CS)control 1. Place
the
memory
read
control
(RD) and
Note that, here Activate bus. read cycle.
Signals Is used to active read write operation. the d a t a
2. terminate the
from to
the data control signal
cycle.
(WR) are the two separate signals. 3.
Read
memory
read
for memory
read
the diagram
to be De-activate
the timing
to the operation
Input and output buffers are enabled according 4.
Draw
and explain diagram for read
cycle.
enabled and for memory timing
performed. For nmemory Write input buffers
Q.48 the
are shows
Q.48.l
read output butfers are enabled. Fig.
Ans.:
Students
Engineering
Guide for
Introductionto
11-29 Computer Architecture
and Logic Design
ComputerIntroduction
Electronics
n to al
Digital Electronies and Logic Design 1- 28
Architecture from Read: It is the maximum time delay
.Output tri-state
1 'OTD (RD) goes HIGH (end of read pulse) and the output bufers
-Rc- after
impedance state.
to high
Valid address going It is the minimum time
for which the valid
Address Time :
Data Hold the address ends.
A OHA available on the data output after
Chip Select (CS)
data is memory write
operation.
the steps to perform
a49 Give follows:
-fco- oHA Write operation are as
RD to perform memory address bus.
Read (RD) Steps written on the
Ans. location to be
the address of the
1. Place written on the
data bus.
RDX lOTO- be
the data to bus.
2. Place signal on the control
write control
Data output Valid data
X 3. Activate the memory
write control signal to terminate the write
Logic
1 -lcx De-activate the memory
Wnte (WR) 1 4.
write cycle.
cycle. for memory
the timing diagram
and explain
Q.50 Draw
Fig. Q.48.1 Read cycle timing waveform shows the
wite cycle for memory.
Ans. Fig. Q.50.1
The timing diagram is drawn on the basis of different timing
parameters. These are as follows:
1. tpc : Read Cycle Time : It is the minimum time for which an address Address AW
must be held stable on the address bus, in read cycle.
2. t Address Access Time : It is the maximum Chip Select (CS)
specified time within
which a valid new data is available on the data bus after an address is
applied Write (WR)
3.
tRD Read Output Valid Time: It is the maximum time delay
to
after (RD) goes LOW (beginning of read Data valid
pulse) and the availability of
valid data on the data bus.
Using this timing paraneter we can specity Data input
the maximum rate at which data can be read.
Logic 1
4
RDX Read to Output Active Time: lt is the minimum time delay Read (RD)1
timing
waveform
timing
p . i r a m e t e r
b E c O D E
Digital Electronics and Logic Design il - 30
roduction to
ComputerIntArchitecture
2. : Address Valid to End of Write :
tAW It iss the time
time at
address must be applied on the address bus before WR
goes hich
which
3. : It is the time high.
twR Write Recovery Time
address
for which addres
remain on
address bus after WR goes high. will
4. tAS Address Setup Time : When address is applied, it isis the
after which WR can be made low. time
5. :
tcw Chip Selection to the End of Write : It is the time at
the CS must be made low to select the device before
WR goes hiwhich
6. w Write Pulse Width : It is
the time for which WR
goes low
7.
tnw: Data Valid to the End of Write : It is the minimum
which data must be valid on the data bus before WR time ffor
goes high.
8. tn : Data Hold Time : It is the
time for which data must
valid after WR goes high. be held
END...