Some machines have a find-first-one instruction that counts the location of the first bit set to 1

Question:

Some machines have a find-first-one instruction that counts the location of the first bit set to 1 within the word. Write an ARM sequence of instructions that takes the word in rO and puts the locations of the first bit set to 1 in rl. Count from the left, so that if bit 31 is set, the value returned should be 0. If bit O is set, the value returned is 31. If no bit is set, the value returned should be 32.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: