3.3 - Binary Arithmetic Flashcards
1
Q
What is an overflow error?
A
When the result of an addition is too large for the number of bits the computer works with
2
Q
Rough steps for binary multiplication?
A
Do a binary shift to to left on one depending on the number of 1’s on the other number
Then add these binary shifted numbers
1 in the 1’s column shift it no times
1 in the 2’s column shift it once
Etc
3
Q
How do we represent negative numbers?
A
Two’s complement
Flip all the 1’s and 0’s
Then add a 1
4
Q
How do we do binary subtraction using two’s complement?
A
65 - 43
We can do 65 + (-43)
5
Q
What indicates a negative number in the binary code?
A
1 in the leftmost bit