working method of nor logic gate