Binary bit positions
List the positions of a number’s set bits, or build a number back from a list of positions.
Binary bit positions
Paste a number and this tool lists every position where a bit is set, counting from 0 at the least significant bit. 42 becomes "1, 3, 5" because 42 is 32 + 8 + 2 — bits 5, 3 and 1 turned on. Flip the direction and it runs the other way: give it a list of positions and it builds the number those bits describe. That's useful for reading permission masks, feature-flag bitfields, register values from a datasheet, or anywhere "which bits are on" matters more than the raw number.
Input format sets how the pasted number is read — decimal, hexadecimal, binary or octal, each with its usual prefix (0x, 0b, 0o) accepted and optional. Output format is the same choice for the number the tool builds back from positions. Positions are always plain, comma- or space-separated decimal indices ("1, 3, 5" or "1 3 5" both work), since an index isn't a value in a base.
Batch mode converts a whole list at once, one entry per line, instead of treating the entire input as a single record. Each line converts independently: one the tool can't parse — wrong digits for the selected base, a negative number, a position that isn't a whole number — is left as typed and marked, while every other line still converts. Results land one per line, so any single one is easy to copy on its own. Outside batch mode the same problem is reported as one calm error explaining what to fix.
Everything runs locally in your browser — the numbers and bit patterns you convert are never uploaded anywhere. Copy the result, download it as a .txt file, or send it straight back into the input to flip the direction and check your work.