bitlvl
EN

Numbers & bits

Convert between bases, flip bits, and see how machines store numbers.

Base converterBinary, decimal, hex and octal, with the working shown0xBEEF = 48879 = 1011 1110 1110 1111Bitwise calculatorAND, OR, XOR, NOT, shifts and rotates, shown bit by bit0b1100 ^ 0b1010 = 0b0110Bitmask calculatorBuild a mask from bit positions, or decode which flags a mask containsbits 0, 2, 7 → 0x85Two's complement converterSigned ⇄ unsigned at any width, with the invert-and-add-one steps−1 in 8 bits = 1111 1111 = 0xFFIEEE 754 float visualizerSee the sign, exponent and mantissa of any float32 or float640.1 = 0x3DCCCCCD (float32)Byte & data size converterBits, bytes, kB vs KiB, MB vs MiB, plus transfer time at a given speed1 GiB = 1.074 GB = 8,589,934,592 bitsCRC & checksum calculatorCRC-8/16/32/64 in every common variant, Adler-32, Fletcher, for text or a filecrc32("123456789") = CBF43926Endianness converterSwap byte order of 16/32/64-bit values and see the memory layout0x12345678 ⇄ 0x78563412Gray code, BCD & popcountConvert to and from Gray code and BCD, count set bits, parity5 → Gray 111, BCD 0101Roman numeral converterNumbers ⇄ Roman numerals, with the rules and a reference table1994 = MCMXCIVNumber to wordsSpell out a number or amount in words, for cheques, contracts and invoices1,234 → one thousand two hundred and thirty-fourC struct layout & bit-field visualizerPaste a struct: offsets, padding, alignment and sizeof per ABI (x86-64, ARM64, i386, ARM32, MSVC), bit-field packing, reorder to shrink, decode a hex dumpchar c; int i; → c@0, pad 3, i@4, sizeof 8Integer overflow & arithmetic calculatorEvaluate an expression in int8…u128 with C, Rust, Go, Java or JavaScript rules: wraparound, UB, promotion, shifts, signed/unsigned trapsINT_MAX + 1 → -2147483648 (undefined behaviour in C)