+/- Two’s Complement Arithmetic

Signed Binary Calculator

Calculate signed binary addition, subtraction, multiplication and division using two’s-complement representation. Choose a bit width, enter positive or negative binary values, and view decimal equivalents, signed result, overflow status, numeric range and calculation details.

Signed Addition Signed Subtraction Signed Multiplication Signed Division Two’s Complement Overflow Detection
Signed Binary Arithmetic Two’s Complement
Enter the complete two’s-complement bit pattern using the selected width.
Signed range is -2^(n-1) through 2^(n-1)-1.
Signed Binary Result
First Decimal
Second Decimal
Mathematical Result
Stored Signed Value
Overflow
Minimum
Maximum
Bit Width
Result Sign Bit
Operation
Signed Calculation Steps

What Is a Signed Binary Calculator?

A signed binary calculator performs arithmetic on binary values that can represent both positive and negative numbers. This calculator uses fixed-width two’s-complement representation, the signed binary system commonly used by computer processors.

The most significant bit acts as part of the signed encoding. When the leading bit is zero, the represented value is nonnegative. When the leading bit is one, the same bit pattern is interpreted as a negative two’s-complement value.

The calculator supports signed binary addition, subtraction, multiplication and integer division while also checking whether the mathematical result exceeds the selected signed bit range.

How Signed Two’s-Complement Binary Works

Positive Values

Positive values use the same bit pattern as ordinary unsigned binary as long as the leading sign bit remains zero.

8-bit +5 = 00000101

Negative Values

Negative values are represented modulo 2^n. For an n-bit word, the unsigned bit value is interpreted as signed by subtracting 2^n when the leading bit is one.

8-bit 11111011 = 251 – 256 = -5

Signed Binary Range by Bit Width

Bit Width Minimum Maximum Range Formula
4 bits -8 7 -2^3 to 2^3 – 1
8 bits -128 127 -2^7 to 2^7 – 1
12 bits -2048 2047 -2^11 to 2^11 – 1
16 bits -32768 32767 -2^15 to 2^15 – 1
24 bits -8388608 8388607 -2^23 to 2^23 – 1

Worked Example 1: Signed Binary Addition

Add -5 and +3 using 8-bit two’s complement.

-5 = 11111011
+3 = 00000011
Decimal calculation: -5 + 3 = -2
-2 in 8-bit two’s complement = 11111110
Answer: 11111110

Worked Example 2: Signed Binary Subtraction

+7 = 00000111
+10 = 00001010
7 – 10 = -3
-3 in 8-bit two’s complement = 11111101
Answer: 11111101

Worked Example 3: Signed Binary Multiplication

-4 = 11111100
+6 = 00000110
-4 x 6 = -24
-24 in 8-bit two’s complement = 11101000
Answer: 11101000

Worked Example 4: Signed Binary Division

-20 = 11101100
+4 = 00000100
-20 / 4 = -5
-5 in 8-bit two’s complement = 11111011
Answer: 11111011

Signed Binary Overflow

Overflow occurs when the mathematical result lies outside the range available for the selected signed bit width.

4-bit signed range: -8 to +7
+7 = 0111
+3 = 0011
7 + 3 = 10
10 cannot be represented by signed 4-bit two’s complement
Stored 4-bit pattern wraps, so overflow must be reported.

Common Signed Overflow Examples

Width Calculation Mathematical Result Valid Range Overflow?
4 bit 7 + 1 8 -8 to 7 Yes
4 bit -8 – 1 -9 -8 to 7 Yes
8 bit 100 + 20 120 -128 to 127 No
8 bit 100 + 40 140 -128 to 127 Yes
8 bit -100 – 20 -120 -128 to 127 No
8 bit -100 – 40 -140 -128 to 127 Yes

Signed vs Unsigned Binary

Feature Signed Binary Unsigned Binary
Negative values Supported Not supported
8-bit minimum -128 0
8-bit maximum 127 255
Leading bit Part of signed encoding Ordinary highest-value bit
Common representation Two’s complement Standard positional binary

Why the Same Bits Can Mean Different Values

A bit pattern has no signed or unsigned meaning by itself. The interpretation determines its numeric value.

8-bit Pattern Unsigned Value Signed Two’s-Complement Value
00000101 5 5
01111111 127 127
10000000 128 -128
11111110 254 -2
11111111 255 -1

Supported Signed Binary Operations

Addition

Adds the signed numeric values and reports whether the result remains within the selected bit range.

Subtraction

Subtracts the second signed operand from the first and returns the two’s-complement result.

Multiplication

Multiplies the decoded signed values. Multiplication can overflow quickly when the bit width is small.

Integer Division

Divides the first signed value by the second and truncates the quotient toward zero.

Important Signed Binary Notes

Important: this calculator uses fixed-width two’s-complement signed binary.

The same bit pattern can have a different numeric meaning when interpreted as unsigned binary.

When the mathematical result exceeds the chosen signed range, the calculator reports overflow and also displays the wrapped stored bit pattern.

Division is integer division and truncates the quotient toward zero. Division by zero is not allowed.

Related BinaryCon Tools

Signed Binary Calculator FAQs

What is signed binary?
Signed binary is a binary representation capable of expressing both positive and negative values. Modern computers commonly use two’s complement.
What signed representation does this calculator use?
It uses fixed-width two’s-complement representation.
What does the first bit mean in signed binary?
In two’s complement the most significant bit contributes a negative positional weight, so a leading 1 indicates a negative value for a fixed-width word.
What is 11111111 as signed 8-bit binary?
It represents -1 in 8-bit two’s complement.
What is 10000000 in signed 8-bit binary?
It represents -128, the minimum 8-bit signed two’s-complement value.
What is the signed 8-bit range?
The range is -128 through +127.
How is a negative number stored in two’s complement?
Mathematically, an n-bit negative integer can be represented by adding 2^n to that negative value and storing the resulting unsigned bit pattern.
What is signed binary overflow?
Overflow occurs when the mathematical result is outside the minimum and maximum values that the selected signed bit width can represent.
Can signed binary addition overflow?
Yes. For example, 8-bit signed binary cannot represent a result greater than 127 or less than -128.
Does multiplication use the same bit width?
Yes. The calculator checks the mathematical product against the selected output width and reports overflow when it does not fit.
How does signed binary division work?
The two operands are decoded as signed integers, divided, and the quotient is truncated toward zero before being encoded back into the selected two’s-complement width.
Is signed binary the same as signed magnitude?
No. Signed magnitude stores a separate sign bit and magnitude. Two’s complement uses a different encoding and is much more common for integer arithmetic in modern computers.
Scroll to Top