binary algebra digital logic gates - nebomusic

Click here to load reader

Post on 03-Dec-2021

0 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

Binary_Algebra_Digital_Logic_GatesElectronics and Digital Design Marist 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: 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 Operations Operation Symbol Example Language AND * Or no
symbol F = AB A and B must
be true OR + F = A + B A or B must
be true NOT ‘ sign F = A’ A not true
(not A) NAND ‘ around
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 = AB A B F 0 0 0 0 1 0 1 0 0 1 1 1
A * B = F 0 * 0 = 0 0 * 1 = 0 1 * 0 = 0 1 * 1 = 1
Note the binary counting for A and B.
Another Truth Table example
• Equation: F = x + y
x y F 0 0 0 0 1 1 1 0 1 1 1 1
x + y = F 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1
Truth Table Example
F = xyz + w’ + x’
w x y z F 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 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)