Bitwise Operators Flashcards

(12 cards)

1
Q

Bitwise Operators

&
“AND”

A

Sets each bit to 1 if both bits are 1

Ex: x & y

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

Bitwise Operators

|
“OR”

A

Sets each bit to 1 if one of two bits is 1

Ex: x | y

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

Bitwise Operators

“XOR”

A

Sets each bit to 1 if only one of two bits is 1

Ex: x ^ y

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

Bitwise Operators

~
“NOT”

A

Inverts all the bits

Ex: ~x

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

Bitwise Operators

«
“Zero fill left shift”

A

Shift left by pushing zeros in from the right and let the leftmost bits fall off

Ex: x «_space;2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly