Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 MARS MIPS 模拟器来模拟汇编代码中的划分。在移位过程中,如何将商的最右边位设置为1和0?我用 ori $t2,$t2,1 设置 1 和 andi$t2,$t2,-2 设置 0,我应该这样做吗?
是的,这是一个完全有效的方法。在一条指令(简单的按位运算)中,您获得了大多数人尝试使用一些阴暗算术和可能的分支指令所做的事情。