What does the ARM BIC (Bit Clear) instruction do?
Think about how clearing bits works with a mask.
The BIC instruction clears bits in the destination register where the mask bits are 1, effectively performing a bitwise AND with the inverse of the mask.
Which ARM instruction is used to set specific bits to 1 without affecting other bits?
Setting bits to 1 usually involves a bitwise OR operation.
The ORR instruction performs a bitwise OR, which sets bits to 1 where the mask has 1s, leaving other bits unchanged.
Given the initial register value R0 = 0xF0F0, what is the value of R0 after executing these instructions?
ORR R0, R0, #0x0F0F BIC R0, R0, #0x00FF
Apply each instruction step-by-step, converting hex to binary if needed.
First, ORR sets bits: 0xF0F0 OR 0x0F0F = 0xFFFF. Then BIC clears bits: 0xFFFF AND NOT 0x00FF = 0xF000.
Which statement correctly describes the difference between the ARM EOR and BIC instructions?
Think about how toggling and clearing bits differ.
EOR performs bitwise exclusive OR, toggling bits where the mask has 1s. BIC clears bits where the mask has 1s.
Starting with R1 = 0x12345678, what is the value of R1 after executing the following instructions?
BIC R1, R1, #0x00FF00FF EOR R1, R1, #0xFF0000FF
Apply BIC first, then EOR. Convert hex to binary or decimal to track bits clearly.
BIC clears bits in R1 where mask 0x00FF00FF has 1s, resulting in 0x12340000. Then EOR toggles bits where mask 0xFF0000FF has 1s, resulting in 0xEDCB5600.
