Chapter 2 Flashcards

1
Q

How is the number -x represented using 2’s complement?

A

-x = 2n-x

(Where n = the number of bits used to represent numbers).

(( in the picture: n = 4 ))

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

What is the algorithm for adding 1 to a binary number?

What is the algorithm for subtracting 1 from a binary number?

A

Move from right to left.

To add 1:

Flip all the digits until you have changed a 0 to a 1.

To subtract 1:

Flip all the digits until you have changed a 1 to a 0.

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

What is the binary representation of Not(x)?

A

Not(x) = -x-1

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

How do the ALU’s control bits control what the ALU computes?

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