I know that one can covert number in base 10 to another bases by dividing the base number to covert to and take the remainders in reverse order to get the result.

but for negative bases, how exactly it can be done?

As according to wiki, the same calculation can be used, but how exactly to divide a number with negative number?

Ofcuz, I know 6/-3 = -2 , -6/-3 = 2

but how is -5/-3 = 2 with 1 as remainder?