Binary = base 2 number system.
Uses only two digits: 0 and 1.
Each position (bit) represents a power of 2.
All information inside a computer (numbers, letters, images,
sound) is ultimately represented in binary (0s and 1s).
Next bits: 0 − 1 (after borrow) → borrow again → 10 − 1 =
1
3
Next bits: 0 − 1 (after borrow) → borrow again → 10 − 1 =
1
4
Leftmost bits: 0 − 0 (after borrow) = 0
Result: (1010)₂ − (0111)₂ = 0011₂ = 3₁₀
Binary Multiplication
Multiply
Result
0 × 0
0
0 × 1
0
1 × 0
0
1 × 1
1
Example: (101)₂ × (11)₂
Multiplying: 5₁₀ × 3₁₀ = 15₁₀
101
× 11
-----
101 (101 × 1)
+ 1010 (101 × 1, shifted left)
-----
1111
1
Multiply 101 × 1 (rightmost bit) = 101
2
Multiply 101 × 1 (next bit) = 101, shift left by 1
position = 1010
3
Add the results: 101 + 1010 = 1111
Result: (101)₂ × (11)₂ = 1111₂ = 15₁₀
Binary Division
Example: (1100)₂ ÷ (10)₂
Dividing: 12₁₀ ÷ 2₁₀ = 6₁₀
110
_____
10 ) 1100
10
--
10
10
--
00
1
10 goes into 11 → 1 time, write 1
2
1 × 10 = 10, subtract from 11 → 01
3
Bring down next bit → 10
4
10 goes into 10 → 1 time, write 1
5
1 × 10 = 10, subtract from 10 → 00
6
Bring down next bit → 00
7
10 goes into 00 → 0 times, write 0
Result: (1100)₂ ÷ (10)₂ = 110₂ = 6₁₀
Signed Binary Numbers
What Does "Signed" Mean?
In computing, a signed binary number can be positive or
negative.
To represent negative numbers, we use something called Two's
Complement.
Unsigned binary = only positive numbers (e.g., 0
to 255 in 8 bits) Signed binary (Two's Complement) = both positive
and negative numbers (e.g., −128 to +127 in 8 bits)
Why Use Two's Complement?
It allows using the same adder hardware for both addition and
subtraction
There's only one representation for zero (unlike sign-magnitude)
It simplifies logic and makes overflow detection easier
How to Represent a Negative Number Using Two's Complement