Name: Box: Date:

HW3 solution

  1. (10 points) Consider the following 32-bit binary items.

    0000 0010 0001 0000 1000 0000 0010 0000
    0000 0001 0010 1010 0100 0000 0010 0010

    a. Assuming the items above are instructions, what MIPS assembly instructions do they represent? (Include all operands to the instruction in your answer.)

    add $s0, $s0, $s0
    sub $t0, $t1, $t2

    b. Assuming the items above are data (i.e. integers), what value do they represent?

    34635808 or 0x02108020
    19546146 or 0x012a4022

    c. How can you tell if the bits represent instructions or data? Explain your answer.

    You cannot without more information on the context.

    d. Could the bit patterns represent anything else besides instructions and integers? If so, what?

    Many possibilities: 4 chars each, 2 shorts, 1 float each, 1 double, bit masks...