Excess-3
The BCD variant that adds three to every digit and gets subtraction almost for free in return.
Excess-3 stores the decimal digit d as the binary value d+3, so zero becomes 0011 and nine becomes 1100. The offset looks arbitrary and is not: it makes the code self-complementing. Inverting the bits yields the nines complement — 4 is 0111, inverted 1000, which is 5, and 9−4 = 5. Subtraction can therefore be done as addition plus an inverter rather than with a dedicated subtractor, which on a relay calculator was the difference between hundreds of components and a handful.
The bonus is that no valid digit value is all zeros. A digit position with no voltage anywhere forms an invalid pattern rather than a zero, so a dead line or a relay that failed to pull could be told apart from the digit zero — a distinction early machines had no other way to make. George Stibitz used the encoding in Bell Labs' relay machines, which is why it is sometimes called Stibitz code. Addition needs a fix-up of ±3 depending on whether a carry came out, and that was the price.