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 this tool
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
Which number representations are shown?
The calculator keeps binary, octal, decimal and hexadecimal views synchronized and includes a clickable bit grid.
How does word size affect results?
Select 8, 16, 32 or 64 bits to model wrapping and two's-complement negative values for that hardware word size.
Can it inspect floating-point values?
Yes. The IEEE 754 inspector shows sign, exponent and mantissa for single- and double-precision values; integer operations use BigInt for exact 64-bit results.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML