Learn Bits
See how numbers become binary, then compare their bits one position at a time.
Click a bit in row A or B to turn it on or off. Green means 1 (ON); gray means 0 (OFF).
Why these numbers?
Checking the result in C
Reading binary
Each position has a value: 8, 4, 2, 1 for four bits. Add a position's value only when its bit is 1. For example, 1101 means 8 + 4 + 1 = 13.
AND (&): both bits must be 1.
OR (|): at least one bit must be 1.
This learning calculator accepts unsigned whole numbers only. It runs entirely in your browser; nothing is uploaded.