Hi I do not understand the answers to these 2 questions:

1. Can you work out what the remainder is when 2^1000 is divided by 7?

As 1000 = 333 × 3 + 1 then 2^1000 leaves remainder 2 when divided by 7.

2. Expand the brackets of (x − 1)(x − 7) and (x − 3)(x − 5) in mod 8 arithmetic.

(x − 1)(x − 7) = x^2 − 8x + 7 = x^2 − 1 (mod 8);

(x − 3)(x − 5) = x^2 − 8x + 15 = x^2 − 1 (mod 8).

Why is there a "-1", we dont take remainders to be negative?

I'm new to modular arithmetic, just started it right now, so apologies if its a stupid qustion.