Question: You are to write a program in MiPS assembly for use in the SPIM simulator. You will implement a logic calculator based on NAND logic.

 You are to write a program in MiPS assembly for usein the SPIM simulator. You will implement a logic calculator based onNAND logic. In logic design, a NAND gate is a "universal gate

You are to write a program in MiPS assembly for use in the SPIM simulator. You will implement a logic calculator based on NAND logic. In logic design, a NAND gate is a "universal gate -it can be used to implement any logic function. The core of your program will be a function myNAND", which will be used to implement other logic functions. Functions to Implement: myNAND Implement a bit-wise NAND on 32-bit inputs A and B. Input A will be passed to the function via a0, and B via a1. The result of the bit-wise NAND will be returned via v0. A NAND B requires a NOT operation. Try to think about how to create NOT functionality using the instructions you have available (there is no NOT in MIPS). This is good practice for Exam #2. Contact Dr. Dingler if you have questions on how to do this. myNAND is the only function where you may use built-in MIPS logic instructions. myOR Implement a bit-wise OR operation on 32-bit inputs A and B. Input A will be passed to the function via a0, and B via a1. The result of the bit-wise OR will be returned via v0. Implement the OR operation by calling your myNAND function You must not use any built-in MIPS logic instructions, only myNAND. You are to write a program in MiPS assembly for use in the SPIM simulator. You will implement a logic calculator based on NAND logic. In logic design, a NAND gate is a "universal gate -it can be used to implement any logic function. The core of your program will be a function myNAND", which will be used to implement other logic functions. Functions to Implement: myNAND Implement a bit-wise NAND on 32-bit inputs A and B. Input A will be passed to the function via a0, and B via a1. The result of the bit-wise NAND will be returned via v0. A NAND B requires a NOT operation. Try to think about how to create NOT functionality using the instructions you have available (there is no NOT in MIPS). This is good practice for Exam #2. Contact Dr. Dingler if you have questions on how to do this. myNAND is the only function where you may use built-in MIPS logic instructions. myOR Implement a bit-wise OR operation on 32-bit inputs A and B. Input A will be passed to the function via a0, and B via a1. The result of the bit-wise OR will be returned via v0. Implement the OR operation by calling your myNAND function You must not use any built-in MIPS logic instructions, only myNAND

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!