DNA is written with four bases that pair A–T and G–C, so one strand determines the other.
highlighted = computed this step
The four DNA bases
DNA is written with 4 bases: A, C, G, and T. Each base pairs with exactly one partner — A with T, and G with C — so one strand fixes the other.
A↔T,G↔C
Complementing twice returns the original
Replacing every base by its partner is its own inverse: do it twice and the original strand comes back. The bottom row here is the partner of the partner, and it matches the top row.
comp(comp(s))=s
The reverse complement
The two strands run in opposite directions (antiparallel). The partner of the strand is its per-base complement; read that partner backwards and you get the reverse complement, here TTATTTGCATGCCAT. Honesty note: this is the Watson–Crick pairing idealization — real DNA also has modified bases and occasional mismatches.