← mattswann.dev / tools
bitwise lab_
boolean operations & mixed boolean-arithmetic, bit by bit
inputs
A
B
XOR — output bit is 1 where the inputs differ.
result
bit-by-bit
Hover a column to inspect a single bit.
what happened
arithmetic shadow
Every operation casts an arithmetic shadow: a simple value rewritten as a tangle of boolean and arithmetic ops that computes the same thing. Each identity is shown three ways: the worked numbers (verified live against your A and B), and the representative x86-64 it compiles to: clean versus obfuscated. The assembly is illustrative Intel syntax, not any specific toolchain; real samples pile junk and padding on top. The skill is reading past the expansion to the simple operation underneath.