Free online binary to negabinary converter. Just load your binary numbers and they will automatically get converted to base -2. There are no ads, popups or nonsense, just an awesome negabinary encoder. Load a binary – get a negabinary. Created for developers by developers from team Browserling.
This browser utility converts binary numbers to negabinary numbers. It takes a value in base 2 and returns this value in base -2. Let's review how to convert a base 10 number to the binary base. To find a decimal number's representations in a binary base, write it as a sum of powers of two and then copy the coefficients before the powers. The coefficients create the binary number. Let's do it for the number 6 as an example: 6 = 1×(-2)2 + 1×(-2)1 + 0×(-2)0. The coefficients are 110, therefore 610 = 1102. The negabinary numeral system uses the same sum formula to convert a number, except instead of powers of two, it's decomposed as powers of negative two. For the number 6, it looks like this: 6 = 1×(-2)4 + 1×(-2)3 + 0×(-2)2 + 1×(-2)1 + 0×(-2)0. Now, extracting the coefficients, we get 610 = 11010-2. The biggest advantage of the negabinary system is that it can express negative numbers without using a special sign bit or a special signed number representation, such as two's complement or offset binary (see encode negative binary tool). Base -2 uses the same decomposition formula. For example, -6 can be decomposed as 1×(-2)3 + 1×(-2)2 + 1×(-2)1 + 0×(-2)0 and from the coefficients we find that -610 = 1110-2. An interesting fact about the negabinary base is that positive numbers have an odd number of bits and negative ones have an even number of bits. This tool can also show the number representation formula in base -2 and print the decimal value next to the binary. To convert multiple numbers, enter each of them on a new line and use the "-" sign to work with negative binaries. Simple and easy!
In this example, we convert four numbers from the binary base to the negabinary base. We also show their decimal values so that they were easier to understand. The second and fourth numbers in the input are negative because they start with the minus sign. In the output, there's no minus sign as it's not needed in the negabinary base because the base is made out of a sum of powers of -2 so the sign value is included in the base itself.
This example finds the representation formulas for six base -2 binaries and prints the full sums. Positive numbers have an odd number of addends in the sum and negative numbers have an even number of addends. This is simply because the largest power dominates the entire sum. If the number of terms is odd, then the top power is positive and the entire sum is positive, if the number of terms is an even number, then the top power is negative and the entire sum is negative.
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
Quickly convert ASCII characters to binary numbers.
Quickly convert binary numbers to ASCII characters.
Quickly convert UTF8 characters to binary bits.
Quickly convert binary bits to UTF8 characters.
Quickly generate random binary values.
Quickly create an image from a binary number.
Quickly convert binary numbers to octal numbers.
Quickly convert octal numbers to binary numbers.
Quickly convert binary numbers to decimal numbers.
Quickly convert decimal numbers to binary numbers.
Quickly convert binary numbers to hexadecimal numbers.
Quickly convert hexadecimal numbers to binary numbers.
Quickly convert octal values to BCD values.
Quickly convert BCD values to octal values.
Quickly convert decimal values to BCD values.
Quickly convert BCD values to decimal values.
Quickly convert hex values to BCD values.
Quickly convert BCD values to hex values.
Quickly convert an IP address to a binary IP address.
Quickly convert a binary IP address to a human readable IP.
Quickly convert an IPv6 address to a binary IPv6 address.
Quickly convert a binary IPv6 address to a human readable IPv6.
Quickly convert a string to binary values.
Quickly convert binary values to a string.
Quickly convert binary numbers to reflected binary numbers.
Quickly convert reflected binary numbers to binary numbers.
Quickly convert octal numbers to reflected binary numbers.
Quickly convert reflected binary numbers to octal numbers.
Quickly convert decimal numbers to reflected binary numbers.
Quickly convert reflected binary numbers to decimal numbers.
Quickly convert hexadecimal numbers to Gray code.
Quickly convert Gray code to hexadecimal numbers.
Quickly calculate the sum of a bunch of binary values.
Quickly calculate the difference of a bunch of binary values.
Quickly calculate the product of a bunch of binary values.
Quickly convert a negative number to a binary representation.
Quickly convert a negative binary number to a decimal number.
Quickly convert base 2 numbers to base -2.
Quickly calculate bitwise AND of a bunch of binary values.
Quickly calculate bitwise NAND of a bunch of binary values.
Quickly calculate bitwise OR of a bunch of binary values.
Quickly calculate bitwise NOR of a bunch of binary values.
Quickly calculate bitwise XOR of a bunch of binary values.
Quickly calculate bitwise XNOR of a bunch of binary values.
Quickly calculate bitwise NOT of a bunch of binary values.
Quickly find the number of high bits in binary values.
Quickly find the number of low bits in binary values.
Quickly invert bits of binary numbers.
Quickly reverse the order of bits in binary numbers.
Quickly convert plain text to binary values.
Quickly convert binary numbers to plain text.
Quickly randomize the order of bits in binary numbers.
Quickly rotate bits in binary numbers to the left or right.
Quickly shift bits of a binary number to the left.
Quickly shift bits of a binary number to the right.
View and edit binary values in your browser.
Convert binary numbers to a binary file.
Create a binary dump of files in your browser.
Convert binary numbers to ternary numbers.
Convert ternary numbers to binary numbers.
Convert binary values to any base (up to base 64).
Convert binary numbers to Roman numerals.
Convert Roman numerals to binary values.
Find the sum of set bits in binary numbers.
Swap pairs of adjacent bits in a binary number.
Create a list of increasing of decreasing binary numbers.
Create a binary number with alternating bits.
Create a list of all binary choices of a specific length.
Calculate bitwise sheffer stroke operator of binary values.
Encode every binary bit as a binary coded decimal.
Decode binary coded decimals to binary bits.
Perform division operation on several binary numbers.
Rotate bits of a binary number to the right.
Rotate bits of a binary number to the left.
Extract n-th bit from a binary number.
Count parity of a binary number.
Convert EBCDIC characters to binary values.
Convert binary bits to EBCDIC symbols.
Change endianness of a binary number.
Convert a binary number from little endian to big endian.
Convert a binary number from big endian to little endian.
Find the binary representation of a floating point number.
Decode a binary number to a floating point number.
Convert any image to binary colors.
Convert a binary string to a bitmap image.
Convert a bitmap image to zeros and ones.
Replace each bit with two bits in each byte.
Group bits together to create bytes.
Expand bytes into individual bits.
Split a binary number into smaller binary numbers.
Join multiple smaller binary numbers into a single binary.
Extract a part of a binary number.
Substitute ones and zeros with any other values.
Add signed or unsigned padding to binary numbers.
Drop leading or trailing bits and make a binary value shorter.
Introduce random errors in binary values.
Print the same binary numbers in the same colors.
Use two different colors for binary zeros and ones.
See the difference between two binary blobs of bytes.
Create visualizations of and, or, xor, not binary ops.
Make binary bits go in a zigzag.
Make binary bits go in a spiral.
Make binary bits go in a circle.
Create a sqaure shape from binary bits.
Create a sequence of random binary bits.
Create a sequence of random binary nybbles.
Create a sequence of random binary octets.
Create a sequence of random binary words.
Create a sequence of random binary long words.
Create a look-and-say sequence in base-2.
Apply run length encoding algorithm on a binary sequence.
Decode a previously RLE-encoded binary sequence.
Spell a binary number in words.
Print statistics of the input binary values.
Subscribe to our updates. We'll let you know when we release new tools, features, and organize online workshops.
Enter your email here
when the Show Full Sum option
is off.