This is for my assembly language class. I am finding different answers. My answer was $15_7$. But a friend got 2824. Can someone please explain the correct way to do it if $15_7$ is wrong?
$$(235432_7 \cdot 2551_7) \pmod{311_7} = N_7 = ?$$
This is for my assembly language class. I am finding different answers. My answer was $15_7$. But a friend got 2824. Can someone please explain the correct way to do it if $15_7$ is wrong?
$$(235432_7 \cdot 2551_7) \pmod{311_7} = N_7 = ?$$
$235432$ in base 7 is $2+3\cdot 7 + 4\cdot 7^2+5\cdot 7^3+3\cdot 7^4+2\cdot 7^5 = 42751$ in base 10
$2551$ in base 7 is $1+5\cdot 7+5\cdot 7^2+2\cdot 7^3 = 967$ in base 10
$311$ in base 7 is $1+1\cdot 7 + 3\cdot 7^2 = 155$ in base 10
$42751\cdot 967\pmod{155}\equiv 12$
$12$ in decimal is $5+1\cdot 7$ is $15$ in base 7
Note, if the answer was expected to be in base 7, then your friends answer of $2824$ doesn't even make sense since $8$ is not a valid digit in base 7.
I'm going to use notation $235432$ as $2.3.5.4.3.2$ where it's understood this is a sum and each term between periods is multiplied by a power of seven.
$2.3.5.4.3.2 \equiv 17.5.4.3.2 - 15.5.5.0.0\equiv 2.0.-1.3.2 \equiv 1.6.6.3.2 \equiv 13.6.3.2 - 12.4.4.0 \equiv 1.2.-1.2 \equiv 8.6.2 - 6.2.2 \equiv 2.4.0 \equiv 240_7 \mod (311_7)$
$2551_7 \equiv 2.5.5.1 \equiv 19.5.1 - 18.6.6 \equiv 1.-1.-5 \equiv 6.-5 \equiv 5.2 \equiv 52_7 \mod (311_7)$
$240_7*52_7 \equiv 10.20+4.8.0 \equiv 10.24.8.0 - 9.3.3.0 \equiv 1.21.5.0 \equiv 28.5.0 - 27.9.9 \equiv 1.-4.-9 \equiv 3.-9 \equiv 1.14-9 \equiv 1.15 \equiv 15_7 \mod (311_7)$