Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSCI-21 Programming Assignment #1, due 2/12/20 In the Simulator menu, Settings option of QtSpim, set Bare Machine OFF, Accept Pseudo Instructions OFF, Enable Delayed Branches

image text in transcribed

CSCI-21 Programming Assignment #1, due 2/12/20 In the Simulator menu, Settings option of QtSpim, set Bare Machine OFF, Accept Pseudo Instructions OFF, Enable Delayed Branches OFF, Enable Delayed Loads OFF, Enable Mapped IO OFF, Load Exception Handler OFF. Email me the source file(s) attached to an email with "CS21 your name Assign 1" in the subject line. For these programs, you may use ONLY these instructions: and nor or ori sil srl xor Run the programs by verifying the value of the PC is 0x00400000 (if needed, right-click the field and use Change Register Contents to set it) and then single stepping (pushing F10) and observing the results in the QtSpim register display window. Exercise 1: Start with the instruction that puts a single one-bit into the low order bit of register eight($t0): ori $t0, $zero, Ox01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern Ox55555555 into register Stl. You may not use another andi, ori or xori instruction to set another bit from scratch, you must work from the single bit you set in the first instruction or created directly from that bit. You will need to use more registers than just Stl. See how few instructions and registers you need to do this. Doing this in approximately twelve instructions is reasonable. It can be done in fewer. Again, you MAY NOT create any other data bits from scratch for this, only the single bit you started with Exercise 2: Again, start with the instruction that puts the single one-bit into register eight($t0): ori $to, Szero, 0x01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern 0x69696969 into register $t1. Don't use another andi, ori or xori instruction. You will need to use other registers than just $ti. See how few instructions you need to do this. Again, this can be done in approximately ten to twelve instructions. Again, you may only work from the one initial bit. Exercise 3: Again, start with the instruction that puts the single one-bit into register eight ($t0): $t0, $zero, 0x01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern OxFFFFFFFF into register Stl. Don't use another andi, ori or xori instruction. You will need to use other registers than just Stl. See how few instructions you need to do this. This can be done in very few instructions. Again, for all of these exercises, you must work from the one initial bit set using the ori instruction. All other 'on' bits MUST be created from that bit or from bits created directly from that bit. You cannot clear the original bit you set, either. It has to stay a 'l'. CSCI-21 Programming Assignment #1, due 2/12/20 In the Simulator menu, Settings option of QtSpim, set Bare Machine OFF, Accept Pseudo Instructions OFF, Enable Delayed Branches OFF, Enable Delayed Loads OFF, Enable Mapped IO OFF, Load Exception Handler OFF. Email me the source file(s) attached to an email with "CS21 your name Assign 1" in the subject line. For these programs, you may use ONLY these instructions: and nor or ori sil srl xor Run the programs by verifying the value of the PC is 0x00400000 (if needed, right-click the field and use Change Register Contents to set it) and then single stepping (pushing F10) and observing the results in the QtSpim register display window. Exercise 1: Start with the instruction that puts a single one-bit into the low order bit of register eight($t0): ori $t0, $zero, Ox01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern Ox55555555 into register Stl. You may not use another andi, ori or xori instruction to set another bit from scratch, you must work from the single bit you set in the first instruction or created directly from that bit. You will need to use more registers than just Stl. See how few instructions and registers you need to do this. Doing this in approximately twelve instructions is reasonable. It can be done in fewer. Again, you MAY NOT create any other data bits from scratch for this, only the single bit you started with Exercise 2: Again, start with the instruction that puts the single one-bit into register eight($t0): ori $to, Szero, 0x01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern 0x69696969 into register $t1. Don't use another andi, ori or xori instruction. You will need to use other registers than just $ti. See how few instructions you need to do this. Again, this can be done in approximately ten to twelve instructions. Again, you may only work from the one initial bit. Exercise 3: Again, start with the instruction that puts the single one-bit into register eight ($t0): $t0, $zero, 0x01 Now, by using only shift logical instructions and register to register logic instructions (use NO more immediate instructions), put the pattern OxFFFFFFFF into register Stl. Don't use another andi, ori or xori instruction. You will need to use other registers than just Stl. See how few instructions you need to do this. This can be done in very few instructions. Again, for all of these exercises, you must work from the one initial bit set using the ori instruction. All other 'on' bits MUST be created from that bit or from bits created directly from that bit. You cannot clear the original bit you set, either. It has to stay a 'l

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

The SQL BETWEEN operator is used:

Answered: 1 week ago

Question

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago

Question

7. Describe phases of multicultural identity development.

Answered: 1 week ago