The programmer's calculator that gets the hard parts right.

Bit Alchemist is a serious, integer-only calculator for iPhone and iPad — built for assembly, embedded, systems, security, and reverse-engineering work, and for students learning binary and hex. Four bases, real word sizes, a complete bitwise toolbox, and exact CPU flags. Master the Bases.

HEX0x00BE_BABE DEC12,499,646 OCT0o57_535_276 BIN0000 0000 1011 1110 1011 1010 1011 1110

Everything in the box

Bases & word sizes

Hex, decimal, octal, binary — one tap to switch, or a converter view showing all four live. Values mask correctly when you change word size (truncate, sign- or zero-extend) with a clear overflow indicator. A smart keypad only lights the digits valid for the current base.

Signed or unsigned — for real

Not just a display toggle. Signedness drives division, shifts, and flag meaning. A negative value reads as -1 in decimal but shows its true bit pattern in hex and binary.

Fully-defined arithmetic

Add, subtract, multiply, divide, modulo, negate. Division truncates toward zero, remainder takes the dividend's sign, divide-by-zero never destroys your value, and signed overflow wraps with the overflow flag set instead of crashing.

Complete bitwise logic

AND, OR, XOR, NOT, plus NAND, NOR, XNOR — the operators a hardware or systems engineer actually reaches for.

Shifts & rotates

Logical shift left/right (SHL / SHR), arithmetic shift right (SAR), and a context-aware >>. Rotate left/right (ROL / ROR) and rotate-through-carry (RCL / RCR). Shift counts behave predictably — no surprising hardware quirks.

Bit manipulation

Tap a value's individual bits to set, clear, toggle, or test — no mental masking. Population count, count leading / trailing zeros, bit reverse, and byte / word swap for endianness fixes.

Bitfields & masks

Sign- or zero-extend from any bit, mask to width, extract a bitfield [lo, hi], and build a mask for any range. "Explain this mask" shows exactly which bit ranges are set and how many bits — perfect for registers and packed fields.

Exact CPU flags

C, Z, N, V, P computed after every operation with documented semantics: sticky carry, low-byte parity, signed-overflow detection, carry-vs-borrow. Show or hide each flag individually.

Expressions — type or tap

Enter full C-style expressions with correct precedence and parentheses, e.g. (0xFF00 & 0x0F0F) >> 4 or (1 << 16) - 1. One engine for both, so tapping and typing always agree. Live preview, paste-friendly input that strips spaces, underscores, and commas.

Memory & registers

A classic memory row (store, recall, M+ / M−, clear) plus a full 8-register bank (R0–R7) with optional labels. Recall converts correctly across word sizes, and the bank persists between launches.

History

Every committed result is logged with its expression, base, word size, signedness, and a flags snapshot. Reuse any past calculation, copy it, delete one, or clear all.

Built for your workflow

Tap to copy any base, the ASCII view, or a mask explanation. Copy as code exports the current value as a C / Swift / Python / JavaScript literal — typed scalar or byte array. Full hardware-keyboard support: ⌘1–4 switch base, ⌘5–8 switch word size.

iPhone & iPad, dark-first

Optimized for one-handed use on iPhone; on iPad the full operator palette and bit editor sit on one screen. High-contrast monospaced display, full VoiceOver (results announce their base, word size, and signedness), haptics with a distinct error cue, and Dynamic Type & Reduce Motion awareness throughout.

Private by design

Bit Alchemist is integer-only and deterministic — no floating point anywhere, every operation fully specified for the selected word size. It works completely offline with no account, no analytics, no ads, and no third-party SDKs. The calculation core is exhaustively tested against an independent reference across all word sizes and both signedness modes, so the answers are trustworthy. Read the full privacy policy.

Questions or feedback?

Found a bug, want a feature, or have a question? Send it through our feedback page — we read every message and reply within one business day.