How do I convert hex to binary by hand?
Replace each hex digit with its four-bit pattern: A is 1010, F is 1111, so AF is 1010 1111.
Binary, hex, and two's complement.
Type in any field and every other base updates. Flip individual bits, switch between 8, 16, 32, and 64-bit widths, and read the same bits as signed or unsigned.
Loading the toolbox.
You do not have to take our word that your data stays here. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing is sent. The check takes under a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Only two things can add a line to that log, and neither carries your data. Submitting the feedback form sends the vote and comment you typed. Typing characters in a script the page has not displayed yet, such as Cyrillic or Greek, can make the browser fetch the matching font file, and that request names only the font.
The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so a coding mistake could not quietly send your data elsewhere.
A base, or radix, is how many digits a number system uses. Decimal uses ten, binary two, octal eight, and hexadecimal sixteen, with A to F standing for 10 to 15. Each position is worth the base times the position to its right, so hex FF is 15 times 16 plus 15, which is 255, and binary 1111 1111.
Programmers use hex because each hex digit is exactly four bits, so a byte is always two hex digits. Octal survives in Unix file permissions, where 755 means rwx for the owner and r-x for everyone else.
Computers store negative integers in two's complement. In an 8-bit value the top bit is worth minus 128 instead of plus 128, so 1111 1111 is minus 1 and 1000 0000 is minus 128. The same bits mean 255 and 128 when read as unsigned. Addition works identically either way, which is why hardware uses it.
2base shows both readings at once. You can now type a negative decimal into the signed field and see its two's complement bits, which the original tool rejected.
A value that needs more bits than the chosen width is reduced to its low bits, exactly as a fixed-width integer overflows in C, Rust, or Java. The original 2base did this silently. Now the page tells you, so you can choose a wider width. All arithmetic uses BigInt, so 64-bit values are exact; ordinary JavaScript numbers lose precision above 2 to the power 53.
0x, 0b, and 0o are accepted in the matching field.1111_0000 and FF FF both work.Elsewhere in the toolbox: 2uuid, 2gitignore, 2csp, 2htaccess, and more on the 2toolbox home page. Part of the 2suite.io privacy-first ecosystem.
Replace each hex digit with its four-bit pattern: A is 1010, F is 1111, so AF is 1010 1111.
In 32-bit two's complement, all bits set means minus one. Read as unsigned, the same bits are 4,294,967,295.
Unsigned, 18,446,744,073,709,551,615. Signed, 9,223,372,036,854,775,807.
No. 2base converts integers, which is what bit-level work needs.