answersLogoWhite

0

There are two main methods:

  1. Choose one of the numbers to be the dividend of a division and the other to be the divisor.
  2. Perform the division
  3. Ignore the quotient and keep the remainder
  4. If the remainder is zero, the last divisor is the GCD
  5. Replace the dividend by the divisor
  6. Replace the divisor by the last remainder
  7. Repeat from step 2.
It doesn't matter which number is the dividend and which is the divisor of the first division, but if the larger is chosen as the divisor, the first run through the steps above will swap the two over so that the larger becomes the dividend and the smaller the divisor - it is better to choose the larger as the dividend in the first place.
  • Prime factorisation
Express the numbers in their prime factorisations in power format.

Multiply the common primes to their lowest power together to get the GCD.

The first is limited to two numbers, but the latter can be used to find the gcd of any number of numbers.

Examples:

GCD of 500 and 240:

  • Euclid's method:
500 ÷ 240 = 2 r 20

240 ÷ 20 = 6 r 0

gcd = 20

  • Prime factorisation:
500 = 22 x 53

240 = 24 x 3 x 5

gcd = 22 x 5 = 20

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa

Add your answer:

Earn +20 pts
Q: What algorithm is used to calculate GCD of two integers?
Write your answer...
Submit
Still have questions?
magnify glass
imp