Convert the MIPS assembly language to machine language using the grid below. Put the REGIS TER NUMBERS in the boxes of the grid where it is appropriate. Use the following: $s0=16, $s1=17, $s2=18, $s3=19, $s4=20, $s5=21, $s6=22 $10=8, $11=9 (Look on the MIPS Green Card for verification)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

dont use others answers please!

give the full explanation what and how are you doing it

will rate

thank you!

Convert the MIPS assembly language to machine language using the grid below. Put the **REGISTER NUMBERS** in the boxes of the grid where it is appropriate.

Use the following register mappings:

- $s0 = 16
- $s1 = 17
- $s2 = 18
- $s3 = 19
- $s4 = 20
- $s5 = 21
- $s6 = 22
- $t0 = 8
- $t1 = 9

*(Refer to the MIPS Green Card for verification)*

### Code:

```
Loop: 
  add $t1, $s3, $s3   # starts from 80000
  add $t1, $t1, $t1
  add $t1, $t1, $s6
  lw $t0, 0($t1)
  bne $t0, $s5, Exit
  add $s3, $s3, $s4
  j Loop

Exit:
```

### Grid:

| Address | Function Type |
|---------|---------------|
| 80000   | R-type        |
| 80004   | R-type        |
| 80008   | R-type        |
| 80012   | I-type        |
| 80016   | I-type        |
| 80020   | R-type        |
| 80024   | J-type        |

### Explanation of the Grid:

- **R-type instructions (Row size: 6 5 5 5 5 6):** These are used for operations like addition.
- **I-type instructions:** These are used for operations like loading a word (lw) or branch if not equal (bne).
- **J-type instruction:** This is used for the jump operation. 

Each row corresponds to an instruction in the MIPS assembly code with specific fields denoted for operation, source registers, destination register, and jump addresses.
Transcribed Image Text:Convert the MIPS assembly language to machine language using the grid below. Put the **REGISTER NUMBERS** in the boxes of the grid where it is appropriate. Use the following register mappings: - $s0 = 16 - $s1 = 17 - $s2 = 18 - $s3 = 19 - $s4 = 20 - $s5 = 21 - $s6 = 22 - $t0 = 8 - $t1 = 9 *(Refer to the MIPS Green Card for verification)* ### Code: ``` Loop: add $t1, $s3, $s3 # starts from 80000 add $t1, $t1, $t1 add $t1, $t1, $s6 lw $t0, 0($t1) bne $t0, $s5, Exit add $s3, $s3, $s4 j Loop Exit: ``` ### Grid: | Address | Function Type | |---------|---------------| | 80000 | R-type | | 80004 | R-type | | 80008 | R-type | | 80012 | I-type | | 80016 | I-type | | 80020 | R-type | | 80024 | J-type | ### Explanation of the Grid: - **R-type instructions (Row size: 6 5 5 5 5 6):** These are used for operations like addition. - **I-type instructions:** These are used for operations like loading a word (lw) or branch if not equal (bne). - **J-type instruction:** This is used for the jump operation. Each row corresponds to an instruction in the MIPS assembly code with specific fields denoted for operation, source registers, destination register, and jump addresses.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can this question be explained step by step and why you filled out each box like you did?

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY