TITLE: What is $\gcd(0,a)$, where $a$ is a positive integer?
QUESTION [28 upvotes]: I have tried $\gcd(0,8)$ in a lot of online  gcd (or hcf) calculators, but some say $\gcd(0,8)=0$, some other gives $\gcd(0,8)=8$ and some others give $\gcd(0,8)=1$. So really which one of these is correct and why there are different conventions?

REPLY [4 votes]: It might be partly a matter of convention. However, I believe that stating that  $\gcd(8,0) = 8$ is safer. In fact, $\frac{0}{8} = 0$, with no remainder. The proof of the division, indeed is that  "Dividend = divider $\times$ quotient plus remainder". In our case, 0 (dividend) = 8 (divisor) x 0 (quotient). No remainder. Now, why should 8 be the GCD? Because, while the same method of proof can be used for all numbers, proving that $0$ has infinite divisors, the greatest common divisor cannot be greater than $8$, and for the reason given above, is $8$.