Topic 5 - Signed binary using two's complement Flashcards

1
Q

What is signed binary?

A

Signed binary numbers are encoded to include a positive or negative sign

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

Signed numbers are represented in computers using what method?

A

Signed numbers are represented in computers using the two’s complement method

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

How does two’s complement work?

A

The most significant bit will indicate 1 for a negative number and 0 for a positive number.

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

How can you do two’s complement subtraction?

A

Add a negative number.

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

Covert 15 to -15 in binary

A
0000 1111 = 15
1111 0000    (flip the bits)
1111 0001     (Add 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Subtraction using two’s complement

15 - 12

A
15 = 0000 1111
12 = 0000 1100 which is 1111 0100 in two's complement

0 0 0 0 1 1 1 1
1 1 1 1 0100
——————–
0000000011 or 3

15 - 12 = 3

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