ARITHMETIC FOR COMPUTER
OPERATION OF INTEGER
.Addition and Subtraction
.Multiplication and Division
.Dealing with overflow
FLOATING - POINT REAL NUMBER
.Represent and operations
INTEGER ADDITION
BINARY
HEXADECIMAL
INTEGER SUBTRACTION
BINARY
0 | borrows | |
0 0 | = | 37(base 10) |
- 0 0 0 1 0 0 0 1 | = | 17(base 10) |
0 0 0 1 0 1 0 0 | = | 20(base 10) |
INTEGER MULTIPLICATION
BINARY
0 0 1 0 1 0 0 1 | = | 41(base 10) | |
× 0 0 0 0 0 1 1 0 | = | 6(base 10) | |
0 0 0 0 0 0 0 0 | |||
0 0 1 0 1 0 0 1 | |||
0 0 1 0 1 0 0 1 | |||
0 0 1 1 1 1 0 1 1 0 | = | 246(base 10) |
INTEGER DIVISION
1 | 1 | 1 | = | 7(base 10) | |||||||||
1 1 0 | ) | 0 | 0 | | 10 | 1 | 0 | 1 | 0 | = | 42(base 10) | ||
- | 1 | 1 | 0 | = | 6(base 10) | ||||||||
1 | borrows | ||||||||||||
| 10 | 1 | |||||||||||
- | 1 | 1 | 0 | ||||||||||
1 | 1 | 0 | |||||||||||
- | 1 | 1 | 0 | ||||||||||
0 | |||||||||||||