One’s Complement Fixed Width Bit Inversion Negative Zero Custom Width
One’s-Complement Signed Bit Pattern Decoder

Hex One’s Complement to Binary Converter

Convert a raw hexadecimal value into its exact fixed-width one’s-complement binary pattern and decode the signed value. When the most significant bit is 1, invert every bit to recover the negative magnitude. The tool also correctly identifies the special negative-zero representation.

Exact width preserved MSB sign decoding Negative magnitude shown +0 and −0 distinguished
One’s Complement Decoder
● LIVE
Enter raw hex without + or − · select its exact signed width · no two’s-complement arithmetic is applied
FIXED-WIDTH BINARY ONE’S COMPLEMENT
11111110
Width: 8 bits Sign bit: 1 Interpretation: Negative
One’s-complement value: -1
ONE’S COMPLEMENT INTERPRETATION For negative patterns, invert every bit to recover the magnitude
FE → 11111110 · MSB 1 → invert → 00000001 · value = -1
TRY:
Negative Rule Invert every bit
8-bit FE 11111110 = -1
8-bit FF 11111111 = -0
Positive Zero 00000000
Negative Zero 11111111 at 8 bits

Hex One’s Complement to Binary Converter

The Hex One’s Complement to Binary Converter turns a raw hexadecimal bit pattern into binary at an exact signed word width and then interprets that bit pattern using one’s-complement rules.

A leading zero indicates a non-negative value. A leading one indicates a negative value whose magnitude is recovered by flipping every bit in the fixed-width binary pattern.

Example: FE at 8 bits becomes 11111110. Because the leading bit is 1, invert all eight bits to get 00000001. Therefore FE represents -1 in 8-bit one’s complement.

What Is One’s Complement?

One’s complement is a signed binary representation in which a negative number is formed by reversing every bit of the corresponding positive number.

Positive 1 at 8 bits: 00000001 Invert every bit: 11111110 Therefore: 11111110 = -1

This differs from two’s complement because there is no additional plus-one step after inversion.

How to Convert One’s Complement Hex to Binary

First convert the hexadecimal pattern into binary and pad it to the selected width. Then inspect the most significant bit.

Example: Hex = FE Width = 8 F → 1111 E → 1110 Fixed-width binary: 11111110 MSB = 1 Invert: 00000001 Magnitude: 1 Result: -1

Why Bit Width Is Required

As with any fixed-width signed representation, width determines where the sign bit is located. A hexadecimal value may therefore have different meanings under different widths.

Hex Width Binary One’s-Complement Value
FF 8 11111111 -0
FF 16 0000000011111111 255
FE 8 11111110 -1
FE 16 0000000011111110 254

8-Bit One’s Complement Examples

Hex Binary Signed Meaning
00 00000000 +0
01 00000001 +1
7E 01111110 +126
7F 01111111 +127
80 10000000 -127
81 10000001 -126
FD 11111101 -2
FE 11111110 -1
FF 11111111 -0

Example: FE Hex at 8 Bits

FE → 11111110 Leading bit = 1 Invert every bit: 00000001 Magnitude: 1 Value: -1

Example: 80 Hex at 8 Bits

80 → 10000000 Invert all bits: 01111111 Magnitude: 127 Therefore: -127

Unlike 8-bit two’s complement, where 80 represents -128, 8-bit one’s complement represents -127.

Why FF Represents Negative Zero

One’s complement has two zero representations. Positive zero uses all zero bits, while negative zero is created by complementing every bit of positive zero.

Positive zero: 00000000 Invert every bit: 11111111 Therefore at 8 bits: 00 = +0 FF = -0
The binary pattern FF at 8 bits is not -1 under one’s complement. It is the special negative-zero representation.

Positive Zero vs Negative Zero

Width Positive Zero Negative Zero
8 bits 00000000 / 00 11111111 / FF
16 bits 0000000000000000 / 0000 1111111111111111 / FFFF
32 bits 00000000000000000000000000000000 32 ones / FFFFFFFF

One’s Complement vs Two’s Complement

Both methods use the high-order bit to distinguish negative patterns, but their encoding and numerical ranges differ.

Property One’s Complement Two’s Complement
Create negative Invert all bits Invert all bits, then add 1
8-bit -1 11111110 11111111
8-bit minimum -127 -128
Zero representations +0 and -0 One zero only
8-bit FF -0 -1

One’s Complement Signed Value Formula

For a non-negative bit pattern, its unsigned value is also the signed value. For a negative pattern, subtract the maximum unsigned value for that width.

Let: U = unsigned bit-pattern value n = width If MSB = 0: signed value = U If MSB = 1: signed value = U − (2ⁿ − 1)

For example, FE at 8 bits has unsigned value 254:

254 − 255 = -1

When U equals 255 exactly, the mathematical result is zero but the bit pattern specifically represents negative zero.

One’s Complement Range by Bit Width

Because one bit pattern is reserved for negative zero, one’s complement has equal positive and negative magnitude ranges.

Width Minimum Maximum Zero Patterns
8 bits -127 +127 2
16 bits -32,767 +32,767 2
32 bits -2,147,483,647 +2,147,483,647 2
64 bits -(2⁶³ – 1) +(2⁶³ – 1) 2
General range: -(2ⁿ⁻¹ − 1) through +(2ⁿ⁻¹ − 1)

16-Bit One’s Complement Examples

Hex 16-Bit Binary Value
0000 0000000000000000 +0
0001 0000000000000001 +1
7FFF 0111111111111111 +32767
8000 1000000000000000 -32767
FFFD 1111111111111101 -2
FFFE 1111111111111110 -1
FFFF 1111111111111111 -0

Why Leading Zeros Must Be Preserved

Leading zeros establish the requested fixed word width and determine the position of the sign bit.

FF at 16 bits: 0000000011111111 MSB = 0 Therefore: +255

If those leading zeros were removed and the pattern were interpreted as 8 bits instead, FF would become negative zero.

Why Leading Ones Must Be Preserved

For a negative one’s-complement bit pattern, the leading one is part of the encoded sign and magnitude relationship.

16-bit -1: FFFE → 1111111111111110

The full selected width should therefore remain unchanged in the binary output.

Raw Hex Input Does Not Use a Minus Sign

The sign is encoded inside the one’s-complement bit pattern itself, so external plus and minus characters are not used on this page.

8-bit negative one: FE not: -FE

Explicit mathematical negative hex belongs to the earlier Negative Hex to Binary Converter.

Hex Must Fit the Selected Width

The calculator never truncates high-order bits. The hexadecimal pattern must fit completely within the selected number of bits.

8-bit maximum raw pattern: FF Therefore: FE → valid FF → valid 100 → invalid at 8 bits

Custom One’s Complement Width

Along with common 8, 16, 32 and 64-bit sizes, the calculator supports custom word widths from 1 through 4096 bits.

A custom width does not need to be divisible by four. The supplied hexadecimal magnitude simply has to fit into that number of bits.

12-bit examples: 7FF → 011111111111 → +2047 800 → 100000000000 → -2047 FFE → 111111111110 → -1 FFF → 111111111111 → -0

Optional 0x Prefix

One optional 0x or 0X prefix is supported. It identifies the hexadecimal notation but contributes no data bits.

0xFE at 8 bits → FE → 11111110 → -1

32-Bit One’s Complement Examples

Hex Interpretation
00000000 +0
00000001 +1
7FFFFFFF +2,147,483,647
80000000 -2,147,483,647
FFFFFFFD -2
FFFFFFFE -1
FFFFFFFF -0

Where One’s Complement Is Used

Two’s complement dominates modern signed integer storage, but one’s complement remains important in historical architectures and in some specialized arithmetic and checksum contexts.

  • Computer architecture education.
  • Historical machine-number formats.
  • Legacy signed integer representations.
  • Understanding Internet checksum arithmetic concepts.
  • Low-level binary representation exercises.
  • Comparing signed-number encoding systems.
  • Reverse engineering legacy data formats.
  • Digital logic and computer-science coursework.

Common One’s Complement Conversion Mistakes

  • Adding one after bit inversion and accidentally performing two’s complement.
  • Assuming FF represents -1 at 8 bits.
  • Forgetting that all ones represent negative zero.
  • Ignoring the selected bit width.
  • Removing significant fixed-width leading zeros.
  • Entering an external minus sign with a raw encoded bit pattern.
  • Allowing a value that needs more bits than the chosen width.
  • Confusing one’s-complement range with two’s-complement range.

Hex One’s Complement to Binary Converter FAQs

What is FE in 8-bit one’s complement?
FE converts to 11111110. Inverting the bits gives 00000001, so it represents -1.
What is FF in 8-bit one’s complement?
FF becomes 11111111, which is the negative-zero representation in 8-bit one’s complement.
What is 80 in 8-bit one’s complement?
80 becomes 10000000. Inverting the bits gives 01111111, so the signed value is -127.
Why is FF not -1 in one’s complement?
In one’s complement, negative one is created by inverting 00000001, which produces 11111110 or FE. FF is the complement of zero and therefore represents negative zero.
How do I create a negative one’s-complement number?
Write the positive value at the required width and invert every bit. Do not add one afterward.
Does one’s complement have two zeros?
Yes. All-zero bits represent positive zero and all-one bits represent negative zero.
Does this converter require a bit width?
Yes. The sign bit, leading padding and numerical interpretation depend on the selected fixed width.
Can I enter -FE?
No. This page expects a raw encoded hexadecimal bit pattern. The sign is already represented by the fixed-width bits.
Can I enter 0xFE?
Yes. One optional 0x or 0X prefix is accepted.
What happens if the hexadecimal value is too large?
The calculator reports an error instead of truncating bits because truncation would alter the one’s-complement pattern.
Can I choose a custom bit width?
Yes. Custom widths from 1 through 4096 bits are supported.
Does this converter change endian order?
No. The hexadecimal and binary ordering is preserved exactly. Endian conversion belongs to separate tools.

Convert Hex One’s Complement to Binary

Enter a raw hexadecimal bit pattern, select the exact word width and choose Convert One’s Complement. The calculator preserves the binary width, identifies the sign bit, inverts negative patterns to recover their magnitude and correctly distinguishes normal positive zero from the special one’s-complement negative-zero pattern.

Scroll to Top