The document describes converting functions into NAND and NOR gates. For a function F(s) with inputs a, b, and c, the document shows how to rewrite the function using only NAND gates by factorizing terms like (ab) + (bc) + (ac) into ((ba) · bc · (ac)). Similarly, it rewrites the function using only NOR gates by factorizing terms like ab + bc + ac into b + (a + c) + (a + c).