Negabinary
The negabinary representation of a number n is its representation in base -2 (i.e., base negative 2). It is therefore given by the coefficients a_n a_(n - 1) ...a_1 a_0 in n | = | sum_(i = 0) a_i (-2)^i | = | ... + a_2 (-2)^2 + a_1 (-2)^1 + a_0 (-2)^0, where a_i = 0, 1. Conversion of n to negabinary can be done using the Wolfram Language code Negabinary[n_Integer] := Module[ {t = (2/3)(4^Floor[Log[4, Abs[n] + 1] + 2] - 1)}, IntegerDigits[BitXor[n + t, t], 2] ]