As
earthquake says above, all
boolean expressions can be implemented with the nand function alone. The following should help illustrate this concept. The nand function is indicated by the  character, often called the
Sheffer stroke.
Consider AA
A AA

T F
F T
Thus, AA is equivalent to ¬A.
Now to find the ∧ (and) function
A B AB (AB)(AB)

F F T F
F T T F
T F T F
T T F T
So we have (AB)(AB)
equivalent to A ∧ B (A and B)
From this point, we can achieve the
disjunction (
or) function as A∨B is equivalent to ¬(¬A∧¬B).
Therefore, A∨B can be represented in nand terms as
((AA)(BB))((AA)(BB))((AA)(BB))((AA)(BB))
Simple!
Furthermore,
A→B (if A then B) is equivalent to
((A(BB))(A(BB)))((A(BB))(A(BB)))
If you don't have a
headache yet,
A↔B (A
if and only if B) is equivalent to
(((AB)(AB))(((AB)(AB))((AB)(AB)))))(((AB)(AB))(((AB)(AB))((AB)(AB)))))

((((AB)(AB))(((AB)(AB))((AB)(AB))))(((AB)(AB))(((AB)(AB))((AB)(AB)))))
Sorry if i made a
mistake in that last one, but i
applaud you for picking it out.