Stpid question, I know, but I need to understand. As far as I know $\gcd(12, 6)$ is equal to $\gcd(6, 12)$. But, if I use extended euclidean algorithm I get: $\gcd(12, 6)\quad 12/6=2\quad12\%6=0$ While if I swap the two integers: $\gcd(6,12)\quad 6/12=0\quad 6\%12=6$ next step $12/6=2\quad 12\%6=0$
So, in first case the one and only remainder that I get is $0$ (there is no remainders first of null remainder). In the second place, first of null remainder there is $6$! What's the real $\gcd(12,6)$?