1 - logic gates

Binary logic gate

let B={0,1}. any function f:B2B is called a binary logic gate.

  • B2 contains 4 tuples, and each of these tuples can be assigned one of two outputs, to uniquely determine a binary logic gate. Hence there are 16 binary logic gates.
  • We will denote binary logic gates as BF
  • These are also called Boolean functions

In the picture below, we have all 16 possible binary logic gates, and their co-responding (continuous and differentiable) real valued analogs.
Support/Figures/Pasted image 20250108221755.png
Remember that AB is true if: A is false, or A,B are both true. In particular, AB is equivalent to ¬AB.

logic gate composition

A logic gate composition graph is a directed acyclic graph (DAG) G where:

  • The nodes of G are either binary variables A,B{0,1} or instances of logic gates.
  • An edge (u,v) exists if and only if v is an instance of a logic gate, and u is either a binary variable or the output of another logic gate instance.
  • Each logic gate instance in the graph has an indegree of exactly two, meaning it takes exactly two inputs.
  • Each logic gate instance has an outdegree of exactly one, meaning it produces a single output.

It is clear that all 16 logic gates can be written as a composition of AND, OR, NOT.

universal logic gates

A function fBF is universal if for every gBF and every A,B{0,1}, there exists a logic gate composition G whose nodes are A, B, or instances of f, such that the function modelled by this graph is g.

NAND is a universal logic gate. So is NOR. For example it is sufficient to show that AND, OR, NOT can be modelled from NAND
Support/Figures/Pasted image 20250108225213.png

The paper uses all 16 logic gates (their real analog) and don't use universal gates to model