Toggle and test bit flags visually. Understand how permission systems and status registers work.
Toggle each flag on or off. Click a flag name to rename it.
Enter a numeric value (like 4 for bit 2) to see if that flag is set.
In this simple model, each permission is a bit flag. Click a preset to see the combined value.
124Bit flags let you pack multiple boolean values into a single integer. Each bit position represents one flag, and you combine them with bitwise OR. I built this calculator to make it visual — flip a toggle and instantly see how the combined value changes.
Linux file permissions (chmod), TCP header flags, graphics API state masks, and game engine entity properties all use bit flags. When I was learning systems programming, a visual tool like this would have saved me hours of mental arithmetic.
Assign each permission a unique power of two: READ=1, WRITE=2, EXECUTE=4, DELETE=8. Combine them with OR to grant multiple permissions. Check with AND. This is how Unix chmod, database ACLs, and cloud IAM policies work under the hood.
Use the "Test a Flag" section to simulate bitwise AND checks. If you have a combined value like 0x15 (21 decimal) and want to know if bit 2 (value 4) is set, the calculator shows you the operation step by step.
Bit flags are a programming technique where individual bits in an integer represent boolean options or states. Each bit position (0, 1, 2, ...) corresponds to a specific flag, and multiple flags can be combined into a single value using bitwise OR. This bit flags calculator makes the concept visual by providing toggle switches that update the combined value in real time.
Permission systems assign each permission a unique power-of-two value (READ=1, WRITE=2, EXECUTE=4, DELETE=8). Combining permissions with bitwise OR creates a composite value like 5 (READ + EXECUTE). Checking a specific permission uses bitwise AND — if (combined & READ) !== 0, the READ permission is granted. Our bit flags calculator demonstrates this with the built-in permission example section.
An 8-bit value supports up to 8 independent flags (bits 0 through 7). Each flag represents a distinct boolean value, and the combined value ranges from 0 (no flags) to 255 (all flags set). In practice, systems often use 32-bit or 64-bit integers for hundreds of possible flags — but the 8-bit model in this bit flags calculator is perfect for learning the concept.
Yes. Click on any flag name (e.g. 'Flag 0') to edit it. This is useful for labeling flags according to your own permission system or status register definition. The names update in real time and make the bit flags calculator adaptable for any use case you are exploring.
AND, OR, XOR, NOT — online bitwise operations
64-bit base conversion with BigInt precision
Compute SHA-256 checksums in your browser
Multi-base number converter for developers