Bitfield Visualizer
Toggle individual bits and see hex, decimal, and binary representations update in real time.
How to Use
Enter a hex or decimal value in the input field, or click individual bits in the grid to toggle them on and off. The bit grid shows MSB (most significant bit) on the left and LSB (least significant bit) on the right.
- Input formats: Switch between hex (
0xFF) and decimal (255) input. - Bit width: Choose 8-bit, 16-bit, or 32-bit mode from the dropdown.
- Toggle bits: Click any bit cell to flip it between 0 and 1.
- Quick actions: Use "Set All" or "Clear All" to fill or reset all bits at once.
- Copy: Click the Copy button on any output format to copy the value to your clipboard.
About Bitfields
Bitfields are used throughout embedded systems and wireless protocols to pack multiple flags and small values into a single byte or word. BLE advertisement flags, GATT characteristic properties, and hardware register maps all use bitfields extensively.
Understanding individual bit positions is essential when debugging protocol implementations, decoding sensor data, or configuring peripheral registers. This tool provides an interactive view that maps between the numeric value and its bit-level representation.