Lab 5: Practice, practice,practice Solution

$30.00 $24.00

You will write your answers in a PLAIN TEXT file (.txt). Please do not submit a Word document, or PDF, or anything like that. Just a text file. Numeric Representation Try to do these without a calculator first. But you can use a calculator to check. Then, if you don’t get the right answer, try…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

You will write your answers in a PLAIN TEXT file (.txt). Please do not submit a Word document, or PDF, or anything like that. Just a text file.

Numeric Representation

Try to do these without a calculator first. But you can use a calculator to check. Then, if you don’t get the right answer, try to figure out what you did wrong, or ask for help.

  1. Write the ranges of unsigned binary numbers with the following numbers of bits:

4 bits

8 bits

11 bits

  1. Write the ranges of signed two’s complement binary numbers with the following numbers of bits:

4 bits

8 bits

11 bits

  1. Convert these decimal numbers to binary.

13

58

141

  1. Convert these unsigned binary numbers to decimal.

01001001

00011001

10000000

  1. Convert these signed two’s complement binary numbers to decimal.

01001001

11111001

10000000

  1. Write the binary representation of these signed two’s complement binary numbers, but extended to 16 bits.

01001001

11111001

10000000

  1. Compute the following bitwise operations.

~00111001

11100110 & 01110001

11100110 | 01110001

    1. I have a register which contains the value 0xE315DEAD . I use sw to store it to memory. Write the sequence of bytes that would be placed in memory if our computer is using:

Little-endian integers

Big-endian integers

    1. I have an array where each item is 16 bytes long. If I want to access the 7th item (that is, array[6] ), how many bytes do I have to move forward from the beginning of the array?

  1. Let’s say t3 contains 44 and a1 contains 1054 . For the instruction sb t3, (a1) , explain what data is copied into what location.

  1. In MIPS, when you load a byte from memory into a register:

  1. Encode the following integers as single-precision IEEE 754 floats, and write your answer as an 8-digit hexadecimal number. Do not treat them as 2’s complement, just use the sign given.

+1000111010

-1000111010

+1

Submitting

Make sure your file is named username_lab5.txt , like jfb42_lab5.txt .

Submit here.

Drag your asm file into your browser to upload. If you can see your file, you uploaded it correctly!

You can also re-upload if you made a mistake and need to fix it.

Lab 5: Practice, practice,practice Solution
$30.00 $24.00