Simulates a circuits with various gates and inputs