Bit manipulation Flashcards

1
Q

What does a&raquo_space; 2 mean?

A

Shifting a to the right 2 places

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

What does a &laquo_space;1 mean?

A

Shifting to the left 1 place

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

When a = 10100000 what does a | (1 «2) look like?

A

1 &laquo_space;2 = 00000100

10100000 | 00000100 = 10100100

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

When a = 10100000 what does a &= ~(1 &laquo_space;7) look like?

A

1 &laquo_space;7 = 10000000
~(1 &laquo_space;7) = 011111111
01111111 & 10100000 = 00100000

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

What is bitwise AND?

A

&

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

What is bitwise OR?

A

|

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

What is bitwise XOR?

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

What is bitwise NOT?

A

~

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