Math 2.0

Computer science Definition

Boolean circuit

Builds on Directed graphBoolean function

Definition

Let n,m≥1n, m \ge 1. A Boolean circuit with nn inputs and mm outputs is a finite directed graph CC without directed cycles, with the following labels.

  1. Each vertex of in-degree 00 is an input vertex labelled by a variable x1,…,xnx_1, \dots, x_n or by a constant 00 or 11.
  2. Each other vertex is a gate labelled ∧\wedge or ∨\vee with in-degree 22, or ¬\neg with in-degree 11.
  3. A list of mm vertices is marked as the outputs.

For a∈{0,1}na \in \set{0,1}^n, each vertex vv gets a value v(a)∈{0,1}v(a) \in \set{0, 1}, defined along the edges since there are no cycles. An input vertex labelled xix_i gets aia_i, and a constant gets its own value. A gate gets the conjunction, disjunction or negation of the values of its in-neighbours. The circuit computes the Boolean function fC ⁣:{0,1}n→{0,1}mf_C \colon \set{0,1}^n \to \set{0,1}^m whose value at aa is the list of values of the outputs. The size of CC is the number of gates, and the depth is the largest number of edges on a directed path.

Remarks

Example: for n=2n = 2, take gates g1=¬x1g_1 = \neg x_1, g2=¬x2g_2 = \neg x_2, g3=x1∧g2g_3 = x_1 \wedge g_2, g4=g1∧x2g_4 = g_1 \wedge x_2 and the output g5=g3∨g4g_5 = g_3 \vee g_4. The graph has no cycles, every gate has the right in-degree, and fC(a1,a2)=1f_C(a_1, a_2) = 1 exactly when a1≠a2a_1 \ne a_2. So CC computes exclusive or with size 55 and depth 33. Non-example: a graph in which the output of an ∨\vee gate feeds back into its own input has a directed cycle, so it is not a circuit. Its values cannot be defined step by step from the inputs. Every Boolean function has a circuit, for example one built from its disjunctive normal form. A language L⊆{0,1}∗L \subseteq \set{0,1}^* is decided by a family (Cn)n≥1(C_n)_{n \ge 1} of circuits if CnC_n computes the indicator function of L∩{0,1}nL \cap \set{0,1}^n for every nn.

Reading path

To understand this page from the ground up, read these 3 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Boolean function definition
  2. Directed graph definition
  3. Boolean circuit definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Boolean_circuit
About this page
TagNDPRFZGZ9M
URIm2://NDPRFZGZ9M
Kinddefinition
WritingW0 stub
MSC68Q06, 94C11
DefinesBoolean circuit
UsesDirected graph, Boolean function
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.