Ch 4 Flashcards

(11 cards)

1
Q

What is the informal name for performing bit level manipulations using bitwise logical functions?

A

Bit Twiddling

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

What operator is used with a but mask(1«i) to turn a bit ON( set it to 1) without affecting others?

A

OR(|)

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

What operators are combined with a bitmask~(1«i) to turn a bit off , clear it to 0) without affecting others?

A

And(&) is combined with the outside or

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

What operator is used with a bit mask(1«i) to flip a bits state to toggle it

A

XOR(^)

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

Why is the first pin/LED in a bank referred to as Number Zero?

A

Because C code uses zero-indexing( starting counts and array positions at 0)

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

What is the informal name for performing bit-level manipulations using bitwise logical functions?

A

Bit twiddling

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

What operator is used with a bitmask(1«i) to turn a bit on (set it to 1) without affecting others?

A

OR(|)-used for setting bits

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

What operators are used with a bitmask (1«i) to turn a bit off( clear it to 0) without affecting others?

A

And(&) and Not(~)

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

What operator is used with a bitmask(1«i) to flip a bits state(to toggle it)?

A

XOR(^)

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

Why is the first pin/LED in the bank referred to as Number Zero(eg PB0)?

A

Because c code uses zero-indexing where it starts counting positions at 0

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

Or

A

Is used for setting a bit to one and and is used for checking a bit and clearing

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