Converting to base $-2$

104 Views Asked by At

How to convert a number given in Decimal to negative base.?

For eg I want to convert $67$ given in decimal base to base $-2$.?

1

There are 1 best solutions below

0
On

$67 = \color{red}1 \cdot (-2)^6 + \color{red}0 \cdot (-2)^5 + \color{red}0 \cdot (-2)^4 + \color{red}0 \cdot (-2)^3 + \color{red}1 \cdot (-2)^2 + \color{red}1 \cdot (-2)^1 + \color{red}1 \cdot (-2)^0$, so $67_{10} = 1000111_{-2}$.

An interesting feature of this base system is that you can represent negative numbers without a minus sign. For example, $-67_{10} = 11001101_{-2}$.