Electronics formula's

De Morgan's laws are helpful in designing digital logic:

NOT (A AND B) == NOT A OR NOT B
NOT (A OR B) == NOT A AND NOT B

That means that even if all you have is a big pile of NAND gates (or NOR gates) you can build anything.