Bitwise Operations Flashcards

1
Q

What do bitwise logical instructions do?

A

They manipulate one or more bits in a register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

AND Truth Table

A

Insert

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a bitmask do?

A

It “masks out” all bits except where it has 0s e.g. insert

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which forms exist for AND

A

64-bit/32-bit/immediate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What flags does ands set or clear?

A

N and Z flags (V and C are always cleared)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an alias for ands?

A

tst is an alias for ands

tst Xn, Xm
ands zxr, Xn, Xm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Incusive OR Truth Table (orr)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which forms exist for ORR

A

32/64/imediate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ORR can be used to ___ bits

A

set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is an alias for orr?

A

mov is an alias for orr

mov Xd, Xm
orr Xd, xzr, Xm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EOR Truth Table

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which forms exist for EOR

A

32/64/immediate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is EOR used for?

A

To toggle bits in a register

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Bit Clear is the same as _______
and its Truth Table

A

AND NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which forms exits for Bit Clear?

A

32/64

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Bit Clear used for?

A

To clear bits

17
Q

OR NOT Truth Table

A
18
Q

Which forms exist for OR NOT?

A

32/64

19
Q

NOT Truth Table

A
20
Q

How is NOT implemented?

A

Using mo_v_e _N_OT

21
Q

What is mvn an alias for?

A

For orn

mvn Xd, Xn, Xm
orn Xd, xzr, Xm

22
Q

EOR NOT Truth Table

A
23
Q

Logical Shift Left

Form

Use

A
24
Q

_L_ogical _S_hift _R_ight

Form

Use

A
25
Q

_A_rithmetic _S_hift _R_ight

Form

What is it called when sign bit is duplicated when shifting?

Which one is the sign bit?

A
26
Q

_R_otate _R_ight

Form

Which bits are used?

A
27
Q

_Signed Ext_end _B_yte

_Signed Ext_end _H_alfword

_Signed Ext_end _W_ord

Form

Use

A
28
Q

Unsigned Extend Byte

Unsigned Extend Halfword

Form

Use

A
29
Q

Bitfield Insert

Form

A
30
Q

Bitfield Extract and Insert Low

Unsigned Bitfield Extract

Signed Bitfield Extract

Form

A
31
Q
A