Boolean or, Switching Algebra. Switching Algebra The two-valued Boolean algebra is also called “Switching algebra” by engineers and computer scientists.

Slides:



Advertisements
Similar presentations
Switching circuits Composed of switching elements called “gates” that implement logical blocks or switching expressions Positive logic convention (active.
Advertisements

Lecture 5 EGRE 254 1/28/09. 2 Boolean algebra a.k.a. “switching algebra” –deals with Boolean values -- 0, 1 Positive-logic convention –analog voltages.
Boolean Algebra and Combinational Logic
Computer Logic and Digital Design Chapter 2 Henry Hexmoor AND logic
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
EE365 Boolean algebra Combinational-circuit analysis.
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
1 EE 365 Combinational-Circuit Synthesis. 2 Combinational-Circuit Analysis Combinational circuits -- outputs depend only on current inputs (not on history).
EECC341 - Shaaban #1 Lec # 5 Winter Switching Algebra: Principle of Duality Any theorem or identity in switching algebra remains true if.
COMBINATIONAL LOGIC CIRCUITS C.L. x1 x2 xn Z Z = F (x1, x2, ……., Xn) F is a Binary Logic (BOOLEAN ) Function Knowing F Allows Straight Forward Direct Implementation.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #2 Boolean Laws and Methods.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
 We can use an algebraic description of the circuit ’ s functional behavior in the analysis of a larger system that includes the circuit.  We can determine.
Example: Given a 4-bit input combination N=N 3 N 2 N 1 N 0, this function produces a 1 output for N=1,2,3,5,7,11,13, and 0 otherwise.  According to the.
1 EECC341 - Shaaban #1 Lec # 6 Winter Combinational Circuit Analysis Example Given this logic circuit we can : Find corresponding logic.
Modified from John Wakerly Lecture #2 and #3 CMOS gates at the transistor level Boolean algebra Combinational-circuit analysis.
Combinational Digital Circuits. Measurement Our world is an analog world. Measurements that we make of the physical objects around us are never in discrete.
2.7 NAND and NOR logic networks
Chapter 2 Boolean Algebra and Logic Gates
Boolean Algebra Boolean algebra Boolean algebra, like any other deductive mathematical system, may be defined with –a set of elements, –a set of operators,
KU College of Engineering Elec 204: Digital Systems Design
Chapter 2 Combinational Systems And / Or / Not. TRIAD PRINCIPLE: Combinational is about And / Or / Not combinations As well as equivalent functions. It.
Boolean Algebra and Digital Circuits
Switching functions The postulates and sets of Boolean logic are presented in generic terms without the elements of K being specified In EE we need to.
ECE 331 – Digital System Design
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
1 EE121 John Wakerly Lecture #4 Combinational-Circuit Synthesis ABEL.
Combinational Logic 1.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
Boolean Algebra 1854, George Boole created a two valued algebraic system which is now called Boolean algebra. 1938, Claude Shannon adapted Boolean algebra.
Overview Part 1 – Gate Circuits and Boolean Equations
1 ENGR 254 Lecture DeMorgan Symbol Equivalence.
Boolean Algebra Combinational-Circuit Analysis We analyze a combinational logic circuit by obtaining a formal description of its logic function. Once.
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
LOGIC GATES & BOOLEAN ALGEBRA
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
ECE 3110: Introduction to Digital Systems Combinational-Circuit Synthesis.
ECE 3110: Introduction to Digital Systems
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
1 EENG 2710 Chapter 2 Algebraic Methods For The Analysis and Synthesis of Logic circuits.
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
Digital Design: Principles and Practices Chapter 4 Combinational Logic Design Principles.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
KU College of Engineering Elec 204: Digital Systems Design 1 Review D: n bit binary number D = (d n-1 ∙ ∙ ∙ d 1 d 0 ) 2 If D is an unsigned binary number.
ECE 2110: Introduction to Digital Systems
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CHAPTER 2 Boolean algebra and Logic gates
Digital Systems Design 1 Signal Expressions Multiply out: F = ((X + Y)  Z) + (X  Y  Z) = (X  Z) + (Y  Z) + (X  Y  Z)
Lecture 4 Topics Boolean Algebra Huntington’s Postulates Truth Tables
ECE 2110: Introduction to Digital Systems
ECE 2110: Introduction to Digital Systems
CSC205 Jeffrey N. Denenberg Lecture #5
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
ECE 2110: Introduction to Digital Systems
Unit 2 Boolean Algebra.
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
CS 105 Digital Logic Design
ECE 3110: Introduction to Digital Systems
ECE 331 – Digital System Design
Modified from John Wakerly Lecture #2 and #3
Boolean Algebra.
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
Digital Systems Design
EE121 John Wakerly Lecture #3
From now on: Combinatorial Circuits:
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Presentation transcript:

Boolean or, Switching Algebra

Switching Algebra The two-valued Boolean algebra is also called “Switching algebra” by engineers and computer scientists.

Switching algebra “switching algebra” –deals with boolean values -- 0, 1 Positive-logic convention –analog voltages LOW, HIGH --> 0, 1 Negative logic -- seldom used Signal values denoted by variables (X, Y, FRED, etc.)

Boolean operators Complement:X (opposite of X) AND:X  Y OR:X + Y Axiomatic definition: A1-A5, A1-A5 binary operators, described functionally by truth table.

More definitions Literal: a variable or its complement X, X, FRED, CS_L Expression: literals combined by AND, OR, parentheses, complementation X+Y P  Q  R A + B  C ((FRED  Z) + CS_L  A  B  C + Q5)  RESET Equation: Variable = expression P = ((FRED  Z) + CS_L  A  B  C + Q5)  RESET

Logic symbols

Theorems

Complement notations ~ x x’  x x x’ prime notation is the easiest to type.

Operator precedence 1.Parentheses 2.NOT 3.AND 4.OR

DeMorgan’s theorem An n-input AND gate whose output is complemented is equivalent to an n-input OR gate whose inputs are complemented. (x. y)’ = x’ + y’

DeMorgan Symbol Equivalence

Likewise for OR

DeMorgan Symbols

Boolean function A Boolean function is an expression formed with binary variables, the binary operators OR and AND, and unary operator NOT, parentheses, and an equal sign. For a given value of the variables, the function can be either 0 or 1. F = x. Y. z’

Simplify a Boolean function F = x.(x’ + y) = x.x’ + x.y = 0 + x.y = x.y F = x.y + x’.z + y.zconsensus, T11 = x.y + x’.z + y.z.(x + x’) = x.y + x’.z + y.z.x + y.z.x’ = x.y.(1 + z) + x’.z.(1 + y) = x.y + x’.z

Truth table The most basic representation of a logic function is the truth table. This representation simply lists the output of the circuit for every possible input combination. Normally, the input combinations are arranged in rows in ascending order, and the corresponding outputs are written in a column next to the rows. The truth table for an n -variable logic function has 2 n rows. Obviously truth tables are practical for logic functions with small n. John Wakerly mentioned that for students it is about 10 and for everyone else it is about 4.

Truth table The information contained in a truth table can also be conveyed algebraically.

Truth table vs. minterms & maxterms

Minterm and Maxterm Each minterm is obtained from an AND term of the n variables, with each variable being primed if the corresponding bit of the binary number is a 0 and unprimed if a 1. Each maxterm is obtained from an OR term of the n variables, with each variable being unprimed if the corresponding bit of the binary number is a 0 and primed if a 1.

Boolean function from truth table A Boolean function may be expressed algebraically from a given truth table by forming a minterm for each combination of the variables that produces a 1 in the function, and then taking the OR of all those terms. Any Boolean function can be expressed as a canonical sum (sum of minterms). Any Boolean function can be expressed as a canonical product (product of maxterms).

Boolean function as a sum of minterms: Any Boolean function can be expressed as a canonical sum. The canonical sum of a logic function is a sum of the minterms corresponding to truth-table rows for which the function produces a 1 output i = F =  x,y,z (0,3,4,6,7) = X’.Y’.Z’ + X’.Y.Z + X.Y’.Z’ + X.Y.Z’ + X.Y.Z

Boolean function as a pruduct of maxterms: Any Boolean function can be expressed as a canonical pruduct. The canonical pruduct of a logic function is a pruduct of the maxterms corresponding to truth-table rows for which the function produces a 0 output i = F =  x,y,z (1,2,5) = (X+Y+Z’). (X+Y’+Z). (X’+Y+Z’)

F =  x,y,z (0,3,4,6,7) =  x,y,z (1,2,5) i = F’ =  x,y,z (1,2,5) F’ = X’.Y’.Z + X’.Y.Z’ + X.Y’.Z (F’)’ = (X’.Y’.Z + X’.Y.Z’ + X.Y’.Z)’ F = (X+Y+Z’). (X+Y’+Z). (X’+Y+Z’) F =  x,y,z (1,2,5)

Combinational-Circuit Analysis We analyze a combinational logic circuit by obtaining a formal description of its logic function. Once we have a description of the logic function: we can determine the behaviour of the circuit for various input combinations. We can manipulate the algebraic description to suggest different circuit structure. We can convert to sum-of-products expression for PLDs. We can use to analyze a larger system that includes it.

Combinational analysis There are a number of ways to obtain a formal description of the circuit’s function.

Obtaining truth table Produce output from different input combinations ( 2 n ).

Signal expressions Multiply out: F = ((X + Y’). Z) + (X’. Y. Z’) = (X. Z) + (Y’. Z) + (X’. Y. Z’)

New circuit, same function

Another example

Circuit Descriptions and Designs What is the starting point for designing combinational logic circuit? Usually, we are given a word description of a problem occasionally, the description is a list of input combinations (ON, OFF), the verbal equivalent of a truth table or the canonical sum or product.

Combinational-Circuit Analysis Combinational circuits -- outputs depend only on current inputs (not on history). Kinds of combinational analysis: –exhaustive (truth table) –algebraic (expressions) –simulation / test bench Write functional description using schematic editor Write functional description in HDL Define test conditions / test vecors, including corner cases Compare circuit output with functional description (or known- good realization) Repeat for “random” test vectors

Example, 4-bit prime number detector Given a 4-bit input combination N = N 3 N 2 N 1 N 0, this function produces a 1 output for N = 1, 2, 3, 5, 7, 11, 13 and 0 otherwise. A logic function described in this way can be designed directly from the canonical sum or product expression i = AB CDEF F =  N 3 N 2 N 1 N 0 (1, 2, 3, 5, 7, 11, 13) = N’ 3 N’ 2 N’ 1 N 0 + N’ 3 N’ 2 N 1 N’ 0 + N’ 3 N’ 2 N 1 N 0 + …

Design from truth table Truth table --> canonical sum (sum of minterms) Example: prime-number detector –4-bit input, N 3 N 2 N 1 N 0 row N 3 N 2 N 1 N 0 F F =   (1,2,3,5,7,11,13)

Minterm list --> canonical sum

Algebraic simplification Theorem T8, Reduce number of gates and gate inputs

Reduced circuit

Combinational-Circuit Design Sometimes you can write an equation or equations directly using “logic” (the kind in your brain). Example (alarm circuit): Corresponding circuit:

Circuit Descriptions and Designs The alarm output is 1 if the PANIC input is 1, or if the ENABLE input is 1, the EXITING input is 0, and the house is not secure; the house is secure if the WINDOW, DOOR, and GARAGE inputs are all 1. ALARM = PANIC + ENABLE. EXITING’. SECURE’ SECURE = WINDOW. DOOR. GARAGE ALARM = PANIC + ENABLE. EXITING’. (WINDOW. DOOR. GARAGE)’

Alarm Circuit

Modified Alarm Function “Multiply out”: ALARM = PANIC + ENABLE. EXITING’. (WINDOW. DOOR. GARAGE)’ ALARM = PANIC + ENABLE. EXITING’. (WINDOW’ + DOOR’ + GARAGE’) ALARM = PANIC + ENABLE. EXITING’. WINDOW’ + ENABLE. EXITING’. DOOR’ + ENABLE. EXITING’. GARAGE’

Alarm-circuit transformation Sum-of-products form –Useful for programmable logic devices (PLDs)

circuit transformation The design methods that we have described so far use AND, OR, and NOT gates. We might like to use NAND and NOR gates, too because - they are faster than ANDs and ORs in most technologies. But we develop a logic expression from normal logic (ANDs and ORs) and then we translate it into other forms using NAND and NOR gates. –An AND-OR (sum-of-products) circuit may be converted to a NAND-NAND circuit, and –a OR-AND (product-of- sums) circuit may be converted to a NOR-NOR circuit.

Sum-of-products form AND-OR NAND-NAND

Product-of-sums form OR-AND NOR-NOR P-of-S preferred in CMOS, TTL (NAND-NAND)