Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There are two programming questions for you to do. Please submit two .s or .asm files. In the Settings menu of SPIM set Bare Machine
There are two programming questions for you to do. Please submit two .s or .asm files. In the Settings menu of SPIM set Bare Machine ON, Allow Pseudo Instructions OFF, Exception Handler OFF, Delayed Branches ON, Delayed Loads ON and Mapped IO ON. 1. (5 points) Write a program to calculate using this boolean formula: ((not A) and B) or (not (A xor B)). A and B are the bit strings in S5 and S6. Put the final result bit string in register S7. The initial two instructions are given: ori $5, S0, 0x9 ori $6.S0.0x5 (You cannot use not instruction, but you can use nor 2. (5 points) Recall that in the class we showed the corresponding machine instruction of the assembly instruction ori $8, $0, 0x20. Write a program that puts this 32-bit machine i struction into register S9. You are only allowed to use shift and logic OR instructions including or and ori. On the top of your program file, you should write in the comment what the machine instruction is in binary and also hex. The opcode for ori is 001101. The following shows the frame of your program. #The machine instruction of ori $8, $0, 0x20 is #and Ox in he x in binary text globl main main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started