私は問題を解決しようとしていますが、最初はrol
命令をテストしていて、テストが正しくない非常にばかげたことをしていると確信しています。
ここにスニペットがあります:
li $t0, 101 ## our data
li $t1, 32 ## our loop because we will rotate 32 times later
loop:
## whatever the bit is, just print it or put it inside the asciiz
## and print it later, after we finish rotating,
## so we rotate starting with the first bit,
## and we put it as the first bit lsb
## first we rotate##
rol $t2, $t0, 1 ## rotate and store the new rotated inside $t7
and $t3, $t2, 1 ## now we AND to check our lsb if it one or not
li $v0, 1
move $a0, $t3 ## Print the result of AND
syscall
私が基本的にやろうとしているのは、私の MSB をt0
LSB に回転させ、それを 1 と AND することです。しかし、私が得ているのは常に 0 です。
誰かが私の間違いとそれを修正する方法について教えてくれることを願っています.