YYYEJI

[MIPS] Format instruction identification 본문

Computer architectures

[MIPS] Format instruction identification

YEJI ⍢ 2022. 10. 10. 16:11
728x90

 

OP code

Function code

Instruction format

 

 

↑↑↑       위에 표들을 참고해서 문제를 푸시면 됩니다     ↑↑↑

 

 

 

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

 

Q1)  add  $t1,  $s3,  $s3

0 19 19 9 0 32

Binary: 000000 10011 10011 01001 00000 100000

Hexadecimal: 0x02734820

 

 

Q2)  add  $t1,  $st1,  $t1

0 9 9 9 0 32

 

Q3)  add  $t1,  $t1,  $s6

0 9 22 9 0 32

 

Q4)  lw  $t0,  0($t1)

35 9 8 0 (constant)

 

Q5)  bne  $t0,  $s5, Exit

5 8 21 →   2

 

Q6)  j   Loop

2 ?

 

 

 

◡̈

 

'Computer architectures' 카테고리의 다른 글

[MIPS] LUI instruction  (0) 2022.10.10
[MIPS] Stored program Concept  (0) 2022.10.10
[MIPS] Three MIPS Instruction Format  (0) 2022.10.10
[MIPS] MIPS Instruction Summary  (0) 2022.10.10
[MacOS] MIPS assembly language 알아보기  (0) 2022.10.08