Professional Documents
Culture Documents
Name Ashish Pa
Rollno 90750l6
Branch CSE CBTech 9rd gear)
CSuy)
To achually speak o elechonic hendware, we neecd
to send eluchic as sanal, me eas/es 8lqnal Fobr
So
Comp ule8 te undlorstand are on and ' s f
Compdey undershand only bnary numben, 1Binary
representaion of machin inshuehonr is khown
Cay Machine Languge"
Now to make easy to wmite inshuchor
Fer a poram mev, High vel proamming Languag
Such ay C/ch Jaua, were clesrgicd
Sleps to transtam a proqam Cnshuchons writen in q
hiqh -uvel dangua Such cu Cinto medhin Lenguaa
ave aufollous
O Cenvexdion of tgh uel Jangua to Ass embly
Rangua pro9Ydm 3-
pmoqvam wlien
Pn Clanguage is Covn veileol
Swap"
below-
to casembly Langutg proqnam cy
Swap o
muli 9 2, S y O0000000 lol Oo0100000ool ool0o
00000ooloo000 I Occ OOcOlco
aad , u $2 TOOOLIOLIOoooo00Oo000000O00|
Assemblevlooo OOoo10000o000000i0o|
2l00u I000 lOol o00oO0O0O0O000
lw I6, u(¢) looIolioo10000OOO000010o
Oo000o0IIo oO00OoO0O0OI0o0
Sw 16, OC{)
Sw IS, uC$)
)r 3
Ashish Pactsd 1907sol6 PaùeNo-4
ao-2)
Civen se conc
Co mpudeY A runa a progrum n O
Same proqrum
n Sse cOrcly
Com puteY B runs
U
hoo different
CDandto relai he perfasmane o
when we w e he phraue
Computv quanbit ahvely
A TS n times faster han B mean
we me an
per tormancA) n
Per formaneCB)
be gven as-
So, tomay, our problem can
aten_3-
Exechon Time ot Computer A= 0s
To fTod
Per formame A)
Perfevmane B)
No , we Say a computr perfoms btler than ale
CompdeY 7 i} akes Lu taimt to compLul tesks
Ashish Patu 901sol6 Paac-No-S
So to maximine pertormane we wam to minimize
Tponse ttme oY ekecuion time for some task,
Mathemadhcally per tormane and execuhon ime toy
CompuyX are relatud
a
hollow 3-
Pertormavnce Cx) =
Ex eculon time X) -O
wThe -
wing eq-D we Can
T5
ng e - e-
Pertomnave 1:5
Pertor mane )
taler than
Hence Copuier A 's-5 tirmu
Compufer B.
Pall 19095Ol6 Page No 36
Suy-3)
afven Ccode-
7espective
$si holds bue address ot aay D
Codi fs u tollows 3 -
bo = O
0 O
O
addi to, $0, J u n p to
labe CHECET
be
be 0 , o, CH ECKT
O
LOO PT addi gtt 0,
$0,CHeCkJ F Jump to Label CHECET
bety $O,
bet # t 3 = $to t$t2
LOOPJ add t 3 t o , 4I
slIt2 t3, $t2 1 s2
t2=
add t 2 t 2 , $S
add
Sw$ta G+2)
dddt $t t1,
CHECKJ slt t2, t t $si
bneta O , LooPJ
sl ## $to= f44
0 , 4 So, 2
ad d to, ¢s6,¢+0 # to- 2Af]
add F $ti 9.
sli t , $SI, 2
#
add t , S7,$t # f ALFJ
lw so o (3to) o ovgicu
addi ,dto, 4 # ¢t2= 2A LA+U, hew f u
vau not u pdatW
add $ , $o, fo
t ¢si= Mem Aray
Loop l lw s1, oC¢co)
ad d s 2 , s , $SI
mem ruy t+
addt so, so, y t
addt , s t , L i f Clcoo) then sedst2=1o
slt ta, $t, loo (fb»# emere u )jump
*#
bne ta, so, Loop tt JoopP.
for Ctrd i = o t t
f CC< lo)= =Cind&ph.
breae
Tesute prS
phr t+
Ashish Pab. 190SO/6 Page ro -9
Quo-6)
Cten- OK2000 Ocoo
to haldu he valw
Thshudhione -
Slt 4t2, $o, dto ($to>a), sdtt=l ele sbl-o
ELSE # f ($ta== brarh to lauel ELsE
ey t2, $o,
be,
DONE +jumpt DoNG
ElSE add t2,$t, 2 $t2= $tt2
DONG