Programmer Calculator
See a value in every base at once, flip bits, run bitwise operations, and inspect IEEE 754 floats — all client-side.
Examples
Inspect -1 as an 8-bit word
Word size: 8-bit
DEC: -1HEX: FF
DEC: 255
OCT: 377
BIN: 1111 1111
Unsigned: 255
Signed: -1Masking -1 to eight bits produces 255, while interpreting the same sign bit as two's complement produces -1.
XOR two binary masks
Word size: 8-bit
Operand A: 0b1100
Operand B: 0b1010
Operation: XORHEX: 6
DEC: 6
OCT: 6
BIN: 0000 0110
Unsigned: 6
Signed: 6XOR keeps only positions where the two operands differ, then displays the masked result in every supported base.
Inspect 0.1 as a 64-bit IEEE 754 value
Decimal number: 0.1
Precision: 64-bitHEX: 0x3FB999999999999A
Sign: 0
Exponent: 01111111011
Mantissa: 1001100110011001100110011001100110011001100110011010The DataView representation exposes the finite binary approximation used for the JavaScript number 0.1.
About this tool
Low-level programming means constantly switching number bases — a value is decimal in your head, hex in the datasheet and binary when you're masking flag bits. This calculator shows a value in binary, octal, decimal and hexadecimal simultaneously and updates every representation as you type in any one of them, with a clickable bit grid so you can flip individual bits and watch the result change.
A full set of bitwise operators (AND, OR, XOR, NOT, left and right shift) computes masks and combines flags, and a selectable word size (8/16/32/64-bit) models how values wrap and how two's-complement negatives are represented on real hardware. A separate IEEE 754 inspector breaks a floating-point number into its sign, exponent and mantissa for single and double precision. Everything is computed with BigInt for exact 64-bit results, entirely in your browser.
How to use
Enter a value in any base
Type in the hex, decimal, octal or binary field — the others update instantly.
Flip bits directly
Click cells in the bit grid to toggle individual bits and see every base recalculate.
Run a bitwise operation
Enter two operands and pick AND, OR, XOR, NOT or a shift to compute a mask; results show in all bases.
Inspect a float
Use the IEEE 754 panel to see the sign, exponent and mantissa bits of a 32- or 64-bit float.
Use cases
Designing masks and flags
Combine bit fields with AND, OR, XOR, and NOT while reading the same result in binary and hexadecimal.
Checking fixed-width overflow
Switch among 8-, 16-, 32-, and 64-bit words to see how large or negative integers wrap after masking.
Translating protocol and register values
Convert values copied from decimal documentation, hexadecimal dumps, octal permissions, or binary register diagrams.
Explaining floating-point encodings
Inspect sign, exponent, mantissa, and hexadecimal layouts for 32-bit and 64-bit IEEE 754 values.
Capabilities
| Feature | Detail |
|---|---|
| Multi-base view | Binary, octal, decimal, hex — all in sync |
| Word size | 8, 16, 32 or 64-bit with two's-complement wrapping |
| Bitwise ops | AND, OR, XOR, NOT, left shift, right shift |
| IEEE 754 | Sign / exponent / mantissa for 32- and 64-bit floats |
| Exactness | BigInt math — no precision loss at 64 bits |
All computation is client-side.
Common mistakes
Mistake:Expecting a 0x, 0b, or 0o prefix to override the field's selected base.
Fix:Enter the value in the matching HEX, BIN, or OCT field. The parser tolerates a prefix but still validates the remaining digits against the field's base.
Mistake:Reading the displayed decimal value as signed without checking the Signed line.
Fix:The synchronized DEC field is the unsigned word value. Use the separate Signed readout for the two's-complement interpretation.
Mistake:Expecting RSHIFT to preserve a negative sign bit.
Fix:Operands are masked to unsigned word values before operations, so right shift is performed on a non-negative BigInt. Model arithmetic right shift separately when sign extension is required.
Mistake:Assuming the IEEE 754 inspector performs arbitrary-precision decimal conversion.
Fix:The input is converted with JavaScript Number first and then written as Float32 or Float64. Use the inspector to examine those binary formats, not decimal arbitrary-precision math.
Frequently asked questions
Related guides
References & standards
Related tools
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML
Apache Config Generator
Build an Apache 2.4 VirtualHost — ServerName, DocumentRoot, Directory, aliases, and optional SSL
AWS Architecture Diagram
Drag-and-drop AWS service blocks, connect edges and export architecture diagrams as SVG
AWS Pricing Calculator
Estimate monthly AWS costs from static list prices with a Chart.js breakdown
Azure Architecture Diagram
Compose Azure architecture diagrams with VM, Storage, Functions, AKS blocks and SVG export