Name: Date:

HW3 solution

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

    0000 0000 1000 0100 0000 0100 0011 0011
    0100 0000 0101 0100 1000 0100 0011 0011

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

    add x8, x8, x8
    sub x8, x9, x5

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

    8651827 or 0x0084 0433
    1079280691 or 0x4054 8433

    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, give some examples.

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