Assignment_week13

docx

School

San Francisco State University *

*We aren’t endorsed by this school

Course

256

Subject

Electrical Engineering

Date

Jan 9, 2024

Type

docx

Pages

3

Uploaded by MinisterProtonBoar36

Report
Problem 1 We know the beq format machine language code: beq rs rt I 000100 sssss ttttt iiii iiii iiii iiii A. Translate beq $1,$0,0x0004 (0.5 point) Answer: 000100 ___________________________________________ B. As we know BTA= Address of branch instruction+4+ I shift left 2 bits sign-extended to 32-bit (0.5 point) Address for the instruction "beq $1,$0,0x0004" is at memory address 0x00400010 , please answer the following question a). What is the address of branch instruction "beq $1,$0,0x0004"? b). What is I shift left 2bits? c). What is I shift left 2bits sign-extended to 32 bit in Hex? d) What is BTA? (8-digit Hex)
Problem 2 A) (1 point) As we know 0011 01ss ssst tttt iiii iiii iiii iiii ori rt,rs,I 0011 1100 000t tttt iiii iiii iiii iiii lui rt,I 0001 01ss ssst tttt iiii iiii iiii iiii bne rs,rt,I Given this MIPS machine language code in memory: Address Contents 0x00400024 0x340900 08 0x00400028 0x3c1210 01 0x0040002c 0x142000 07 Disassemble and show the MIPS instructions: Address Contents Contents 0x00400024 0x34090008 ______ ______ ,_____,8 0x00400028 0x3c121001 _______ $18,0x1001 0x0040002c 0x14200007 ______ _______, _____, 7
Problem 3 1) We know $rs= 0x1101 0000, the instruction ori $rt,$rs,0x1234 is executed, what is in $rt (in Hex)? 2) The following instructions are executed, please answer the following questions lui $1, 0x5678 ori $1, $1, 0x1357 add $5, $1, $0 What's the data in $5?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help