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
2
Q
Signed numbers are represented in computers using what method?
A
Signed numbers are represented in computers using the two’s complement method
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.
4
Q
How can you do two’s complement subtraction?
A
Add a negative number.
5
Q
Covert 15 to -15 in binary
A
0000 1111 = 15 1111 0000 (flip the bits) 1111 0001 (Add 1)
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