I need to convert a decimal number into base $3$ number.
$47_{10} ~~\mbox{is}~~ 1202_{3}$.
But how do you represent a negative number in base $3$ notation like $-297$?
please include a example
$\endgroup$ 22 Answers
$\begingroup$Just put a minus sign in front of it. By definition, in base 10 $47 + (-47) = 0$; therefore, $1202_3 + (-1202_3) = 0$ and so $-47_{10}$ is $-1202_3$.
$\endgroup$ $\begingroup$or you can use 2's compliment and 3's complement which are 2 other ways to represent positive or negative in base 3.
2's compliment base 3 is like 1's compliment in binary and 3's compliment in base 3 is like 2's compliment in binary.
$\endgroup$