ArticleslgStudy

mathematics

Boolean function

Boolean function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Boolean function rather than just read about it. In short: In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually {true, false}, {0,1} or {−1,1}). Alternative names are switching function, used especially in older computer science literature, and truth function (or logical function), used in logic.

Boolean function — main illustration
Boolean function — illustration

Key takeaways

  • Boolean function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Boolean function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Boolean function from memory before moving on to harder problems.

Reference excerpt

In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually {true, false}, {0,1} or {−1,1}). Alternative names are switching function, used especially in older computer science literature, and truth function (or logical function), used in logic. Boolean functions are the subject of Boolean algebra and switching theory. A Boolean function takes the form f:{0,1}k→{0,1}, where {0,1} is known as the Boolean domain and k is a non-negative integer called the arity of the function. In the case where k=0, the function is a constant element of {0,1}. A Boolean function with multiple outputs, f:{0,1}k→{0,1}m with m>1 is a vectorial or vector-valued Boolean function (an S-box in symmetric cryptography). There are 22k different Boolean functions with k arguments; equal to the number of different truth tables with 2k entries. Every k-ary Boolean function can be expressed as a propositional formula in k variables x1,...,xk, and two propositional formulas are logically equivalent if and only if they express the same Boolean function.

Examples

The rudimentary symmetric Boolean functions (logical connectives or logic gates) are:

NOT, negation or complement - which receives one input and returns true when that input is false ("not") AND or conjunction - true when all inputs are true ("both") OR or disjunction - true when any input is true ("either") XOR or exclusive disjunction - true when one of its inputs is true and the other is false ("not equal") NAND or Sheffer stroke - true when it is not the case that all inputs are true ("not both") NOR or logical nor - true when none of the inputs are true ("neither") XNOR or logical equality - true when both inputs are the same ("equal") An example of a more complicated function is the majority function (of an odd number of inputs).

Representation

A Boolean function may be specified in a variety of ways:

Truth table: explicitly listing its value for all possible values of the arguments Marquand diagram: truth table values arranged in a two-dimensional grid (used in a Karnaugh map) Binary decision diagram, listing the truth table values at the bottom of a binary tree Venn diagram, depicting the truth table values as a colouring of regions of the plane Algebraically, as a propositional formula using rudimentary Boolean functions:

Negation normal form, an arbitrary mix of AND and ORs of the arguments and their complements Disjunctive normal form, as an OR of ANDs of the arguments and their complements Conjunctive normal form, as an AND of ORs of the arguments and their complements Canonical normal form, a standardized formula which uniquely identifies the function: Algebraic normal form or Zhegalkin polynomial, as a XOR of ANDs of the arguments (no complements allowed) Full (canonical) disjunctive normal form, an OR of ANDs each containing every argument or complement (minterms) Full (canonical) conjunctive normal form, an AND of ORs each containing every argument or complement (maxterms) Blake canonical form, the OR of all the prime implicants of the function Boolean formulas can also be displayed as a graph:

Propositional directed acyclic graph Digital circuit diagram of logic gates, a Boolean circuit And-inverter graph, using only AND and NOT In order to optimize electronic circuits, Boolean formulas can be minimized using the Quine–McCluskey algorithm or Karnaugh map.

Analysis

Properties A Boolean function can have a variety of properties:

Constant: Is always true or always false regardless of its arguments. Monotone: for every combination of argument values, changing an argument from false to true can only cause the output to switch from false to true and not from true to false. A function is said to be unate in a certain variable if it is monotone with respect to changes in that variable. Linear: for each variable, flipping the value of the variable either always makes a difference in the truth value or never makes a difference (a parity function). Symmetric: the value does not depend on the order of its arguments. Read-once: Can be expressed with conjunction, disjunction, and negation with a single instance of each variable. Balanced: if its truth table contains an equal number of zeros and ones. The Hamming weight of the function is the number of ones in the truth table. Bent: its derivatives are all balanced (the autocorrelation spectrum is zero) Correlation immune to mth order: if the output is uncorrelated with all (linear) combinations of at most m arguments Evasive: if evaluation of the function always requires the value of all arguments A Boolean function is a Sheffer function if it can be used to create (by composition) any arbitrary Boolean function (see functional completeness) The algebraic degree of a function is the order of the highest order monomial in its algebraic normal form Circuit complexity attempts to classify Boolean functions with respect to the size or depth of circuits that can compute them.

Derived functions A Boolean function may be decomposed using Boole's expansion theorem in positive and negative Shannon cofactors (Shannon expansion), which are the (k−1)-ary functions resulting from fixing one of the arguments (to 0 or 1). The general k-ary functions obtained by imposing a linear constraint on a set of inputs (a linear subspace) are known as subfunctions. The Boolean derivative of the function to one of the arguments is a (k−1)-ary function that is true when the output of the function is sensitive to the chosen input variable; it is the XOR of the two corresponding cofactors. A derivative and a cofactor are used in a Reed–Muller expansion. The concept can be generalized as a k-ary derivative in the direction dx, obtained as the difference (XOR) of the function at x and x + dx. The Möbius transform (or Boole–Möbius transform) of a Boolean function is the set of coefficients of its polynomial (algebraic normal form), as a function of the monomial exponent vectors. It is a self-inverse transform. It can be calculated efficiently using a butterfly algorithm ("Fast Möbius Transform"), analogous to the fast Fourier transform. Coincident Boolean functions are equal to their Möbius transform, i.e. their truth table (minterm) values equal their algebraic (monomial) coefficients. There are 2^2^(k−1) coincident functions of k arguments.

… excerpt ends here. Continue reading the full article.

Illustrations

Boolean function: A binary decision diagram and truth table of a ternary Boolean function
A binary decision diagram and truth table of a ternary Boolean function
Boolean function: The sixteen binary Boolean functions
The sixteen binary Boolean functions
Boolean function: A Boolean function represented as a Boolean circuit
A Boolean function represented as a Boolean circuit

Worked examples

Example 1 — a first encounter with Boolean function

Start with the simplest possible case. Write down what Boolean function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Boolean function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Boolean function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Boolean function

In research
Boolean function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Boolean function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Boolean function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Binary arithmetic, Boolean algebra, Logic gates, so understanding it makes those chapters shorter.
In everyday life
Look for Boolean function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Boolean function” →

How to study Boolean function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Boolean function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Boolean function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Boolean function in simple terms?

In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually {true, false}, {0,1} or {−1,1}). Alternative names are switching function, used especially in older computer science literature, and truth function (or logical function), used i…

Why does Boolean function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Boolean function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Boolean function.

Tags

  • Binary arithmetic
  • Boolean algebra
  • Logic gates
  • Programming constructs

Keep exploring