Class 6: Bit Shifting Flashcards

1
Q

A & C
A = 1010
C = 0000

A

0000

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

A = false
C = true;
A && C

A

False

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

A |C
A = 1010
C = 0001

A

1011

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

XOR a ^ c
A = 1010
C = 0000

A

1010

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

Left shifting

A

Shifts bits to the left and fill in with 0’s

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

Arithmetic right shift

A

Fills in from the left with copy of most significant bit
Preserves sign of value
Used when interpreting value fo B2T

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

Right shift logical

A

Fills in from the left with 0’s
Used when interpreting binary value as B2U

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

Relational operator

A

Used to compare two values

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

Do arithmetic operators have higher precedence than relational

A

YES

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

Short Circuit Evaluation

A

Relational statements stop evaluating once a statements value if DEFINITIVE

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

Type casting

A

(Type)

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

0 is treated as_____

A

FALSE

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

Non-zero is treated as _____

A

TRUE

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