How a computer adds 7 + 1 using nothing but switches
30seconds
A computer chip has no idea what numbers are. It only has switches: billions of transistors that are either on or off.
Yet wire a few of those switches into logic gates, and they can add. One XOR gate and one AND gate add two bits. Two of those plus an OR gate handle a whole column, carry included. Line four up and the carry ripples from one to the next, exactly like carrying the one on paper.
Flip the bits yourself and watch the carry travel across the circuit.
Deep dive · 5 min