liveBook · Manning

Boolean operation

As explained in Math and Architectures of Deep Learning

A boolean-valued function over logical inputs, such as AND, OR, NOT, or XOR, used here as an example family of functions that can be emulated by perceptrons or MLPs.

A boolean operation is a function whose inputs and output take binary values: 0 (“no” or “don’t fire”) and 1 (“yes” or “fire”). Logical operations combine decisions produced by other machines, making them useful as compact components in larger systems. section 7.2.1

Common operations express different combinations of binary conditions:

  • OR outputs 1 when at least one condition is active, such as braking when a self-driving car detects a person, vehicle, or bend. section 7.2.1
  • AND outputs 1 when all required conditions are active, such as a cat fleeing only when an object is both hard and sharp. section 7.2.1
  • NOT reverses a binary decision, such as sounding an alarm when a face detector fails to recognize an authorized person. section 7.2.1

Every boolean operation can be represented by a truth table. For each row whose output is 1, form an AND of the relevant inputs or their complements; then combine those terms with OR. This construction expresses arbitrary logical functions with a multilayer perceptron (MLP). section 7.5.2

Constructing XOR with an MLP

XOR is y = x̄₀x₁ + x₀x̄₁. The two rows producing y = 1 become separate perceptrons: one computes x̄₀x₁ and the other computes x₀x̄₁. A final perceptron performs OR over their outputs. A single perceptron cannot model XOR because its decision boundary cannot separate the required points, whereas the two-layer MLP can. section 7.5.2 section 7.4

How Math and Architectures of Deep Learning covers it

How deep it goes
Defines binary operations, gives real-world cases, and derives MLP construction from truth-table rows, stopping short of training details.
Examples
Uses cat avoidance, vehicle braking, access alarms, friendship recommendations, and an XOR truth table.
What it assumes
Assumes binary variables and basic perceptrons, while defining logical operators and showing their truth-table decomposition.
What you can do after
Build boolean functions from truth tables by decomposing active rows into perceptrons and combining them in an MLP.
How it connects
Connects boolean operations to truth tables, perceptrons, multilayer perceptrons, complements, decision boundaries, and function approximation.

Also explained in

Compare how 4 books explain boolean operation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.