Basic quiz: bit manipulation
Setting and clearing one bit with a mask, the AND of n with n - 1, branching on a single bit with tbnz, moving a field down with a shift and a mask, and rotating.
0 of 6 correct
Multiple choice
w9 holds 1 shifted left by 5. Which instruction turns bit 5 of w19 on and leaves every other bit of w19 as it was?
Multiple choice
x19 holds n, a power of two such as 8 or 64, and x20 holds n - 1. What does and x9, x19, x20 leave in x9?
Multiple choice
Which instruction jumps to odd when bit 0 of w19 is 1, with no cmp or tst before it?
Multiple choice
Bits 4 to 7 of w0 hold a 4-bit field. Which pair of instructions moves that field down to bits 0 to 3 of w1, with zeros above it?
Multiple choice
What does ror w1, w0, 8 do with the 8 bits it moves out of the low end of w0?
Multiple choice
Which value in w9 makes and w19, w19, w9 clear bit 0 of w19 and keep its other 31 bits?