Analysis and Synthesis of Boolean Expressions using Basic Logic Gates