binary algebra digital logic gates - nebomusic

Post on 03-Dec-2021

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Binary Algebra, Digital Logic, and Logic Gates

Electronics and Digital DesignMarist School

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.

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.

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

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).

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.

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.

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

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)

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

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).

Table of Logic Gate symbols with Boolean Algebra:

Examples with Logic.ly: F = AB

Example with Logic.ly: F = A + B

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)

top related