Next

Restart

Back

Truth Values

Boolean Algebra

Binary Numbers

1

True

Binary Input
Switches

In the study of mathematics, Boolean algebra is the branch that focuses on mathematical and logical operations. It uses binary numbers or values that represent truth values, true and false, denoted by 1 and 0. The ones and zeros can represent switch positions ON (1) or OFF (0) or LEDs ON (1) OFF (0) as illustrated above.

2/11

False

Binary Output
LEDs

0

Binary Mathematics &
Boolean Algebra

1

B

0

Click switches on and off

INPUTS

NAND

The NAND gate implements logical opposite of a conjunction. The NAND gate must have at least two inputs; it can have many more, but only one output. The operations requires all input states to be HIGH(1) or true in order to produce a LOW (0) output. The NAND gate is simply an AND gate with the output inverted. The truth table represents the NAND gate operation. The line above the A and B inputs differentiates NAND from AND.

Boolean Expression:
X = A × B

OUTPUT

X

6/11

A

NAND Gate

Boolean Expression:
X = A + B

The OR gate implements logical disjunction. The OR gate must have at least two inputs; it can have many more, but only one output. The operation requires only one input state to be HIGH (1) or true in order to produce a HIGH (1) output. The truth table illustrates the OR gate operation. The OR operation uses the plus sign (+). This works based on the fact that 1 plus any positive number equals 1 or more.

OR Gate

OR

7/11

NOR Gate

Boolean Expression:
X = A + B

NOR

8/11

The NOR gate implements the opposite of the logical disjunction. The NOR gate must have at least two inputs; it can have many more, but only one output. The operation requires only one input state to be HIGH (1) or true in order to produce a LOW (0) output. A NOR is just an OR with an inverted output represented by the line above the A and B inputs. The truth table illustrates the NOR gate operation.

XOR gate is a digital logic gate that gives a HIGH (1) true output when only one input is high or low. Exclusive means that one input is different than all of the rest. An XOR gate implements an exclusive OR; that is, a HIGH output results if one, and only one, of the inputs to the gate is HIGH (or LOW). A way to remember XOR is "one or the other but not both". The truth table illustrates the XOR gate operation. The expression uses the circled plus symbol.

XOR Gate

Boolean Expression:
X = A ⊕ B

9/11

XOR

Boolean Expression:
X = A ⊕ B

XNOR Gate

XNOR gate is a digital logic gate that gives a LOW(0) false output when one input is exclusive or different than all the others. An XNOR gate implements an exclusive NOR; that is, a LOW output results if one, and only one, of the inputs to the gate is HIGH or (LOW). An XNOR is just an XOR with an inverted output. The truth table illustrates the XNOR gate operation.

XNOR

10/11

4/11

NOT Gate - (Inverter)

Boolean Expression:
A = X

Click switch on and off

The first logic gate is the NOT gate or Inverter. A NOT gate can only have one input and one output. An inverter circuit outputs a logic state representing the opposite logic-state to its input. Its main function is to invert the input state applied. The Boolean expression and operating truth table uses A as the input of the logical operation and X as the output. The line above an input or output indicates an inverted state for the value.

NOT

Boolean Algebra

This work is licensed with a
Creative Commons Attribution 4.0 International LicenseEndFragment

This material was developed with funding
from the National Science Foundation

1/11

AND

5/11

AND Gate

The AND gate implements logical conjunction. The AND gate must have at least two inputs. It can have many more, but there is only one output. The operations requires all input states to be HIGH (1) or true in order to produce a HIGH (1) output. The truth table represents the AND gate operation. The Boolean Expression for an AND gate is represented with letters as inputs (A and B) that are multiplied using any common format (A x B, A * B, AB). The rules of multiplication apply, so any value multiplied by 0 will equal zero.

Boolean Expression:
A x B = X

IEC Symbol

XNOR

Boolean algebra is based on logic operations using binary values. The laws of Boolean Algebra specifies seven logical operations. These operations are typically represented with symbols known as logic gates. Logic gates are the elementary building block of a digital circuit, smart devices and modern computers. Logic gates can have two or more inputs and one output.
There are two sets of symbols for elementary logic gates in common use, the "American Standards Association"(ANSI) which uses the distinctive shapes based on traditional schematics and the more modern square symbols used by the International Electrotechnical Commission (IEC).

Click to reveal each symbol.

3/11

ANSI Symbol

Boolean Logic Gates

NOT

AB

OR

AB

A ⊕ B

A + B

Match each term to its boolean expression.

11/11

A ⊕ B

A + B

XOR

A