This preview shows pages 1–3. Sign up to view the full content.
1
ECE/CS 314 Spring 2008
Homework 1
Hung Dang (hvd2)
Instruction and Data Representation (50 points)
1.
(15 points)
Given the bit pattern
:
1010 1100 0010 0010 0000 0000 0000 0001
What does it represent, assuming it is:
a. A two’s complement integer?
Complement
0101 0011 1101 1101 1111 1111 1111 1110
Add 1
0101 0011 1101 1101 1111 1111 1111 1111
b. An unsigned integer?
2147483648+536870912+134217728+67108864+2097152
+131072+1 = 2887909377
c. A MIPS instruction?
Opcode 101011 indicates Itype “sw” instruction
2.
(20 points)
Perform the following conversions:
a. Convert integer binary
10110010100000111100100100011111 to hex:
b. Convert the 8bit, 2’s complement 10101110 to
decimal:
c. Convert decimal (–17)
10
to (8bit) sign/magnitude
binary:
d. Convert decimal (–2)
10
to (11bit) 2’s complement
binary:
e. Convert (8bit) unsigned binary 00110011 to
decimal:
sw
$2, 1($1)
1407057919
51
82
10010001
11111111110
B283C91F
2887909377
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document2
3.
(25 points)
Binary Arithmetic
a) (8pts)
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '07
 MCKEE/LONG

Click to edit the document details