Computer Organization and Structure

Homework #4

Due: 2007/12/11

1.      Convert 4096ten, -2,047ten, and -2,000,000ten into 32-bit two’s complement binary numbers, respectively, and convert the following two’s complement binary numbers to be decimal numbers:

a.         1111 1111 1111 1111 1111 1111 0000 0110two;

b.        1111 1111 1111 1111 1111 1111 1110 1111two;

c.         0111 1111 1111 1111 1111 1111 1110 1111two.

2.      Suppose that all of the conditional branch instructions except beq and bne were removed from the MIPS instruction set along with slt and all of its variants (slti, sltu, sltui). Show how to perform

slt      \$t0, \$s0, \$s1

using the modified instruction set in which slt is not available. (Hint: It requires more than two instructions.)

3.      Show the IEEE 754 binary representation for the floating-point numbers 10ten, 10.5ten, 0.1ten, and -2/3, respectively.

4.      With x = 0000 0000 0000 0000 0000 0000 0101 1011two and y = 0000 0000 0000 0000 0000 0000 0000 1101two representing two’s complement signed integers, perform, showing all work:

a.         x+y

b.        x-y

c.         x*y

d.        x/y