Binary Logic and Circuits

Example

Algebraic representation:

Truth table representation:

0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1

Binary Logic Variables

(same as in programming)

Definition

0: false
1: true

Good way to remember, 0 is nothing, so it's false, 1 is something, so it's true

Binary Logic Functions

Definition

These are functions of expressions of binary logic variables on these functions product only 1 and 9 depending on the input.

Logic Operators

Operator Symbol Example
AND "" or nothing ,
OR "+"
NOT "'" or overline ,

Operator precedence: (), NOT, AND, OR (same as in programming)

Notation differs from Logical Operators in mathematics

Binary Circuits

NOT

See negation

Symbol

Truth Table

x x'
0 1
1 0

AND

See logical and

Symbol

Truth Table

x y xy
0 0 0
0 1 0
1 0 0
1 1 1

OR

See logical or

Symbol

Truth Table

x y x + y
0 0 0
0 1 1
1 0 1
1 1 1

NAND

Symbol

Truth Table

x y (xy)'
0 0 1
0 1 1
1 0 1
1 1 0

Remark

Thanks to De Morgan's law, the NAND operation is functionally complete. That is, any boolean expression can be re-expressed equivalently with ONLY NAND gates. See Making Other Gates using NAND Gates.

Also see Canonical Expressions#NAND NAND Realization

NOR

Symbol

Truth Table

x y (x + y)'
0 0 1
0 1 0
1 0 0
1 1 0

Also see Canonical Expressions#NOR NOR Realization

XOR

Symbol

Truth Table

x y
0 0 0
0 1 1
1 0 1
1 1 0

Note

XNOR

Symbol

Truth Table

x y
0 0 1
0 1 0
1 0 0
1 1 1

Note

Buffer

Symbol

Truth Table

x f
0 0
1 1

Tri-State Buffer

Symbol

Truth Table

e x f
0 0 Z
0 1 Z
1 0 0
1 1 1

Multiple Input Gates

You may see gates with multiple inputs

Example

This is just taking in multiple inputs and combining them with AND

NAND and NOR Equivalency

Recall De Morgan's law.