Qa Odel Notes Microprocessor Systems 1.
Qa Odel Notes Microprocessor Systems 1.
CHUKITECHNI
CALTRAI
NINGI
NSTI
TUTE
ODELMI
CROPROCESSORSYSTEMS
DESCRI
PTI
ONOFORGANI
SATI
ONOFDATAREGI
STERS
RECARPOFTHECOMPUTERPRI
NCI
PLES
a)Dat
aisr
awf
actandf
igur
esort
heyar
enewf
act
sthatar
emeani
ngl
esst
o
t
heuserandcannotbeusedt
omakedeci
sione.
g.number
s,l
ett
erset
c.
b)Pr
ocessi
ngi
stheactofconv
ert
ingdat
aint
oinf
ormat
ionorr
efer
stot
he
waydat
aismani
pul
atedt
otur
nint
oinf
ormat
ione.
g.ar
it
hmet
icoper
ati
on,
addi
ti
onsubt
ract
ionet
c.
c)I
nfor
mat
ionr
efer
stodat
awhi
chhasbeenpr
ocessed.
d)Acomput
eri
sanel
ect
roni
cdev
icet
hataccept
sdat
a,pr
ocessesi
tand
gi
vest
her
esul
tst
otheuser
-Acomput
eri
sanel
ect
roni
cdev
icet
hataccept
suseri
nput(
dat
a)and
t
ransmi
ssi
onsi
tunderi
nfl
uenceofset
sofspeci
ali
nst
ruct
ions(
Progr
am)
t
opr
oducedesi
redout
put(
Inf
ormat
ion)
-
Anel
ect
roni
cmachi
net
hatt
akesi
ndat
a(f
act
s)i
nther
awf
orm,
pr
ocessest
hedat
atogi
veouti
nanot
herf
orm cal
l
edi
nfor
mat
ion”
.
e)Pr
ogr
am i
saser
iesofi
nst
ruct
ionswr
it
teni
nthel
anguageoft
he
comput
erf
ort
hem t
oobeyandper
for
m speci
fi
ctasksasout
li
nedbyt
he
i
nst
ruct
ion.
f
) Or
gani
zingdat
aforpr
ocessi
ng–t
ogetqual
i
tyr
esul
ts(
inf
ormat
ion)y
ou
musthav
equal
i
tydat
atost
artwi
th.Unr
eli
abl
eor
igi
nal
dat
agener
ates
unr
eli
abl
eresul
ts.I
fyougi
veacomput
ergar
bage,
yougetgar
bagei
n
r
etur
n.I
tiscal
l
edGI
GO–Gar
bageI
n–Gar
bageOut
.
g) I
nfor
mat
ionPr
ocessi
ngCy
cle-I
nfor
mat
ionPr
ocessi
ngCy
clei
ncl
udesa
ser
iesofst
epsf
ort
ransf
ormi
ngdat
aint
omeani
ngf
uli
nfor
mat
ionf
or
peopl
e.
h) Acy
clei
sdef
inedasasequenceofact
ivi
ti
esper
for
medi
nanor
dert
hati
t
pr
oducesexpect
edandmeani
ngf
ulr
esul
ts.
i
) Mi
cropr
ocessori
sani
ntegr
atedci
rcui
tthatcont
ainsal
lthef
unct
ionsofa
cent
ral
processi
nguni
tofacomput
er.Al
so,
iti
sani
ntegr
atedci
rcui
t
cont
ainedonasi
ngl
esi
l
iconchi
p.
j
) Mi
cropr
ocessorsy
stem ormi
crocont
rol
leri
sasi
ngl
epr
ocessorbl
ocki
s
i
nchar
geofal
li
nput
,out
put
,cal
cul
ati
onsandcont
rol
.
k)Mi
crocomput
eri
sthesmal
l
est
,cheapestandl
eastpower
ful
typeof
comput
erswi
thmi
cropr
ocessori
nit
.
l
) Har
dwar
econsi
stsoft
het
angi
blepar
tofmechani
cal
,el
ect
ri
cal
and
el
ect
roni
cpar
tofacomput
er.
m)Sof
twar
eiti
sasetofcomput
erpr
ogr
amst
hatgui
dest
hecomput
eri
n
eachandev
eryact
ivi
tyt
hathappensi
nsi
det
hecomput
erdur
ingdat
a
pr
ocessi
ng.
-
Itr
efer
stot
hev
ari
ouspr
ogr
amsanddat
ausedi
nacomput
ersy
stem t
hat
enabl
eitper
for
m anumberofspeci
fi
cfunct
ions.
n)Li
vewar
eref
erst
ouser
swhoar
ecomput
erknowl
edgeandhencecan
pr
oper
lyut
il
izet
hecomput
erhar
dwar
eandsof
twar
e.
o) Takeawayquest
ion
Def
inet
het
ermsor
gwar
eandf
ir
mwar
e.
Asecr
etar
y’sof
fi
ceat
Mi
chukiTechni
calTr
aini
ng
I
nst
it
ute
COMPUTERPRI
NCI
PLES
I
NTRODUCTI
ON
1.Def
inet
hef
oll
owi
ng
i
. Comput
er
i
i
. Mi
crocomput
er
i
i
i. Mi
cropr
ocessor
i
v. Mi
crocont
rol
l
er
Adigit
alcomput erutil
i
zesv eryhighspeedexecutionateachmachi
nei
nstr
uct
ioni
na
gi
vensequencecal ledapr ogram.
Thecomput erfetchesani nstr
uctionfrom memoryandthenexecut
est
hisi
nst
ruct
ioni
n
agivensystem.
Acomput erhast hr
eeki ndsofoper ati
onint
ernal
l
y;
a)St oresthepr ogram inst
ructions
b)Dat
amani
pul
ati
on
c)Changesi
tsoper
ati
ondependi
ngondat
a
Thecomput
eroper
atesi
nbi
nar
ydat
asy
stem (
0’sand1’
s)
MI
CROCOMPUTERARCHI
TECTURE
Asi
mpl
if
iedbl
ockdi
agr
am
THEMI
CROPROCESSOR
Thesi
mpl
i
fiedv
iewofmi
cropr
ocessorasshownabov
e.
NB:Thebusconnect
sthemi
cropr
ocessort
oit
smemor
yandt
oit
sI/
Odev
iceswhi
ch
ar
eusedt
ocommuni
cat
ewi
tht
heout
sidewor
ld.
1.REGI
STER
Thi
sisat
empor
arydat
ast
oragel
ocat
edwi
thi
nthemi
cropr
ocessorwhose
cont
ent
smaybemov
edormani
pul
ateddur
ingeachmachi
necy
cle.
TYPESOFREGI
STERS
a)Pr
ogr
am Count
er(
PC)
Apr
ogr
am t
hathasbeendevel
opedf
orapar
ti
cul
art
ask.I
tisl
oadedi
ntoa
memor
yandist
henexecut
ed.
Torememberwhichprogram i
nstructionist
obeexecut ednext
,the
pr
ocessorusesaregi
stercal
l
edt hepr ogram count
er(PC).ThePC
i
denti
fytheaddr
essofthenextinstructi
ontobef et
chedandexecuted.
b)Accumul
ator
I
tisusedext
ensi
vel
yfordat
amani
pul
ati
ont
hati
saddi
ti
on,
subt
ract
ion,
ANDing,
ORing,
etc.
c)Fl
agRegi
ster(
F)/St
atus
I
tcont
ainsv
ari
ousbi
tsofst
atusi
nfor
mat
ion.
d)I
nst
ruct
ionRegi
ster(
IR)
Iti
susedasthedesti
nat
ionoftheinst
ruct
iondur
ingthefet
chcycl
e.The
IRcont
aintheoper
ati
oncode(Op-code)ofthei
nstr
ucti
oncurr
entl
yunder
execut
ion.
e)St
ackPoi
nter(
SP)Regi
ster
Iti
sspeci
alsetofr
egi
sterwhi
chisarr
angedi
nagi
venar
ray
.Thi
sper
for
m
eit
herPUSHingorPOPi
nginst
ruct
ion.
f
) Memor
yAddressRegi
ster
-Thisregi
stercont
ainst
headdressoftheplace
t
heCPUwantstoworkwit
hint hemainmemor y.I
tisdi
rect
lyconnect
edto
t
heRAM chi
psonthemotherboard.
g) Memor
yBufferRegi
ster(
MBR)-
Thi
sregi
stercont
ainst
hedat
aawai
ti
ng
tobepr
ocessedbytheCPU.
Ot
herRegi
ster
s
Theyi
ncl
ude:
-
i
. Tempor
aryr
egi
ster
i
i
. St
oreaddr
essr
egi
ster
2.ARI
THMETI
CANDLOGI
CUNI
T(ALU)
TheALU,ti
mingandcont
rolbl
ocks,f
ormst hecentr
alcont
rolfeatur
esofthe
computersy
stem.Thear
it
hmeticoperat
ionscontai
nsaddit
ion,subtr
act
ion,
i
ncrementanddecr
ementwhil
elogi
coper ati
onshasAND,OR, NOT, NAND,XOR,
etc.
3.TI
MINGANDCONTROL
I
trefer
stoacompl exsetofl
ogi
cfunct
ionst
hatsy
nchr
oni
zet
omachi
neand
di
rectvar
iousoper
ations.
4.THEBUSSTRUCTURE
Busisasetofconduct
ors(
wir
eorli
ne)overwhi
chdat
a,addr
ess,
cont
rol
signal
oranyot
herinf
ormati
oncanbetr
ansmit
ted.
Ther
ear
ethr
eet
ypesofbusest
hati
sdat
abus,
addr
essbusandcont
rol
bus.
I
. Dat
abus/
li
ne
Theyar
eusedt
ocar
rydat
aandi
nst
ruct
ionsf
rom oneuni
ttoanot
her
.
I
I. Addr
essbus/
li
ne
Areusedt
ocarr
yaddr
esswordf r
om wher
ethedat
aist
obest
oredor
readf
rom i
nagiv
enspeci
fi
clocati
on.
I
II
. Cont
rolbus
Usedtot
ransmi
tof
fti
mingandcont
rol
signal
forco-
ordi
nat
ingdat
a
t
ransf
ers.
5.MEMORI
ES
Cl
assi
fi
cat
ionofmemor
y
Memori
esar
eusedt
ost
orei
nfor
mat
ion,
progr
ams,
dat
a,r
esul
tsorot
herki
ndof
i
nfor
mati
on.
Mai
nmemoryissuppl
ementedbyl
esscost
lysecondar
y,auxi
l
iar
yorbacki
ng
memor
yforst
oragepur
poses.
Ther
ear
etwoki
ndsofmemor
yusedi
nmoder
ncomput
ers;
Semi
conduct
ormemor
y
Magnet
icmemor
y
Semi
conduct
ormemor
y(Pr
imar
ymemor
y)
I
tist
hemai
nmemor
yoft
hecomput
er
Char
act
eri
sti
cs
Fast
er
Compact
Li
ght
er
Consumesl
esspower
St
ati
c
Nor
otat
ingpar
ts
Magnet
ic(
Secondar
y)memor
y
Theyar
eusedt
ost
orei
nfor
mat
ionbef
ore,
dur
ingandaf
tert
hedat
aispr
ocessed.
Char
act
eri
sti
cs
Sl
owcompar
edt
osemi
conduct
ormemor
y
Cheaper
Notst
ati
c
Hav
erot
ati
ngpar
tsegdi
scort
ape
NB:RAM andROM ar
eusedast
hemai
nmemor
y
TERMI
NOLOGI
ES
1.Bi
t-i
sabi
nar
ydi
git0or1.
2.Ni
bbl
e-agr
oupoff
ourbi
ts
3.By
te–agr
oupofei
ghtbi
tsort
woni
bbl
es.
4.Word–agroupofbitsi
namemor ythatcontai
nsi
nfor
mat
ionordat
aofsome
t
ype.I
tcanbe8-
bit
s,16-
bit
s,32-
bit
s,64-
bit
s,et
c
5.Cel
l–adev
iceorel
ect
ri
cal
cir
cui
tthatcanst
oreasi
ngl
ebi
t.
6.Regi
ster–adevi
ceconsi
sti
nganumberoff
li
pfl
op(
lat
ches)gr
oupedt
oget
her
andcapabl
eofst
ori
ngabinarywor
d.
7.Capaci
ty–I
tisawayofspeci
fyi
nghowmanybi
tscanbest
oredi
napar
ti
cul
ar
memorydev
ice.
Memor
ycapaci
tyi
sexpr
essedasm xn,
wher
e
mi
snumberofwor
d
ni
snumberofbi
tsperwor
d(wor
dsi
ze)
Exampl
e1
Cal
cul
atet
hecapaci
tyof2kx8memor
ychi
p.
Sol
uti
on
Capaci
ty=numberofwor
dxwor
dused
Numberofwor
d=2x1024=2048
Wor
dsi
ze=8
Capaci
ty=2048x8=19384bi
ts
NB:1K=1024
STANDARDUNI
TOFMEASURI
NGCOMPUTERSTORAGECAPACI
TY
Thi
sincludestheuni
tofmeasur i
ngComputerSt
orageCapacityandsizeoff
il
eor
fol
der.Bitisasmall
estunitofmeasuri
ngcomputerstor
agecapacit
yandsizeof
i
nformation.Thecomputerstor
esinf
ormati
onasast r
ingofzeros(
0)andones
(1)
Aby t
econsi
stsofei
ghtbit
sandisequal
stoonecharact
er.Achar
act
eri
sa
l
ett
er,number
,orsymbol-iti
saboutany
thi
ngthatcanbety
pedonakeyboar
d.
Akil
obyte(
KB)consi
stsof1024by
tes,
appr
oxi
mat
ely1,
000by
tes.1KBi
s
about140wor
ds
Amegabyte(MB)consi
stsof1024kil
obytes.Onemegabyt
eequalsabout
1000KBandequalsabout1,000,
000byt
es.Onemegabyteequal
sabout
500pagesoft
extoronelargebook
Agigabyte(GB)consi
stsof1024megabytesapproxi
matel
y1,000,
000,
000
by
tes.Onegigabyt
eequalsabout1000MB, about1,
000,
000KBorabout
1,
000,000,
000bytes.Onegigaby
teequal
sov er1,
000booksoftext
St
orage
Capaci
tyMeasur
ement
1.1By
te=8Bi
ts 2.1Char
act
er=1By
te 3.1Ki
l
oby
te(
KB)=1024By
tes
4.1Ki
l
oby
te=1024Char
act
er 5.1Megaby
tes(
MB)=1024KB
6.1Gi
gaby
tes(
GB)=1024MB 7.1Ter
aby
tes(
TB)=1024GB
8.1Pet
aby
tes(
PB)=1024Ter
aby
tes
Exampl
e2
Cal
cul
atet
hecapaci
tyof4kx20memor
ychi
p.
Capaci
ty=numberofwor
dxnumberofbi
tsperwor
d
=4x1024x20=81920bi
ts
Exampl
e3
Thememor
yhas3kx4.Fi
nd;
i
. Wor
dsi
ze
i
i
. Capaci
ty
Sol
uti
on
i
. Wor
dsi
ze=4
i
i. Capaci
ty=3x1024x4=3072x4=12288bi
ts
8.Addr
ess–I ti
sthenumberthatuniquel
yidenti
fythel
ocat
ionofawor di
na
memory.Eachwordstor
edinamemor ymusthav euni
queaddressspeci
fiedas
bi
nar
ynumber sal
thoughoct
al,hexadeci
mal ordeci
malar
econv eni
entuse.
Addr
ess Cont
ent
0000 Wor
d0
0001 Wor
d1
0010 Wor
d2
0011 Wor
d3
0100 Wor
d4
0101 Wor
d5
0110 Wor
d6
0111 Wor
d7