Bitwise Operations Flashcards
What do bitwise logical instructions do?
They manipulate one or more bits in a register
AND Truth Table
Insert
What does a bitmask do?
It “masks out” all bits except where it has 0s e.g. insert
Which forms exist for AND
64-bit/32-bit/immediate
What flags does ands set or clear?
N and Z flags (V and C are always cleared)
What is an alias for ands?
tst is an alias for ands
tst Xn, Xm
ands zxr, Xn, Xm
Incusive OR Truth Table (orr)
Which forms exist for ORR
32/64/imediate
ORR can be used to ___ bits
set
What is an alias for orr?
mov is an alias for orr
mov Xd, Xm
orr Xd, xzr, Xm
EOR Truth Table
Which forms exist for EOR
32/64/immediate
What is EOR used for?
To toggle bits in a register
Bit Clear is the same as _______
and its Truth Table
AND NOT
Which forms exits for Bit Clear?
32/64
What is Bit Clear used for?
To clear bits
OR NOT Truth Table
Which forms exist for OR NOT?
32/64
NOT Truth Table
How is NOT implemented?
Using mo_v_e _N_OT
What is mvn an alias for?
For orn
mvn Xd, Xn, Xm
orn Xd, xzr, Xm
EOR NOT Truth Table
Logical Shift Left
Form
Use
_L_ogical _S_hift _R_ight
Form
Use
_A_rithmetic _S_hift _R_ight
Form
What is it called when sign bit is duplicated when shifting?
Which one is the sign bit?
_R_otate _R_ight
Form
Which bits are used?
_Signed Ext_end _B_yte
_Signed Ext_end _H_alfword
_Signed Ext_end _W_ord
Form
Use
Unsigned Extend Byte
Unsigned Extend Halfword
Form
Use
Bitfield Insert
Form
Bitfield Extract and Insert Low
Unsigned Bitfield Extract
Signed Bitfield Extract
Form