8 Provide the type assembly language instruction and binary

8. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields.
op = 0, rs = 3, rt = 2, rd = 3, shamt = 0, funct = 34

9. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields.
op = 0x23, rs = 1, rt = 2, const = 0x4

10. Assume the following register contents:
$t0 = 0xAAAAAAAA, $t1 = 0x12345678
a.   What is the value of $t2 for the following sequence of instructions:
sll $t2, $t0, 4
or $t2, $t2, $t1

b.   What is the value of $t2 for the following sequence of instructions:

sll $t2, $t0, 4
andi $t2, $t2, -1

Solution

8. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields.
op = 0, rs = 3, rt = 2, rd = 3, shamt = 0, funct = 34

Binary: ${(000000\\ 00011\\ 00010\\ 00011\\ 00000\\ 000022)}_2$

Type: R

Instruction:   sub       $v1, $v0, $v1

9. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields.
op = 0x23, rs = 1, rt = 2, const = 0x4

Binary: ${(100011\\ 00001\\ 00010\\ 00000\\ 00000\\ 000100)}_2$

Type: I

Instruction: lw     $v0, 4($at)

10. Assume the following register contents:
$t0 = 0xAAAAAAAA, $t1 = 0x12345678
a.   What is the value of $t2 for the following sequence of instructions:
sll $t2, $t0, 4
or $t2, $t2, $t1

1)sll $t2, $t0, 4

shifts left 4 bits and put zeros $t2=xAAAAAAAA0

2)or $t2, $t2, $t1

Bitwise logical ors $t2, $t1 registers and stores the result in $t2 register

$t2= xAAAAAAAA0

$t1 = 0x12345678

$t2 0000 1010 1010 1010 1010 1010 1010 1010 1010 0000

$t1 0000 0000 0001 0010 0011 0100 0101 0110 0111 1000

--------------------------------------------

$t2 0000 1010 1011 1010 1011 1111 1111 1110 1111 1000

       ABABFFEF8

b.   What is the value of $t2 for the following sequence of instructions:

sll $t2, $t0, 4
andi $t2, $t2, -1

1)sll $t2, $t0, 4

shifts left 4 bits and put zeros $t2=xAAAAAAAA0

2) andi $t2, $t2, -1

Bitwise ands $t2 register and an immediate value -1 and stores the result in a register

$t2   0000 1010 1010 1010 1010 1010 1010 1010 1010 0000

-1 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111

--------------------------------------------

$t2 0000 1010 1010 1010 1010 1010 1010 1010 1010 0000

         AAAAAAAA0

8. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields. op = 0, rs = 3, rt = 2, rd
8. Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields. op = 0, rs = 3, rt = 2, rd

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site