EE319K Spring 2011 Exam 1A
Solution
Page 1
Jonathan W. Valvano
February 25, 2011
2:00pm2:50pm
(4) Question 1.
The basis elements are 1000=27, 0100=9, 0010=3, and 0001=1* 27+2*9+0*3+1=46
(3) Question 2.
Answer true/false for each of the following three statements
Part a)
False, Flash EEPROM memory on the 9S12 is nonvolatile.
Part b)
True, the order in which I add the numbers does affect the final value of the carry bit.
Part c)
True, dropout error can occur on a logical right shift (e.g.,
lsra
). Overflow can occur.
(4) Question 3.
Consider
ldab #100
subb #50
Convert to signed (done), Subtract two signed 100  50 is 150. Does not fit, so V=1.
Convert to unsigned 100 = 100+256 = 156. Subtract unsigned 15650 is 106. This fits, so C=0.
(4) Question 4.
What is the binary representation of 8bit signed number 10?
Method 1) +10 is 8+2 or 00001010. Negative is 2’s complement. Complement 1111,0101, then add 1.
11110110
Method 2) Look at basis elements, need 128,64,32,16,4,2, so
11110110
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '08
 BARD
 Binary numeral system, RTS, Jonathan W. Valvano, bset PTT, Check ldaa PTT

Click to edit the document details