# Negative binary decoder

World's simplest binary tool
This is a free online negative binary number decoder. Just load your encoded negative binaries in the input form and they will automatically get decoded to decimal numbers according to the selected negative binary representation method. It supports one's complement, two's complement, excess binary, sign bit, and base -2 representations. There are no ads, popups or nonsense, just an awesome negative binary converter. Load a negative binary – get a negative decimal. Created for developers by developers from team Browserling.

announcement
a new site!

We just launched a new site – Online List Tools – utilities for working with lists. Check it out!

A link to this tool, including input, options and all chained tools.

Can't convert.

## What is a negative binary decoder?

learn more about this tool
This browser-based utility converts negative binary values to negative integer values. This is the reverse operation of encoding a negative binary that converts a negative integer to its binary representation. This tool is able to decode six negative binary representation types – two's complement, one's complement, sign bit, offset binary, negative base two, and the naive scheme. To decode a binary number, it undoes the encoding process and performs the encoding steps in the reverse order. For example, in two's complement encoding the number is first inverted and then one is added to the result but in two's complement decoding, the same is done in the reverse order – first, one is subtracted and then the result is inverted. To decode a negative one's complement value, simply the inverse is taken as encoding and decoding in one's complement is just the bit invert operation. In the sign bit representation, this tool removes the most significant bit, which indicates the sign of the number and converts this number to base ten. The offset binary method (also known as excess code or biased representation) is almost the same as the two's complement method, but it has a sign bit at the beginning. Therefore, the tool first deletes the most significant bit and then applies the two's complement method on the number. Each output decimal number in these four representations has a "-" sign automatically appended so these representations don't work with positive decimal numbers. In base minus 2 representation, the decimal number x is immediately calculated by the formula x = a

_{0}(-2)^{n}+ a_{1}(-2)^{n-1}+ … + a_{n}(-2)^{0}. The coefficients a_{0}, a_{1}, …, a_{n}are individual bits of the input binary number in base -2 representation. The last method is the easiest to decode. It's the naive method that creates negative binary numbers with the help of the "-" sign that's placed before an ordinary binary number. To decode this value, the binary number after the minus sign is converted to base ten and then the base ten number is displayed in the output together with the minus sign in front of it. Simple and easy!## Negative binary decoder examples

Click to useDecode 2's Complement

This example decodes seven negative binaries that had previously been encoded with the two's complement method. It subtracts one from each number and then inverts the bits. Decoding the first number, we get: 001 → 000 → 111, decoding the second number, we get: 0011 → 0010 → 1101, decoding the third number, we get: 01000 → 00111 → 11000, and so on. After decoding, the obtained values are converted to base ten and a minus sign is added at the beginning of each number. The first number: 111

_{2}= -7_{10}, the second number: 1101_{2}= -13_{10}, the third number: 11000_{2}= -24_{10}, and so on.
001
0011
01000
011010
001101
0100011
0010111

-7
-13
-24
-38
-51
-93
-105

**Required options**

Decode 1's Complement

In this example, we convert six padded negative binaries in one's complement representation to negative integers in the decimal base. To decode a one's complement value, it's first bitwise inverted (all bits are flipped) and then the result is converted to base ten with a minus sign before the value. One's complement method uses leading 1's to pad negative binaries. When finding the inverse value, 1's are replaced with 0's, thus padding doesn't affect the magnitude of the binary value. Let's take a look at the first input value. It's 111100, then when it's inverted, it becomes 000011, which is 3 in base ten, and a minus sign is added in front of it, so we get -3.

111100
111010
111000
110110
110100
110010

-3
-5
-7
-9
-11
-13

**Required options**

Sign Bit Negatives

This example selects the sign bit representation method in the options. This method uses the high bit (most significant bit) to determine the sign of a value. If the high bit is 1, then it's a negative number; otherwise, it's a positive number. The input values in this example have also been prefixed with the binary prefix "0b" and padded to eight bits. To convert these values, the tool removes the binary prefix, removes padding, removes the most significant bit, and treats the remaining bits as regular binary numbers. It then converts them from the binary base to the decimal base and outputs them with a minus sign as all of them had the sign bit of 1.

0b100001011
0b100010110
0b100100001
0b100101100
0b100110111
0b101000010
0b101001101
0b101011000
0b101100011

-11
-22
-33
-44
-55
-66
-77
-88
-99

**Required options**

Biased Representation

In this example, we decode six binary values that were earlier encoded using the offset binary (biased binary) representation scheme. The utility first removes the sign bit, which in this scheme is "0" and also removes the binary subscript postfix. Then it subtracts one, inverts the number, converts it to base ten, and adds the "-" sign. We can visualize the conversion algorithm for the first number: 00111₂ → (remove the first bit and ₂ postfix) → 0111 → (subtract one) → 0110 → (invert bits) → 1001 → (convert to decimal) → -9.

00111₂
00101011₂
0000000₂
0000100111₂
00000000000₂
0010000101010₂

-9
-85
-64
-473
-1024
-3030

**Required options**

Base Minus Two

This example uses an unusual base -2 and decodes numbers to base 10. To do this, it uses the formula x = a

_{0}(-2)^{n}+ a_{1}(-2)^{n-1}+ … + a_{n}(-2)^{0}, where x is the number in base 10 and the coefficients a_{0}, a_{1}, …, a_{n}are the input bits. This formula and the bits uniquely express a negative number in base 10. Let's convert the first binary number 1101 together. We have the coefficients a_{0}= 1, a_{1}= 1, a_{2}= 0, a_{3}= 1, and when we put them in the formula, we get 1×(-2)^{3}+ 1×(-2)^{2}+ 0×(-2)^{1}+ 1×(-2)^{0}= -8 + 4 + 0 + 0 = -4. So, 1101₂ is -4₁₀.
1101
111011
1111010100
1001000111
100000110100
111110001001000101

-3
-25
-300
-445
-2060
-90555

**Required options**

Naive Numbers

In this example, we decode binary numbers that simply have a minus sign in front of them. This binary representation is the only one that humans can instantly understand. It doesn't modify the binary values and simply uses the regular "-" sign to create negative numbers. Therefore, to get a negative binary, we take the absolute binary value and add the "-" sign in front of it. If 111 is 7, then -111 is -7.

-111
-1010111
-1011111101
-1100110001111
-1101010000110001

-7
-87
-765
-6543
-54321

**Required options**

Pro tips
Master online binary tools

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!
https://onlinebinarytools.com/decode-negative-binary

__?input__=001%0A0011%0A01000%0A011010%0A001101%0A0100011%0A0010111&representation=twos-complement
All binary tools

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.

Coming soon
These binary tools are on the way

Binary Editor

View and edit binary values in your browser.

Create a File from Binary Values

Convert binary numbers to a binary file.

Binary Dump a File

Create a binary dump of files in your browser.

Convert Binary to Arbitrary Base

Convert binary values to any base (up to base 64).

Convert Binary to Roman Number

Convert binary numbers to Roman numerals.

Convert Roman Number to Binary

Convert Roman numerals to binary values.

Add Binary Bits

Find the sum of set bits in binary numbers.

Generate a Binary Sequence

Create a list of increasing of decreasing binary numbers.

Generate an Alternating Binary Sequence

Create a binary number with alternating bits.

Binary Sheffer Stroke

Calculate bitwise sheffer stroke operator of binary values.

Convert Binary to BCD

Encode every binary bit as a binary coded decimal.

Convert BCD to Binary

Decode binary coded decimals to binary bits.

Divide Binary Numbers

Perform division operation on several binary numbers.

Rotate a Binary Right

Rotate bits of a binary number to the right.

Rotate a Binary Left

Rotate bits of a binary number to the left.

Extract Bits from Binary Numbers

Extract n-th bit from a binary number.

Calculate Parity

Count parity of a binary number.

Convert EBCDIC to Binary

Convert EBCDIC characters to binary values.

Convert Binary to EBCDIC

Convert binary bits to EBCDIC symbols.

Swap Binary Endianness

Change endianness of a binary number.

Convert Little Endian Binary to Big Endian Binary

Convert a binary number from little endian to big endian.

Convert Big Endian Binary to Little Endian Binary

Convert a binary number from big endian to little endian.

Convert a Floating Point Number to Binary

Find the binary representation of a floating point number.

Convert a Binary Number to Floating Point

Decode a binary number to a floating point number.

Binarize an Image

Convert any image to binary colors.

Convert Binary Values to a Bitmap

Convert a binary string to a bitmap image.

Convert a Bitmap to Binary Numbers

Convert a bitmap image to zeros and ones.

Duplicate Bits in Bytes

Replace each bit with two bits in each byte.

Convert Bits to Bytes

Group bits together to create bytes.

Convert Bytes to Bits

Expand bytes into individual bits.

Split Binary Values

Split a binary number into smaller binary numbers.

Join Binary Values

Join multiple smaller binary numbers into a single binary.

Slice Binary Values

Extract a part of a binary number.

Replace Binary Values

Substitute ones and zeros with any other values.

Pad Binary Values

Add signed or unsigned padding to binary numbers.

Truncate Binary Values

Drop leading or trailing bits and make a binary value shorter.

Randomly Flip Binary Bits

Introduce random errors in binary values.

Color Binary Numbers

Print the same binary numbers in the same colors.

Color Binary Bits

Use two different colors for binary zeros and ones.

Compare Binary Streams

See the difference between two binary blobs of bytes.

Visualize Binary Operations

Create visualizations of and, or, xor, not binary ops.

Create a Binary ZigZag

Make binary bits go in a zigzag.

Create a Binary Spiral

Make binary bits go in a spiral.

Create a Binary Circle

Make binary bits go in a circle.

Create a Binary Square

Create a sqaure shape from binary bits.

Generate Random Bits

Create a sequence of random binary bits.

Generate Random Nibbles

Create a sequence of random binary nybbles.

Generate Random Bytes

Create a sequence of random binary octets.

Generate Random Words

Create a sequence of random binary words.

Generate Random Double Words

Create a sequence of random binary long words.

Generate Binary Look-and-Say

Create a look-and-say sequence in base-2.

RLE-encode a Binary Number

Apply run length encoding algorithm on a binary sequence.

RLE-decode a Binary Number

Decode a previously RLE-encoded binary sequence.

Spell a Binary Number

Spell a binary number in words.

Analyze Binary Data

Print statistics of the input binary values.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!

_{2}= -3.