Bitshifting Visualizer

Enter a non-negative whole number. The page splits it into as many bytes as needed, then shows how bitshifting can rebuild the original number.

1. Original number

2. Split into bytes

The first byte is the most significant byte.

3. Bitshift step

Every time you do << 8, you move the current value 8 bits to the left. That is the same as multiplying by 256 and then adding the next byte.

4. JavaScript example