The Design of Switching Circuits