3 Computer Arithmetic
3 Computer Arithmetic
BINARY CALCULATIONS
BINARY ADDITION
A B A+B
0 0 0
0 1 1
1 0 1
1 1 10
“two”
ADDITION
1 1
10101 21
+ 11001 + 25
101110 46
SUBTRACTION
1 1
MULTIPLICATION
A B AB
0 0 0
0 1 0
1 0 0
1 1 1
MULTIPLICATION
1110
x 1011
1110
1110
0000
1110
10011010
011
DIVISION 10 110
0
11
10
10
10
0
INTEGER NUMBER REPRESENTATION
COMPUTER NUMBER CALCULATION
1. Un-Signed Magnitude
2. Signed Magnitude
3. 1’S Complement
4. 2’S Complement
UN-SIGNED MAGNITUDE
UN-SIGNED MAGNITUDE
UN-SIGNED MAGNITUDE : CALCULATION
UN-SIGNED MAGNITUDE : ISSUES
2. When using this method for calculations, the answers often turn out
to be incorrect.
00010000.11 → 1.000011 x 24
1.000011 x 24
FLOATING POINT NUMBER
REPRESENTATION
STEP 02 : Exponent Calculation
Exponent : +4