5.36 · exercise

Predict: Bitwise Mechanics

Act as the CPU. Trace each shift, mask, and sign-extension snippet and give the exact value it leaves in the destination register.

0 of 4 correct

Mental Trace

mov w20, 5
lsl w19, w20, 3

Mental Trace

mov w20, -8
lsr w19, w20, 1

Mental Trace

mov x20, 0xFF
mov x21, 0x3C
bic x19, x20, x21

Mental Trace

mov w20, 0xFF
sxtb w19, w20