Cognizant interview question

Write a program corresponding to AND, OR, NOT digital gates