← playground
Interactive · Binary & boolean lab

Flip a bit.
Watch the logic move.

Two live instruments. The first turns text into raw ASCII bytes you can toggle bit by bit. The second shows De Morgan’s laws holding true — as switches, as truth tables, and as eight parallel bits at once.

01  ASCII → bits

Type anything. Each character becomes one byte, most significant bit first. Click any bit to flip it — the character, the decimal value and the hex all follow.

Binary
Hex
Decimal
Bit 5 (value 32) is the case bit: A = 0100 0001, a = 0110 0001. One flip, whole other letter.

02  De Morgan’s laws

Negation turns AND into OR and OR into AND. Toggle the two inputs and both sides of each identity stay locked together — that is the whole law, visible at a glance.

Same law, as sets

Shade first and invert, or invert first and combine — both routes land on the identical region. The dot marks where your current A and B switches sit, so a filled dot means that expression is true right now.

Every case, at once

The highlighted row is your current switch position. The two boxed columns in each pair never disagree.

A B A ∧ B ¬(A ∧ B) ¬A ∨ ¬B A ∨ B ¬(A ∨ B) ¬A ∧ ¬B

Eight proofs in parallel

The same law, applied bitwise to two bytes. Toggle the bits of A and B: ~(A&B) and ~A|~B come out identical every time — which is exactly why compilers and hardware trade one for the other freely.

A  
B  
identical