This paper is concerned with not only the transformation of the logic diagrams to the NAND and the NOR forms but also the inverse transformation deriving the simple Boolean function from a logic diagram. The conversions of the algebraic expression from the AND, OR and NOT operations to the NAND and the NOR operations are usually quite complicated, because they involve a large number of repeated applications of De Morgan's Theorem and the other logic relations. For the derivation of the Boolean function, it becomes difficult because the Boolean function is determined from the De Morgan's theorem in consecutive order until the output is expressed in terms of input variables (9). But, these difficulties are avoided by the use of new techniques, called the TWO-NOTs method and the MOVING-NOT method, that are presented in this paper.