Visualisation of using the binary GCD algorithm to find the greatest common divisor (GCD) of 36 and 24. Thus, the GCD is 22 × 3 = 12. The binary GCD algorithm, also known as Stein's algorithm or the binary Euclidean algorithm,[1][2] is an algorithm that computes the greatest common divisor (GCD) of two nonnegative integers. Stein's algorithm uses simpler arithmetic operations than the conventional
![Binary GCD algorithm - Wikipedia](https://cdn-ak-scissors.b.st-hatena.com/image/square/22b6272f31c09d2eb676812ef45bd99618e155a5/height=288;version=1;width=512/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2Fb%2Fbd%2FBinary_GCD_algorithm_visualisation.svg%2F1200px-Binary_GCD_algorithm_visualisation.svg.png)