1.3 Binary Shifts and Two’s Complement Flashcards

(14 cards)

1
Q

What is the result of multiplying the binary number 0101 0101 1101 1101 by two?

A

1010 1011 1011 1010

To multiply a binary number by two, move all bits to the left and put a zero at the right.

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

How do you divide a binary number by 2?

A

Move the bits to the right and put a zero in the most significant bit

Dividing by 2 results in a loss of precision for non-integer results.

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

What happens to the fractional component when dividing an 8-bit binary number?

A

It is lost

Example: 45 ÷ 2 = 22.5 is represented as 22 in binary.

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

What is the effect of a logical left shift on a binary number?

A

Doubles the number

Example: 1000 (8) becomes 10000 (16) after a left shift.

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

What is the effect of a binary right shift on a number?

A

Halves the number and rounds down

Example: 1000 (8) becomes 100 (4) after a right shift.

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

What is the range of numbers that can be represented using 8-bit Two’s Complement?

A

-128 to 127

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

How is -15 represented in Two’s Complement?

A

1111 0001

First convert 15 to binary, then invert the bits and add 1.

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

What does the Two’s Complement representation 1011 0001 signify?

A

-79

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

What is the result of the left shift of 0110 1011?

A

1101 0110

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

What is the effect of a left shift on a binary number?

A

We double the number

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

What is the result of the right shift of 0110 1010?

A

0011 0101

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

What is the effect of a right shift on a binary number?

A

We halve the number

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

What happens during a further right shift?

A

We halve the number and round down, leading to a loss of precision

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

What is the Two’s Complement of 0110 1010 (106)?

A

10010110 (-106)

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