Complete the code to represent a signed 8-bit number in ARM assembly.
MOV R0, #[1]
0x80 represents -128 in signed 8-bit two's complement, which is important for correct negative number representation in ARM.
Complete the code to load an unsigned 16-bit number into register R1 in ARM assembly.
MOVW R1, #[1]
0xFFFF is the maximum value for an unsigned 16-bit number, important for correct unsigned number handling in ARM.
Fix the error in the ARM assembly code that incorrectly interprets a signed number.
CMP R2, #[1]
0x7F (127) is the correct positive boundary for signed 8-bit comparison; using 0xFF or negative literals directly can cause errors in ARM immediate values.
Fill both blanks to correctly create a mask for extracting the lower 4 bits in ARM assembly.
AND R3, R4, #[1] ; mask lower bits LSR R5, R3, #[2] ; shift right
0x0F masks the lower 4 bits, and shifting right by 4 moves those bits to the lowest position for processing.
Fill all three blanks to correctly sign-extend an 8-bit signed number in ARM assembly.
UXTB R6, R7 MOV R8, R6, ASR #[1] ORR R9, R8, R6, LSL #[2] MOV R10, R9, ASR #[3]
Shift right arithmetic by 8, then shift left by 24, then shift right arithmetic by 31 bits correctly sign-extends an 8-bit number to 32 bits in ARM.
