Amazon interview question

Write code to Implement a circuit board with logical gates.