Question Details

No question body available.

Tags

assembly

Answers (6)

March 6, 2026 Score: 1 Rep: 95,043 Quality: Low Completeness: 0%

Looks correct to me. I don't see how it would be wrong.

March 6, 2026 Score: 1 Rep: 95,043 Quality: Low Completeness: 10%

I don't see where in your code you expect any register to be set to zero. Please [edit] your question to provide all relevant details. Coming up with additional context in the comments is not helpful, it should be all in the question from the get go.

March 6, 2026 Score: 0 Rep: 29,019 Quality: Low Completeness: 30%

I agree. x = input XOR mask flips the input bit if the mask is on, leaves it intact if the mask bit is off. Your teacher should know this.

March 6, 2026 Score: 0 Rep: 1 Quality: Low Completeness: 20%

Thanks for the response. My teacher said that maybe it would leave the register blank instead of setting it to #00000000B, but I said that it should logically give the same result as SUB R0, R1, R0 where R1 = R0, which is obviously #00000000B. Something she didn't say but which I thought is that it could be "blank" upon startup, but thinking of registers as physical switches, I don't see how it could actually be blank. Either way, thanks for the response. With those extra marks, I now have the highest score in the class on that test.

March 6, 2026 Score: 0 Rep: 1 Quality: Low Completeness: 20%

Thought so, thank you. That wasn't her concern with my answer though. I wrote it in another comment but I'll paste here.

"My teacher said that maybe it would leave the register blank instead of setting it to #00000000B, but I said that it should logically give the same result as SUB R0, R1, R0 where R1 = R0, which is obviously #00000000B. Something she didn't say but which I thought is that it could be "blank" upon startup, but thinking of registers as physical switches, I don't see how it could actually be blank."

March 6, 2026 Score: 0 Rep: 3,865 Quality: Low Completeness: 0%

You should be able to demonstrate that it works correctly in the debugger.