Skip to content
Hex Calculator

Negative Decimal to Hex Converter

Convert a negative decimal number into its two's-complement hex bit pattern at a chosen bit width — the encoding virtually every system uses for signed integers.

Hexadecimal result
0xF6
Bit width

Full breakdown (result at 8-bit)

Hexadecimal
0xF6
Decimal (unsigned)
246
Binary
11110110
Octal
366
Signed (8-bit)
-10
Set / clear bits
6 set, 2 clear

How to Convert a Negative Decimal Number to Hex

Start with the number's magnitude — ignore the minus sign for a moment — and convert that to hex the normal way. Then, at your chosen bit width, invert every bit and add 1. That's the two's-complement encoding used to represent the negative value.

The bit width has to be fixed ahead of time, since inverting bits only makes sense across a specific number of them — the same magnitude produces a different final pattern at 8-bit versus 32-bit.

Negative Decimal to Hex Example, Step by Step

-10 (8-bit) = F6

-10, as an 8-bit signed value = 0xF6

Magnitude: 10 = 0000 1010

Invert:    1111 0101
+1:        1111 0110 = F6
StepDescriptionResult
Convert the magnitude10 (decimal) = 0000 1010 (8-bit)0A
Invert all bits0000 1010 inverted is 1111 0101F5
Add 1F5 + 1 = F6F6

Checking the sign bit of F6 (1111 0110) confirms it's set, so reading it back as signed 8-bit correctly gives -10 again.

Common Mistakes When Converting Negative Decimal to Hex

  • Converting the magnitude to hex, but forgetting the invert-and-add-1 steps entirely.
  • Choosing a bit width too narrow for the number — -200 doesn't fit in a signed 8-bit value (range is -128 to 127).
  • Adding 1 before inverting the bits, instead of after.
  • Mixing up this method with simply writing a minus sign in front of the plain hex value, which isn't how two's complement works.

Frequently Asked Questions

How do you convert a negative decimal number to hex?

Convert its magnitude (the number without the minus sign) to hex normally, invert every bit at your chosen bit width, then add 1. That result is the two's-complement hex representation of the negative value.

Why does the bit width matter for negative numbers?

Two's complement is only meaningful at a fixed width — the same negative number produces a different bit pattern at 8-bit versus 16-bit, since inverting and adding 1 happens across however many bits you've chosen.

What's the smallest negative number a given bit width can hold?

Exactly negative half the unsigned range: -128 for 8-bit, -32768 for 16-bit, and so on — one more than the largest positive value that width can hold, since zero only counts once.

Can I convert a positive number with this tool too?

Yes — enter it without a minus sign and it converts the same way regular decimal-to-hex does, just validated against the signed range for your chosen bit width instead of the unsigned range.

Is this the reverse of Hex to Negative Decimal?

Yes — that page reads an existing hex bit pattern as a signed number; this page starts from the signed number and produces the bit pattern.

What happens if my number doesn't fit the selected bit width?

The calculator flags it as out of range — pick a wider bit width so the value's magnitude fits within what that width can represent as a signed integer.