EMBEDDED TOOL

Bit/Register Calculator

Set, clear, and toggle individual bits in an 8/16/32-bit register with live hex/binary output.

Decimal

0

Hexadecimal

0x00

Binary

0000 0000

About this tool

Click any bit to set, clear, or toggle it, and watch the decimal, hex, and binary representations update instantly — the everyday task of figuring out what value to write to a microcontroller register to turn specific bits on or off. Type a value directly (hex, binary, or decimal) to load it into the bit grid instead.

Frequently asked questions

Which end is bit 0?
Bit 0 (the least significant bit) is on the right, matching how binary numbers are normally written and read — the leftmost bit is the most significant bit (bit 7, 15, or 31 depending on width).
How do I enter a value?
Type it with a prefix: 0x1F for hex, 0b00011111 for binary, or just 31 for decimal — the bit grid and other formats update as soon as it parses.
What happens if I switch register width after setting bits?
The current decimal value carries over and is re-rendered into the new bit width — switching to a narrower width truncates any bits beyond the new width, since they no longer exist in the register.