Integer explorer

Inspect 8–64-bit integers, edit their bits and compare representations and word operations.

About this tool

Choose a word width and input format, then inspect the value. Decimal input must fit the unsigned or signed range. Hexadecimal, octal and binary input may have a 0x, 0o or 0b prefix. Only outer whitespace is ignored; fractions, exponents, grouping and underscores are rejected. Raw digit limits include leading zeros. Changing width preserves the text and requires another inspection.

Bits are arranged in rows of eight, highest byte first. The editor scrolls horizontally on narrow screens. Octal, grouped binary, bytes, ranges and Unicode are in Details. Clear removes results without changing the input; Enter in the bit-count field applies the selected operation.

All representations describe the same word, exactly up to 64 bits. Signed decimal uses two’s complement. Input never wraps; word arithmetic intentionally wraps modulo 2width. Click or keyboard-activate a bit to toggle it. Shifts insert zero bits, except arithmetic right shift, which copies the sign bit. Shifts by at least the word width leave zero or sign-fill; rotations use the count modulo the width.

Big-endian lists the highest byte first; little-endian lists the lowest first. The ASCII preview uses big-endian order, showing bytes 32–126 and a dot for other bytes. It is not a text decoder. The whole unsigned word is also classified as a Unicode code point: scalar value, surrogate or outside 0–10FFFF. A scalar value need not be assigned or visible. Preview excludes control, mark, separator and other category-C characters; the result depends on the browser’s Unicode data and font.

Each input format has its own draft. Inspection retains the active text and updates the other formats; bit changes and operations update every format. Drafts are saved within the existing 1,500-character encoded-state limit. A warning appears if saving fails; those drafts then last only until reload. Results are not restored automatically.

References: TC39 BigInt.asUintN and BigInt.asIntN; Unicode 17.0, §3.9, D71–D76.