Download Exam 1 with Answer - Advanced Digital Computer Design | ECEN 3213 and more Exams Electrical and Electronics Engineering in PDF only on Docsity! mM ECENM &€2273 AGvanced Bigrtal &©ompotar wpestign ”™
ECEN 37213
Spring ‘05
Exam 1
WRITE YOUR NAME BERE Ansa
. All questions must be answered on test paper!
Open Book, Open Notes
1. (25 pts) Write 6811 complete assembly code for the following peeudo-code
A=O;
B=];
loop:
C=A+B;
if(C> 0) {
A=B;
B=C;
} else {
A=-B;
B=4;
Bo to loop; :
where A, B, C ate signed single byte variables, If reset occurs, the program abould start at
“shart”. ; : a
omy 0 “loop tte A false “ldh B
A 4s 4 nash
in ds { ayia, & ot stb 4
cas lt. are Cc nije
o fds es gle false st &
i b
Stott ldo. te [ke fs rm loop
1ab *) Sip A Gr PPR E
sta A fda PB dw sheet
sh 8 bra Jap
ECEN 3213 Spring *05 Baan E Fobraary 16, 2005
pegs of
® ECEN S253 Advaneced Digital Computer Dasign &
2. (10 ple) Convert the piven marers from unsigns binary 10 decimal
aldli- Zr. +Et4UAt = of
poloi= pet ¥ + zel oA]
3. (10 pts) Convert the giver: numbers from decimal to unsigned binary.
aim@=jtooliO We i
sto
. “ho 6
| is o
tme tr!
b.2i= {fag peri -te £0
3 9
ad \
'
i '
4, (00 pr) Convert the given numbers from S-bt signed binary to signed decimal
allele ~12¥ + 32 44241 =~ GF
pouoiio= tp + tut etHs?2 = po
5. (10 pts) Convert the given numbers from signed decimal to 8-bit signed binary.
a= [f 401070 st iho
- . Zt oO b& 2?
-obemMlom . 14 0 aye
7 o ive
= a
b.io= CLL, oo 31 24
tot 2 1
i bol
t
6, (10 pts) Convent the given nambers from binary to hexadecimal.
aooldia= 2c
b. 1oigriogstioni= AC o F
7. (10 pts) Convert the given oumbers from hexadecimal to binary.
a5S= GloOlelol
bBAO= f{ILg Coll loLoseod
BCEN 2213 Spring. ‘05 Exam 1 Pebramry 16,2005 pege2afi