Documentos de Académico
Documentos de Profesional
Documentos de Cultura
(100) Solution
1. Consider the following numbers as signed. Find their equivalent
representations: (3*11=33)
a. 011011012 = 155 8 = 6D 16 = 109 10
b. B716 = 10110111 2 = -73 10
c. 111010112 = 353 8
d. 25310 = FD 16 = 011111101 2
e. 0x5C = 01011100 2
f. 0xED = -19 10
g. 10210 = 01100110 2
3. a. Write the instruction(s) to add the contents of R6 to R7 and place the results
in R1. (5)
b. Write the instruction(s) to subtract 19 from the contents of register R5,
placing results back in R5. (10)
a. ADD R1,R6,R7
b. SUB R5,R5,#19
4. Solve Exercise 5.6.1.b (5.5.1.b in First Edition) in the text (4*3=12)
LDR r1, [r0, #4] R0 = 0x20008000 R1 = 79CDA3FD
LDR r1, [r0], #4 R0 = 0x20008004 R1 = 0DEB2C1A
LDR r1, [r0, #4]! R0 = 0x20008004 R1 = 79CDA3FD
5 Solve Exercise 5.6.3 (5.5.3 in First Edition) in the text (only first question #3 if
there are 2 of them in your version of text) (12)
0x20000000 0x78 0x20000008 0x 78
0x20000001 0x56 0x20000009 0x 56
0x20000002 0x34 0x2000000A 0x 34
0x20000003 0x12 0x2000000B 0x 12
0x20000004 0x00 0x2000000C 0x 78
0x20000005 0x00 0x2000000D 0x 56
0x20000006 0x00 0x2000000E 0x 34
0x20000007 0x00 0x2000000F 0x 12