Thanks in advance,
Steve
PS- Not homework. Just for fun. :-)
Try MathWorld.
http://mathworld.wolfram.com/Negabinary.html
http://mathworld.wolfram.com/Negadecimal.html
Or Wikipedia (which works an example in negabinary).
http://en.wikipedia.org/wiki/Negabinary
Or HAKMEM (lots of useful math stuff, at
http://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html ):
http://www.inwap.com/pdp10/hbaker/hakmem/flows.html#item128
--- Christopher Heckman
use the normal base conversion algortithm (repeated division recording the
remainders)
to cobvert 74 to base -3
74/-3 = -24 r 2
-24/-3 = 8 r 0
8/-3 = -2 r 2
-2/-3 = 1 r 1
1/-3 = 0 r 1
answer is 11202
1 * 81 + 1 * -27 + 2 * 9 + 0 * -3 + 2 * 1
Bye.
Jasen