Steply

Calculate gcd(270, 192) by Euclid's algorithm

Step by step, with the reason for every step · Euclid's algorithm · Discrete Math

Step by step

The question

Question: find gcd(270, 192) by Euclid's algorithm.

gcd(270, 192)

1 Divide the bigger by the smaller

Divide the bigger number by the smaller: 192 goes into 270 once, and 78 is left over.

270 = 1 × 192 + 78

Here is the trick.

A number that goes into 270 and 192 also goes into 78, because 78 is 270 minus 1 × 192.

So the gcd does not change, and the numbers get smaller.

gcd(270, 192) = gcd(192, 78)

2 Keep going

Now the same with 192 and 78: the divisor moves left, the remainder becomes the new divisor.

192 = 2 × 78 + 36

78 = 2 × 36 + 6.

78 = 2 × 36 + 6

36 = 6 × 6, and the remainder is 0.

We stop.

36 = 6 × 6 + 0

3 The last remainder before 0

Careful!

0 only tells us to stop.

The answer is the last remainder before it: 6.

Careful: not gcd(270, 192) = 0 ✗

The last remainder that is not 0 is 6.

So gcd(270, 192) = 6.

gcd(270, 192) = 6

4 Check

6 goes into both: 270 ÷ 6 is 45, and 192 ÷ 6 is 32.

270 ÷ 6 = 45, 192 ÷ 6 = 32

And 45 and 32 have no common factor, so nothing bigger than 6 goes into both.

Right!

45 and 32: no common factor

Let's look back.

First: divide the bigger by the smaller.

Then: keep going.

Then: the last remainder before 0.

Last: check.

Answer
gcd(270, 192) = 6

Your turn

Try this one yourself, then check:

gcd(272, 194)
Show the answer
gcd(272, 194) = 2

More from Euclid's algorithm

The whole lesson: Euclid's algorithm →