Biochemical switching device realizing McCulloch-Pitts type equation