Chapter 10.3: Logic Gates Based on Slides from Discrete Mathematical Structures: Theory and Applications and by Aaron Bloomfield.