A Comprehensive Technique For Majority/Minority Logic Synthesis With Applications In Nanotechnology