The Interactive Byte
Toggle eight bits and watch one number speak binary, decimal, hex, octal, and ASCII at once. Then play with AND, OR, XOR, NOT, and shifts computed column by column.
The Interactive Byte
Everything a computer stores is bits, and they travel in groups of eight called bytes. Toggle the eight bits below and the same value shows up at once as binary, decimal, hex, octal, and a character. Then take two bytes into the bitwise playground and see AND, OR, XOR, NOT, and shifts worked out column by column.
Click a bit to flip it, or tab to it and press space or enter. Each bit owns a place value, a power of two. The byte is just the sum of the place values whose bit is 1.
A bit is one binary digit, a 0 or a 1. Eight of them make a byte, so a byte holds 2^8 = 256 distinct values, the integers 0 through 255. Hex is convenient because one hex digit covers exactly four bits, so a byte is always two clean hex digits with no leftover.
Two operands you can edit bit by bit. Pick an operation and read the result computed one column at a time. Every result is masked back to eight bits, so what you see is always a byte.
These are real JavaScript bitwise operators. JS evaluates them on 32-bit integers, so the result is masked with & 0xff to keep the display a single byte. AND with a mask clears bits you do not want; OR sets flags; XOR toggles them; a left shift by n multiplies by 2^n until bits fall off the top.