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

18
Q

Which forms exist for OR NOT?

19
Q

NOT Truth Table

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

23
Q

Logical Shift Left

Form

Use

24
Q

_L_ogical _S_hift _R_ight

Form

Use

25
**_A**_rithmetic _**S**_hift _**R_**ight Form What is it called when sign bit is duplicated when shifting? Which one is the sign bit?
26
**_R**_otate _**R_**ight Form Which bits are used?
27
**_S**_igned E_**xt**_end _**B_**yte **_S**_igned E_**xt**_end _**H_**alfword **_S**_igned E_**xt**_end _**W_**ord Form Use
28
**_U_**nsigned E**_xt_**end **B**yte **_U_**nsigned E**_xt_**end **_H_**alfword Form Use
29
**_B_**it**_f_**ield **_I_**nsert Form
30
**_B_**it**_f_**ield **_E_**xtract and Insert **_L_**ow **_U_**nsigned **_B_**it**_f_**ield **_E_**xtract **_S_**igned **_B_**it**_f_**ield **_E_**xtract Form
31