Digital Number Converter
Convert binary, hexadecimal, decimal, and two's complement values. Useful for embedded firmware, register maps, bit fields, MCU debugging, and digital logic reference.
Input Parameters
Results
Equations Used
Unsigned value is parsed from the selected input base and masked to the selected bit width.
Two's complement signed value = unsigned - 2^N when the MSB is 1.
Signed N-bit range = -2^(N-1) to 2^(N-1)-1.
Hex digit count = ceil(bit width / 4).
Frequently Asked Questions (FAQ)
Q1: What is two's complement?
Two's complement is the common signed integer representation used by CPUs and microcontrollers.
Q2: Why does FF equal -1 in 8-bit two's complement?
0xFF has the sign bit set, so 255 - 256 = -1.
Q3: Can I convert binary to hex?
Yes. Select binary input, enter the binary value, and the tool outputs hexadecimal and decimal values.
Q4: Why does bit width matter?
Bit width defines masking, padding, and how the sign bit is interpreted.
Q5: Is this useful for register debugging?
Yes. It helps convert MCU register values between binary, hex, unsigned decimal, and signed interpretation.
Q6: Does this support floating point?
No. It is for integer base conversion and two's complement values.
