Unformatted text preview: esentation 6 addition of positive numbers works fine? 4 value represented 3 OVERFLOW: if sum is more than max positive, it becomes negative: 2+4 = 4
(unavoidable since we have a fixed word size) 10’s complement
10
0 1
2
3 9
8 0 1
1 7
4 3
5
5 4 2 2 representation 6 addition of positive and negative numbers… 4 value represented 3 …works because going clockwise 7 is like going counterclockwise 3 10’s complement
10 Addition is moving forward along the number line, subtraction is moving back A – B = A + (– B) Clock Diagram Using 3 digits
Using 3 digits If we had 3 digits, which positive and negative numbers could we represent? What would the representation of 7 be? 1000’s clock 10’s complement
10
000 100
900 200 800 0 100
100 representation 300 700 addition of positive and negative numbers… 200 200
300 400
600
500
400
0
400
500
value represented 300 …works because going clockwise n is like going counterclockwise 1000n Moving to Binary
Moving to Binary Using 4 bits, which positive and negative numbers can we represent? What is the repre...
View
Full Document
 Fall '09
 Computer Science, Negative Numbers, Humpty, Dumpty

Click to edit the document details