I need the gcd of $8+i$ and $4-2i$. I tried using euclidean algorithm,but what I got is different from what a software said. First I calculated $8+i/4-2i$ which is $1+i$ and the remainder is $2-i$. Then I calculated $4-2i/2-i$ which is $2$ and the remainder is $0$, so the gcd should be $2-i$. However the software says it's $1+2i$. So what is the truth?
Both are correct. The GCD is only unique up to multiplication with a unit and it is $(2-i) \cdot i = 1 + 2i$. The units in this ring are $1,i,-1,-i$. So the solutions $-2+i$ and $-1-2i$ would also be correct.