Find the GCD without a single division
Euclid's algorithm, mental version: subtract the small from the big until you get the same value. That's the GCD.
The algorithm in 1 sentence
The GCD of two numbers doesnβt change if you replace the bigger one with its difference with the smaller.
Example step by step: GCD(84, 30)
| Step | Operation | Result |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | β |
GCD(84, 30) = 6.
The Β« division Β» version (faster)
Instead of subtracting many times, take the remainder of the division:
- β GCD(30, 24)
- β GCD(24, 6)
- β GCD = 6.
This is the classic Euclidean algorithm.
Spot-the-shortcut
If both numbers end in the same even digit, try 2 as a factor. If both are multiples of 3 (digit sum), try 3. Skip the algorithm.
What is the GCD of 48 and 36?
Mini-quiz
Question 1 / 3GCD(24, 36) = ?
