Addition
10 + 0 → 0
20 + 1 → 1
31 + 0 → 1
41 + 1 → 0, carry 1
5
6 For e.g
7
8 1 1 1 1 1 (carried digits)
9 0 1 1 0 1
10+ 1 0 1 1 1
11 -------------
12= 1 0 0 1 0 0 = 36
Subtraction
Multiplication
Negative Binary numbers
How can we represent a negative number? We cannot use a ‘-‘ sign because all we can store in the computer is zeros and ones.
There are three methods
- Signed Magnitude
- 1’s Complement
- 2’s complement
Full text about binary number operations.
Credits
CS Camosun