ARM Problem Sheet
ARM Problem Sheet
5. Determine the largest number in a block of 32-bit signed binary numbers. The
length of the block is in memory location 0x4000 and the block itself starts from
location 0x4100. Store the largest number in memory location 0x4010.
6. Count the number of ‘1’ and ‘0’ bits in the 32 bit number stored in memory location
0x1000. Store the number of ‘1’ bits in memory location 0x1001 and ‘0’ bits in
memory location 0x1002.
7. Find the factorial of a 8 bit number stored in register R0. Store the result in R1.
8. Find the parity of a 32 bit number stored in memory location ALPHA. Store 01 in
R0 if the parity is even, otherwise store 00 in the same register.
9. Consider two arrays of 32 bit numbers stored in consecutive memory locations starting
from ALPHA and BETA respectively. The length of the arrays is stored in R2.
Compare the two arrays to check whether they are the same. Store 01 in R0 if the
two arrays match, otherwise store 00 in the same register.
10. Consider two arrays (X and Y) of 32 bit numbers stored in consecutive memory
locations starting from ALPHA and BETA respectively. The length of the arrays is stored
in R2. Evaluate XiYi. Store the result in R4.