Complete the code to perform a bitwise AND operation between registers R0 and R1, storing the result in R2.
AND [1], R0, R1The AND instruction syntax is AND destination, operand1, operand2. Here, R2 is the destination register to store the result.
Complete the code to shift the bits in register R4 left by 3 positions, storing the result in R5.
LSL [1], R4, #3
The LSL (Logical Shift Left) instruction syntax is LSL destination, source, #shift_amount. Here, R5 stores the shifted result.
Fix the error in the code to clear bit 5 of register R7 using bitwise operations.
BIC [1], R7, #[2]
The BIC instruction clears bits set in the mask. To clear bit 5, use mask 0x20 (which is 1 shifted left 5 times). The destination should be R7 to update the register.
Fill both blanks to set bits 0 and 3 in register R9 without affecting other bits.
ORR [1], R9, #[2]
The ORR instruction sets bits specified by the mask. Bits 0 and 3 correspond to 0x09 (binary 00001001). The destination register is R9 to update it.
Fill all three blanks to create a mask that extracts bits 4 to 7 from register R11 and stores the result shifted right by 4 in R12.
AND [1], R11, #[2] LSR [3], [1], #4
First, AND R12 with mask 0xF0 to keep bits 4-7. Then, logical shift right (LSR) R12 by 4 to move those bits to the lower positions. The destination for both instructions is R12.
