Bitwise Operators Flashcards

1
Q

Bitwise And operator

A

&
= 1 if each bit is 1

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

What are masks?

A

Hide some bits

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

Bitwise inclusive OR operator

A

|
= 1 if either operand is 1

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

Each bitwise operator has corresponding….

A

Assignment operator

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

Left shift operator

A

«
shifts bits of left operand left by right operand
Vacated bits are 0

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

Right shift operator

A

> > shifts bits of left operator right by number of right operator

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

Vacated bits in signed operators are replaced with….

A

0’s or 1’s

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

Bitwise complement operator

A

~
Inverts bits

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

Why store data in but fields?

A

Reduce storage

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