Convert from binary to negabinary Given a binary integer inclusively between 0 and 1111111111111111 (i.e. a 16-bit unsigned integer) as input, output the same integer in negabinary.

The input can be in whatever format is most convenient for your language; for example, if it is easier for the program to handle input with 16 digits, like 0000000000000101, rather than simply 101, you can write the program to only accept input that way.

Sample I/O

&gt; 1
1
&gt; 10
110
&gt; 1010
11110
&gt; 110111001111000
11011001110001000
&gt; 1001001
1011001


Here is a sample program I wrote that does base conversions, including negative and non-integer bases. You can use it to check your work.
APL, 21 characters
'01'[-(16/¯2)⊤-2⊥⍎¨⍞]

I used Dyalog APL for this, with ⎕IO set to 0, allowing us to index arrays starting at 0 rather than 1.
Explanation, from right to left:

⍞ gives us the user's input as a character vector.
⍎¨ applies the execute function (⍎) to each (¨) of the aforementioned characters, resulting in a vector of integer 1's and 0's.
2⊥ decodes the vector from base 2 into decimal.
- negates the resulting decimal integer.
(16/¯2)⊤ encodes the decimal integer into base ¯2 (negative 2). (16/¯2 replicates ¯2, 16 times, yielding 16 digits in our negabinary number.)
- negates each element of our newly encoded number (before this, it consists of -1's and 0's), so that we can use it to index our character vector.
'01'[ ... ] indexes the character array ('01') using the 0's and 1's of the negated negabinary vector. This is so we get a prettier output.

Example:
      '01'[-(16/¯2)⊤-2⊥⍎¨⍞]
10111010001
0001101011010001