Base Conversion Result
{{ summaryPrimary }}
{{ summarySecondary }}
{{ summaryBadges.base }} {{ summaryBadges.mode }} {{ summaryBadges.width }} {{ summaryBadges.density }} {{ summaryBadges.overflow }}
Binary decimal hex converter inputs
Examples: 0xFF, 255, -42, or 0b11110000.
bits
Accepted range: 2-4096 bits.
{{ include_prefix ? 'On' : 'Off' }}
{{ uppercase_hex ? 'On' : 'Off' }}
{{ show_twos_complement_steps ? 'On' : 'Off' }}
{{ zero_pad ? 'On' : 'Off' }}
bit
Use 0 for the least significant bit.
bits
Use a whole-bit width that fits inside the active register.
Metric Value Copy
{{ row.label }} {{ row.value }}
Area Assessment Recommendation Copy
{{ row.area }}
{{ row.severity }} {{ row.status }}
{{ row.recommendation }}
Register metric Value Copy
{{ row.label }} {{ row.value }}
Bit State Weight Nibble (LSB=0) Byte (LSB=0) Role Copy
{{ row.bit }} {{ row.state }} {{ row.weight }} {{ row.nibble }} {{ row.byte }} {{ row.role }}
Width Selected mode Signed Unsigned Hex Status Copy
{{ row.width }} {{ row.selected }} {{ row.signed }} {{ row.unsigned }} {{ row.hex }} {{ row.status }}
Offset Hex Dec Binary ASCII Copy
{{ row.offset }} {{ row.hex }} {{ row.dec }} {{ row.bin }} {{ row.ascii }}
Window Visible bytes Big-endian read Little-endian read Takeaway Copy
{{ row.window }} {{ row.bytes }} {{ row.big }} {{ row.little }} {{ row.takeaway }}
Field Value Copy
{{ row.label }} {{ row.value }}

        
:

Introduction

Binary, decimal, octal, and hexadecimal are different written forms for the same integer value. The choice matters because humans often read decimal, hardware often exposes bits, and logs or protocols often use compact hexadecimal.

Base conversion becomes more than a text rewrite when fixed-width registers are involved. The same bit pattern can be unsigned, signed by two's complement, big-endian in memory, little-endian in a dump, or wrapped by a smaller register width.

A reliable conversion therefore needs both the numeric value and the interpretation rules: input base, sign mode, bit width, grouping, byte order, and optional field extraction.

Technical Details

The parser accepts one integer literal, removes visual separators such as spaces, underscores, commas, and apostrophes, then detects or enforces base 2, 8, 10, or 16. Prefixes 0b, 0o, and 0x are understood when compatible with the selected input base.

Fixed-width mode wraps the value into the selected register. Signed interpretation uses two's complement, where the highest bit is the sign bit and negative values wrap modulo 2 raised to the width. Native width mode instead chooses the minimum useful width for the entered integer.

Technical rule summary
Unsigned maximum2^bits minus 1
Signed range-2^(bits - 1) through 2^(bits - 1) - 1
Unsigned wrapvalue modulo 2^bits
Two's complement negativewrapped unsigned value minus 2^bits when sign bit is set
Hex densityone hex digit represents four binary bits

Byte views are generated from the wrapped unsigned register value. Big-endian shows the most significant byte first; little-endian reverses that order for inspection. The bit-field extractor uses a least-significant-bit index, field width, and unsigned, signed, or sign-bit-aware interpretation.

Everyday Use & Decision Guide

Use auto-detect when pasting clear literals such as 0xff, 0b1010, or decimal numbers. Force the input base when a bare value could be ambiguous, especially strings made only of zeroes and ones.

  • Use Base Conversions for decimal, binary, octal, and hex outputs.
  • Use Register View when overflow, signed range, or two's complement matters.
  • Use Bit Map to inspect set bits and byte positions.
  • Use Byte Stream and Endian Audit when comparing dumps, packets, firmware values, or API payloads.
  • Use field extraction when a register packs several flags into one integer.

Do not assume a negative decimal value and a large unsigned register value are different data. In a fixed-width register they may be two readings of the same bits.

Step-by-Step Guide

  1. Paste one integer literal and choose auto-detect or a strict input base.
  2. Select auto, signed, or unsigned interpretation.
  3. Choose native width, a preset width from 8 to 256 bits, or a custom width from 2 to 4096 bits.
  4. Set grouping, byte order, prefix display, uppercase hex, zero padding, and field extraction if needed.
  5. Copy rows or export CSV, DOCX, or JSON from the tab that matches your audit task.

Interpreting Results

Conversion Checks is the best place to spot ambiguity. It reports detection notes, fit warnings, and whether the value had to wrap at the chosen width.

Width Ladder shows which common register widths can hold the value signed or unsigned. A value that fits unsigned 8-bit may fail signed 8-bit because the top bit would mean negative.

Endian Audit changes byte order only. It does not change the integer's mathematical value unless another system reads those bytes in the opposite order.

Worked Examples

Unsigned byte. Enter 255, choose 8-bit unsigned, and include prefixes. The hex row shows 0xFF, the binary row shows eight set bits, and the signed 8-bit reading would be -1.

Protocol flag field. Enter 0xAC, use 8-bit width, set field LSB to 2 and field width to 3. The field output isolates bits 2 through 4 without hand-counting the binary string.

Endian mismatch. A byte stream 12 34 read big-endian is 0x1234. Reversing it for little-endian inspection explains why another tool may show 0x3412.

FAQ

Why did auto-detect treat my digits as binary?

A bare string containing only zeroes and ones is treated as binary in auto mode. Select decimal when the same characters are meant as a base-10 number.

What does fixed width change?

Fixed width emulates register wrapping. Values outside the chosen range are reduced modulo 2^bits for the register view.

Why are non-printable bytes shown as dots or escapes?

Bytes outside printable ASCII do not have safe visible characters. The policy selector controls whether they appear as . or as \xNN.

Does uppercase hex change the value?

No. It changes only the display of hexadecimal letters A through F.

Glossary

Base
The number of digit symbols used by a positional notation.
Two's complement
The common signed-integer encoding where the top bit marks negative values.
Endian
The byte order used when a multi-byte integer is stored or transmitted.
Bit field
A slice of bits inside a larger register.

References