Bitwise Operations Flashcards
Bitwise Logical Instructions do what?
Manipulate one or more bits in a register
A instruction ending in a s means?
Depending on the result of the operation the corresponding flags will be set
tst is an alias for which instruction?
ands xzr, Xn, Xm
Logical Shifts result in?
The bit pattern is moved left or right a number of bits depending on the argument. Empty spaces created when shifting are filled with a zero and bits shifted out of the register are lost
Arithmetic Shifts result in?
The function the same as Logical shifts but the sign bit is preserved
Rotations result in?
Depending on the direction the bit is rotated from the right and inserted on the left (right rotation) or vise-versa
Sign Extensions result in?
The sign bit is duplicated into the bits outside of the scope of the instruction. So sign extend byte copies the sign bit to bits 7-31 (w registers) (to bit 63 with x registers)
Unsigned Extensions result in?
0 is placed into all the bits outside of the scope of the instruction. So unsigned extend byte places 0 in bits 7-31 (w registers) (to bit 63 with x registers)