Boolean Logic
In Boolean Logic, we can only use two valuses; TRUE and FALSE.
This mathematical system is the foundation of digital electronics and computer design. Often we represent TRUE by 1
and FALSE by 0, but this is just representation, technically, \(TRUE \neq 1\).
Boolean values are manipulated with the Boolean operations as follows:
Fundamental Boolean Operations:
- Negation, NOT: \(\neg\)
The negation of a Boolean value is its opposite value.
(e.g. \(\neg 1 = 0, \quad \neg 0 = 1\))
- Conjunction, AND: \(\wedge\)
The conjunction of two Boolean values is 1 if both of those values (operands) are 1.
(e.g. \(1 \wedge 0 = 0, \quad 1 \wedge 1 = 1, \quad 0 \wedge 0 = 0\))
- Disjunction, OR: \(\vee\)
The disjunction of two Boolean values is 1 if either of those values is 1.
(e.g. \(1 \vee 0 = 1, \quad 1 \vee 1 = 1, \quad 0 \vee 0 = 0\))
More Boolean operations:
- Exclusive or, XOR: \(\oplus\)
The exclusive or is 1 if either but not both of its two values is 1.
(e.g. \(1 \oplus 1 = 0, \quad 1 \oplus 0 = 1, \quad 0 \oplus 0 = 0\))
- Equality: \(\leftrightarrow\)
The equality is 1 if both of its operands have the same value.
(e.g. \(1 \leftrightarrow 1 = 1, \quad 1 \leftrightarrow 0 = 0, \quad 0 \leftrightarrow 0 = 1\))
This is equivalent to XNOR, which is the logical complement of the XOR.
- Implication: \(\rightarrow\)
The implication is 0 if its first operand is 1 and its second operand is 0. Otherwise, it's 1.
(e.g. \(1 \rightarrow 1 = 1, \quad 1 \rightarrow 0 = 0, \quad 0 \rightarrow 0 = 1\))
Circuits
When we study Boolean logic as a purely mathematical system, the focus is on abstract algebraic properties. However,
when these Boolean functions are implemented in hardware, they are called logic gates.
Computers are built using electronic components wired together in a design known as a digital circuit. Logic
gates are physically implemented using transistors, and each Boolean operation corresponds to a type of gate that controls the
flow of electrical signals.
However, circuits are not only used for physical hardware but also for theoretical models in computer science. When Boolean
functions are used to construct a computational model rather than a physical device, we refer to them as Boolean circuits.
These circuits serve as a fundamental concept in computational complexity theory, where they help analyze the efficiency and
limitations of different computational processes. Here, we only introduce the definition of Boolean circuits. We will revisit this topic
after learning complexity theory in the future.
Boolean Circuit:
A Boolean circuit is a collection of gates and inputs connected by wires. Cycles are not permitted. Gates take three forms: AND gates,
OR gates, and NOT gates.
Note: A Boolean circuit is said to be a directed acyclic graph (DAG). Each node represents a logic gate or
an input variable. Input nodes (source nodes) represent Boolean variables. Internal nodes represent logic gates. A special output
node (sink node) represents the final output of the circuit. Edges represent the flow of information, showing how outputs of one
gate serve as inputs to another. These edges are directed because signals flow in one direction (from inputs toward outputs).