Open your bank's mobile app to send some money. The Send button stays grey until three things are true at once: you have typed an amount, the account number has the right number of digits, and the PIN has been entered. Take away any one of them and nothing happens. Now think of the staircase in a Dhaka apartment building. The light has a switch downstairs and another one upstairs, and flipping either switch changes the light, whatever the other switch is doing. Two different rules, yet both are made of the same small ingredients: questions with a yes or no answer, joined by "and", "or" and "not".
A computer chip is billions of tiny switches taking exactly this kind of decision, over and over, every second. Boolean algebra is the arithmetic of yes and no. It tells you what such a circuit will do, and, more usefully, how to build the same circuit with fewer parts. That is why Digital Logic starts here.
By the end of this chapter you'll be able to read any gate's symbol and truth table, and say what XOR and XNOR detect. You'll use gates on whole bytes to clear, set, flip and test bits. You'll simplify an expression the way a written paper expects, naming the law at each line, and apply De Morgan's law to any number of variables. You'll move freely between an expression, a truth table, a minterm list and a circuit, and you'll build any circuit from NAND gates alone, or NOR gates alone, including the famous four-gate XOR.
We'll go in nine parts, from easy to hard: the values and operations, the gates, XOR and masks, the laws, De Morgan, simplification, canonical forms, NAND and NOR circuits, and finally reading and drawing circuits.