Binary translator — decimal to binary, with byte structure
Convert any non-negative decimal integer into its binary and hexadecimal
representation with full byte structure visible. The cap is
int.MaxValue = 2,147,483,647 = 2³¹ − 1 —
the maximum value of a signed 32-bit integer in C#. The
byteWidth selector pads the result to match BEP’s
Compressor1BE through Compressor4BE entry points.
§ 01Summary
§ 02Bit grid — per-byte structure with positional weights
§ 03Per-byte decomposition
| byte | position | bits | value (x) | multiplier (z = 256ⁱ) | contribution (y) | running total |
|---|
§ 04Endianness — same value, two byte orderings
Reading the bit grid. Each row is one byte of the chosen width. Highlighted gold cells are bits set to 1; dashed diagonal cells mark padding that exceeds the minimum bits needed for the value. Below each bit is its positional weight — summing the weights of all highlighted bits gives back the decimal value.
byteWidth. Selecting a width pads the value with leading zeros
to fill that byte count. The chosen width determines how many bytes will be
written when the value is serialized — BEP’s Compressor1BE through
Compressor4BE functions each correspond to one of these widths.
The minimum bits required (with no leading zeros) is shown in the summary as
a separate row.
