binary algebra digital logic gates - nebomusic

15
Binary Algebra, Digital Logic, and Logic Gates Electronics and Digital Design Marist School

Upload: others

Post on 03-Dec-2021

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Binary Algebra Digital Logic Gates - NeboMusic

Binary Algebra, Digital Logic, and Logic Gates

Electronics and Digital DesignMarist School

Page 2: Binary Algebra Digital Logic Gates - NeboMusic

Binary Algebra

• Binary Systems store “State” or charge• On: 1• Off: 0

• Binary Equations (Algebra) compare the “state” of a binary equations and return a ‘0’ or ‘1’. • A Binary equation does not compute a numeric

value (like a standard equation).• A Binary equation only returns 0 or 1.• Somewhat like the conditional in an ‘if statement’

or a Boolean function in java.

Page 3: Binary Algebra Digital Logic Gates - NeboMusic

Examples of Binary/Boolean expressions:F = AB

F = xyz’ + y

F = (A’ + B)(C’B)

F = W’(X+Y)Z

F: the result of the equation. The output.

A, B, C, W, x, y, z . . . Variables in the equations representing ‘states’ or truths. The inputs.

Page 4: Binary Algebra Digital Logic Gates - NeboMusic

Selected Binary OperationsOperation Symbol Example LanguageAND * Or no

symbolF = AB A and B must

be trueOR + F = A + B A or B must

be trueNOT ‘ sign F = A’ A not true

(not A)NAND ‘ around

expressionF = (AB)’ A is not true

and B is not true.

NOR F = (A + B)’ A must not be true or B must not be true.

EOR F = A (+) B A or B must be true but not both A and B true

Page 5: Binary Algebra Digital Logic Gates - NeboMusic

Truth Tables

• Outline all possibilities of equation inputs and outputs with a given expression.• Number Elements of a binary truth table will equal

to 2 raised to the number of inputs. (2n)• “State Diagram” of the binary system. (All possible

inputs and outputs).

Page 6: Binary Algebra Digital Logic Gates - NeboMusic

Procedure for creating a truth table.• Make a grid or table with the inputs and outputs.• Columns will be inputs and outputs• Rows will be 2 raised to the number of inputs (2n)

• Fill in the binary count for inputs (0 to 2n-1)

• Use the Binary Equation to calculate the result (output) for each combination of inputs.

Page 7: Binary Algebra Digital Logic Gates - NeboMusic

Example Creation of Truth Table:

• Equation:

F = ABA B F0 0 00 1 01 0 01 1 1

A * B = F0 * 0 = 00 * 1 = 01 * 0 = 01 * 1 = 1

Note the binary counting for A and B.

Page 8: Binary Algebra Digital Logic Gates - NeboMusic

Another Truth Table example

• Equation: F = x + y

x y F0 0 00 1 11 0 11 1 1

x + y = F0 + 0 = 00 + 1 = 11 + 0 = 11 + 1 = 1

Page 9: Binary Algebra Digital Logic Gates - NeboMusic

Truth Table Example

F = xyz + w’ + x’

w x y z F0 0 0 0 10 0 0 1 10 0 1 0 10 0 1 1 10 1 0 0 10 1 0 1 10 1 1 0 10 1 1 1 11 0 0 0 11 0 0 1 11 0 1 0 11 0 1 1 11 1 0 0 01 1 0 1 01 1 1 0 01 1 1 1 1

Note the number of rows: 2n

Or: 2 raised to 4th power

24 = 16

Row count: 0 to 15 or 0 to (2n – 1)

Page 10: Binary Algebra Digital Logic Gates - NeboMusic

Algebraic Properties work in similar manners:F = AB + AC -> F = A(B+C)

F = (A+B)(C + D) -> F = AC + AD + BC + BD

F = x(z + y) -> F = xz + xy

Page 11: Binary Algebra Digital Logic Gates - NeboMusic

Logic Gates and Binary Algebra

• The expressions (AND, OR, NOT, NOR, . . .) in Binary Algebra can be thought of as ‘electronic components’ in a digital system.• We call these ‘components’ : Logic Gates• The Logic Gates take input (on or off signals /

current or no current) and then output a signal based on the configuration of the component.• Combining the Logic Gates and inputs creates a

digital device. (Billions of ‘components’ combined creates what we call a computer).

Page 12: Binary Algebra Digital Logic Gates - NeboMusic

Table of Logic Gate symbols with Boolean Algebra:

Page 13: Binary Algebra Digital Logic Gates - NeboMusic

Examples with Logic.ly: F = AB

Page 14: Binary Algebra Digital Logic Gates - NeboMusic

Example with Logic.ly: F = A + B

Page 15: Binary Algebra Digital Logic Gates - NeboMusic

Gates can be used to construct

•Decision Circuits (If statements)•Operators (Adders, subtractors . . .)•Memory (Using Latches and Flip Flops)•Counters (Latches or Flip Flops with a clock pulse)