Question

Please convert the following bit pattern to a MIPS instruction. 0000 0001 0110 0110 0100 1000...

Please convert the following bit pattern to a MIPS instruction.

0000 0001 0110 0110 0100 1000 0010 0000

1000 1101 1001 1010 0000 0000 0001 1100

Homework Answers

Answer #1

Converting bit patterns to a MIPS instruction.

bit pattern 1:

0000 0001 0110 0110 0100 1000 0010 0000

The first 6 digits 000000
The given code is for ADD instruction.

Splitting the opcodes:
000000|01011|00110|01001|00000|100000

Instruction:
ADD rd,rs,rt

opcode rs rt rd shift amt function
6 bits 5 bits 5bits 5bits 5bits 6 bits
000000 01011 00110 01001 00000 100000

Registers for codes

01011 --->$t3

00110 --->$a2

01001 --->$t1

Complete Final instruction :

add $t1,$t3,$a2.


bit pattern 2:

1000 1101 1001 1010 0000 0000 0001 1100

The first 6 digits 100011
The given instruction is for LW instruction.

Splitting the opcodes:
100011|01100|11010|0000 0000 0001 1100

Instruction:
LW rt,offset(rs)

opcode rs rt address
6bits 5bits 5bits 16bits
1000011 01100 11010

0000 0000 0001 1100

Registers for codes

01100 --->$t4

11010 --->$k0

Offset address in the code must be hexadecimal

0000 0000 0001 1100 into hexa is

0000-->0

0000-->0

0001-->1

1100-->C

Therfore hexa code:

0x001C

Complete Final instruction :

lw $k0,0x001C($t4)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write the MIPS assembly code that creates the 32-bit constant 0010 0000 0000 0001 0100 1001...
Write the MIPS assembly code that creates the 32-bit constant 0010 0000 0000 0001 0100 1001 0010 0100two and stores that value to register $t1, and print the value of $t1 to stdout in binary - i.e., as a 32 bit sequence of '1's and '0's (use the MIPS syscall functionality for I/O).
The cache is direct mapped, 16 lines, each line is 2 bytes The offset field is...
The cache is direct mapped, 16 lines, each line is 2 bytes The offset field is ________ bits The line field is ________ bits The tag field is ________ bits line tag byte 0 byte 1 (can someone explain this to me) 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Suppose the information content of a packet is the bit pattern 1010 0000 1001 1101 and...
Suppose the information content of a packet is the bit pattern 1010 0000 1001 1101 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length checksum field is used.
Convert 1101 0001 1100 0011 binary to decimal (value is a 16-bit integer). The answer is...
Convert 1101 0001 1100 0011 binary to decimal (value is a 16-bit integer). The answer is -11837 but I would like the work to be shown, please
Question 6: Convert BCD 1001 0011 to decimal Question 7: Convert hexadecimal AA to decimal Question...
Question 6: Convert BCD 1001 0011 to decimal Question 7: Convert hexadecimal AA to decimal Question 8: What is the 2’s complement of (01001110)2? Question 9: How is – 1510 represented in eight-bit 2’s complement notation? Question 10: How is – 11210 represented in eight-bit 2’s complement notation? Question 11: Solve the binary arithmetic problem: (00010111)2 + (00101001)2 Question 12: Solve the binary arithmetic problem: (1010)2 - (0100)2 Question 13: Solve the following problem: (01110000)2 - (00011000)2 Question 14: Solve...
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the...
Assignment-I Write the output for the following instructions MOV B , A             Before instruction execution, the contents of registers B and A are                                  Rd= B= XBH                         Rs= A = 1FH              After the execution of instruction.                                 Rd= B = ?                         Rs= A = ? ADD B If A= E 3H   B=  0 4H then after the  execution of the above instruction the content of A = ? SUI 03H If the value of A = 15Hthen after the execution of the above instruction...