Gate Logic Built and Working.