Combinational Logic. Precedence. Quick Quiz 25/9/12. Schematics à Boolean Expression. 3 Representations of Logic Functions. Dr. Hayden So.

Similar documents
Introduction to Electrical & Electronic Engineering ENGG1203

CS12N: The Coming Revolution in Computer Architecture Laboratory 2 Preparation

Fast Boolean Algebra

Boolean algebra.

expression simply by forming an OR of the ANDs of all input variables for which the output is

Boolean Algebra. Boolean Algebra

Overview of Today s Lecture:

Lecture 6. Notes. Notes. Notes. Representations Z A B and A B R. BTE Electronics Fundamentals August Bern University of Applied Sciences

Lecture 3. Introduction digital logic. Notes. Notes. Notes. Representations. February Bern University of Applied Sciences.

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

Bridging the gap: GCSE AS Level

Coalgebra, Lecture 15: Equations for Deterministic Automata

EECS 141 Due 04/19/02, 5pm, in 558 Cory

Digital Control of Electric Drives

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

Control with binary code. William Sandqvist

Simplifying Algebra. Simplifying Algebra. Curriculum Ready.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Fall Notes - Unit 1

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-378: Computer Hardware Design Winter Notes - Unit 1

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Chapter 1: Fundamentals

Chapters Five Notes SN AA U1C5

1 ELEMENTARY ALGEBRA and GEOMETRY READINESS DIAGNOSTIC TEST PRACTICE

Boolean Algebra. Boolean Algebras

2.4 Linear Inequalities and Interval Notation

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Parse trees, ambiguity, and Chomsky normal form

1B40 Practical Skills

Matrix Algebra. Matrix Addition, Scalar Multiplication and Transposition. Linear Algebra I 24

CS 330 Formal Methods and Models

Chapter 6 Techniques of Integration

Chapter 9 Definite Integrals

CS 330 Formal Methods and Models

SIMPLIFICATION OF BOOLEAN ALGEBRA. Presented By: Ms. Poonam Anand

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

Multiplying integers EXERCISE 2B INDIVIDUAL PATHWAYS. -6 ì 4 = -6 ì 0 = 4 ì 0 = -6 ì 3 = -5 ì -3 = 4 ì 3 = 4 ì 2 = 4 ì 1 = -5 ì -2 = -6 ì 2 = -6 ì 1 =

Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

State space systems analysis (continued) Stability. A. Definitions A system is said to be Asymptotically Stable (AS) when it satisfies

USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year

Introduction to Algebra - Part 2

First Midterm Examination

p-adic Egyptian Fractions

Finite Field Arithmetic and Implementations. Xinmiao Zhang Case Western Reserve University

Linear Inequalities. Work Sheet 1

Chapter 1: Logarithmic functions and indices

Lecture Solution of a System of Linear Equation

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

Fachgebiet Rechnersysteme1. 1. Boolean Algebra. 1. Boolean Algebra. Verification Technology. Content. 1.1 Boolean algebra basics (recap)

2. VECTORS AND MATRICES IN 3 DIMENSIONS

ARITHMETIC OPERATIONS. The real numbers have the following properties: a b c ab ac

Polynomials and Division Theory

UNIT 5 QUADRATIC FUNCTIONS Lesson 3: Creating Quadratic Equations in Two or More Variables Instruction

Things to Memorize: A Partial List. January 27, 2017

Lecture 3: Equivalence Relations

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics

Jim Lambers MAT 169 Fall Semester Lecture 4 Notes

Homework Solution - Set 5 Due: Friday 10/03/08

Lecture 08: Feb. 08, 2019

4 VECTORS. 4.0 Introduction. Objectives. Activity 1

Reasoning and programming. Lecture 5: Invariants and Logic. Boolean expressions. Reasoning. Examples

MATHEMATICS AND STATISTICS 1.2

Homework 3 Solutions

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Bases for Vector Spaces

Review of Gaussian Quadrature method

Introduction To Matrices MCV 4UI Assignment #1

8. Complex Numbers. We can combine the real numbers with this new imaginary number to form the complex numbers.

Mathematics Number: Logarithms

Introduction to Group Theory

First Midterm Examination

September 13 Homework Solutions

1 2 : 4 5. Why Digital Systems? Lesson 1: Introduction to Digital Logic Design. Numbering systems. Sample Problems 1 5 min. Lesson 1-b: Logic Gates

Lecture 7 notes Nodal Analysis

Convert the NFA into DFA

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Good Review book ( ) ( ) ( )

Unit 4. Combinational Circuits

HW3, Math 307. CSUF. Spring 2007.

Geometric Sequences. Geometric Sequence a sequence whose consecutive terms have a common ratio.

Chapter 3 Single Random Variables and Probability Distributions (Part 2)

DATABASE DESIGN I - 1DL300

set is not closed under matrix [ multiplication, ] and does not form a group.

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

Math 017. Materials With Exercises

Lesson 1: Quadratic Equations

Math 259 Winter Solutions to Homework #9

Math 154B Elementary Algebra-2 nd Half Spring 2015

A-Level Mathematics Transition Task (compulsory for all maths students and all further maths student)

Minimal DFA. minimal DFA for L starting from any other

Exercises with (Some) Solutions

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Handout: Natural deduction for first order logic

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

M A T H F A L L CORRECTION. Algebra I 2 1 / 0 9 / U N I V E R S I T Y O F T O R O N T O

Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Transcription:

5/9/ Comintionl Logic ENGG05 st Semester, 0 Dr. Hyden So Representtions of Logic Functions Recll tht ny complex logic function cn e expressed in wys: Truth Tle, Boolen Expression, Schemtics Only Truth Tle representtion is unique We cn convert representtion from one form to the other Truth Tle Deprtment of Electricl nd Electronic Engineering Schemtics Boolen Expression st semester, 0 Schemtics à Boolen Expression Strt from the inputs, deduce the Boolen expression of ech intermedite nodes until the output is otined. The fct tht the AND opertion (AB) is performed efore the OR opertion (C) is cptured implicitly y the precedence of Boolen lger A redundnt, ut still correct expression: x = (AB)C Precedence Determines the order of evlution of Boolen expression Order: A r over n expression cn e viewed s one with (), therefore, () tke precedence E.g. Opertion Precedence ( ) Highest NOT AND OR Lowest = ( ) ( ) first, then inverse st semester, 0 st semester, 0 Schemtics à Boolen Expression Similr conversion, using ()s to show precedence of the OR opertion Quick Quiz Wht is the output expression of the following logic-circuit digrm? Whenever n INVERTER is present in logic-circuit digrm, its output expression is simply equl to the input expression with r over it. x = ( A D) x= D x= D x = ( A D) st semester, 0 5 st semester, 0 6

5/9/ Boolen Expression à Schemtics Strt with the inputs, convert ech Boolen opertion into the corresponding gte, oeying the precedence of opertion E.g. Implement the expression s circuit: c c y = c c c c c c y Truth Tle à Boolen Exp List ll comintions tht give t output Ech row contriutes to minterm Sum up ll terms Sum of products (SOP) x = st semester, 0 7 st semester, 0 8 Cnonicl Form Boolen expression cn e expressed in mny different wys (A D)(B C) AB AC BD CD Two stndrd wys of orgnizing the terms: Sum of Product Product of Sum A cnonicl form puts rules to llows unique representtion of Boolen expression E.g. sort the minterms ccording to order of input signl (write AB, not BA) Cnonicl SOP Boolen expression expressed s sum of product of sic inputs Bsic input my optionlly negted Product Sum E.g. A B(C D) is not NOT cnonicl: No prentheses Very nturl for humn AB C BD AD 9st semester, 0 0 st semester, 0 Cnonicl POS Boolen expression expressed s product of sum of sic inputs Bsic input my optionlly negted (A B C)(B D )(A D) Product Sum E.g. This is not in cnonicl POS form: A B(C D) Not too nturl for humn, ut eqully good for computers. SOP or POS? SOP Wht out? S = A ( B C)( B C) ( A B C) ( A B C) ( A B C) ( A B C) A B C S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B C S 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st semester, 0 st semester, 0

5/9/ Exmple: This exmple illustrte the complete procedure for designing logic circuit. Suppose the logic circuit hving inputs, A, B, C will hve its output HIGH only when mjority of the inputs re HIGH. Step Set up the truth tle Step Write the AND term for ech cse where the output is. Step Write the SOP form the output x= Step Simplify the output expression x= = BC( A A) AC( B B) AB( C C) = BC AC AB A B C x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Exmple: Conversion through the opposite direction: Step Strt from the circuit Step Otin Boolen expression from the circuit (in SOP form) y = AC BC Schemtics A B C y 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Step 5 Implement the circuit Step Write the truth tle st semester, 0 y Truth Tle Boolen Expression Axioms of Boolen Alger Tle. Axioms of Boolen lger Axiom Dul Nme A B 0 if B A B if B 0 Binry field A 0 A 0 NOT A 0 0 0 A AND/OR A A 0 0 0 AND/OR A5 0 0 0 A5 0 0 AND/OR BOOLEAN ALGEBRA The very sis of Boolen lger Cnnot e proven, ssumed true Note the Dul of the Axiom Replce with, replce with 0, nd the xiom still holds true st semester, 0 5 st Tle semester, from DDCA 0 p.57 6 Theorems of one vrile Tle. Boolen theorems of one vrile Theorem Dul Nme T B B T B 0 B Identity T B 0 0 T B Null Element T B B B T B B B Idempotency T B = B Involution T5 B B 0 T5 B B Complements Theorems of multiple vriles Tle. Boolen theorems of severl vriles Theorem Dul Nme B C T6 B C C B Commuttivity T6 C B T7 (B C) D B (C D) T7 (B C) D B (C D) Associtivity T8 (B C) (B D) B (C D) T8 (B C) (B D) B (C D) Distriutivity T9 B (B C) B T9 B (B C) B Covering T0 (B C) (B C) B T0 (B C) (B C) B Comining T (B C) (B D) (C D) T (B C) (B D) (C D) Consensus B C B D (B C) (B D) T B 0 B B... T B 0 B B... De Morgn s (B 0 B B...) (B 0 B B ) Theorem st semester, 0 7 st semester, 0 8

5/9/ Exmple Simplify the following Boolen expression: y = ABD ABD y = AB( D D) y distriutive lw = AB y rule 6 = AB y rule Quick Quiz Simplify the following Boolen expression: AB A AB B z = ( A B) ( A B) z = AA AB BA BB y distriutive lw = 0 AB BA B y rule 8 nd rule 7 = AB BA B y rule = BA ( A ) y distriutive lw = B y rule 6 nd rule = B y rule st semester, 0 9 st semester, 0 0 DeMorgn s Theorems Theorem x y = x y Theorem x y = x y Rememer: Brek the r, chnge the opertor DeMorgn's theorem is very useful in digitl circuit design It llows ANDs to e exchnged with ORs y using invertors DeMorgn's Theorem cn e extended to ny numer of vriles. E.g, for three vriles x, y nd z x y z= x y z x y z= x y z Quick Quiz () Simplify ( AB C) AC BC AC BC AC BC AC BC Simplify AC BD AC BD AC BD AC BD ( A C) ( B D) st semester, 0 st semester, 0 Quick Quiz () Simplify AB CD EF DEF Determine the output expression for the elow circuit nd simplify it using DeMorgn s Theorem A B C A B C st semester, 0 AB CD EF AB CD EF AB CD EF Exmples (Summry): ) ( AB C) = AB C = ( A B) C = AC BC ) ( A C) ( B D) = ( A C) ( B D) = A C B D= AC BD c) A B C= A ( B C) = A ( B C) = A( B C) d) ( A BC) ( D EF) = ( A BC) ( D EF) = ( A BC) ( D EF) = A ( B C) D ( E F) = AB AC DE DF e) AB CD EF = AB CD EF = AB CD EF f ) Determine the output expression for the elow circuit nd simplify it using DeMorgn s Theorem 5

5/9/ Bule Pushing in Schemtics x y = x y Usully redrwn in this wy x y = x y DeMorgn s Theorem llows us to push ules cross gtes to eliminte unnecessry inversions in signls Usully redrwn in this wy SIMPLIFYING LOGIC CIRCUITS 7 st semester, 0 st semester, 0 8 Simplifying Logic Circuits Once the expression for logic circuit is otined, we my try to simplify it, so tht the implementtion requires fewer gtes Exmple: elow two circuits re the sme, ut the second one is much more simpler Minimiztion y Alger Mke use of reltionships nd theorems of Boolen lger to simplify the expressions this method relies on your lgeric skill E.g. To simplify z= AB ( AC) Two methods for simplifying Algeric method (use Boolen lger theorems) Krnugh mpping method (systemtic, step-y-step pproch) 9 st semester, 0 z = AB ( A C) [y DeMorgn thm] = AB ( A C) [cncel doule inverions] = ABA = AB [multiply out] [ A A = A] = AC( B B) AB = AC AB [ B B = ] = AC ( B) st semester, 0 0 Minimiztion y Krnugh Mps Wht is Krnugh mp? Krnugh mp (K mp) is grphicl tool used to simplify logic eqution or to convert truth tle to its corresponding logic circuit With simple nd orderly process, the resulting logic expression will e in its simplest SOP form!!! K mp formt: Vrile K mp: A\BC 00 0 0 0 A grid of squres Ech squre represents one product term eg: top-left represents A B C, ottom-right represents A B C The vriles re ordered ccording to Gry code only one vrile chnges etween djcent squres Squres on edges re considered djcent to squres on opposite edges Vrile K mp AB\CD 00 0 0 00 0??? 0 The squre mrked? represents A B C D The squre mrked?? represents A B C D Note tht they differ in only the C vrile. Krnugh mps ecome clumsier to use with more thn vriles Generl procedure for using K mp:. Fill out the K mp for given Boolen expression. Simplify the expression y properly comining those squres in the K mp tht contins s. This process is clled looping st semester, 0 st semester, 0 5

5/9/ Filling out Krnugh Mp Given n initil (unsimplified) logic Boolen expression Write the expression in SOP form For ech product term, write in ll the squres which re included in the term, 0 elsewhere All vriles present in the product term: one squre One vrile missing: two djcent squres Two terms missing: djcent squres Exmple : X = Exmple : X = BC AC Exmple : X = B A A\BC 00 0 0 0 0 0 0 0 A\BC 00 0 0 0 0 0 0 A\BC 00 0 0 0 0 st semester, 0 5 st semester, 0 Looping Minimiztion is done y spotting ptterns of 's nd 0's Pirs of djcent 's (Looping groups of two) rememer tht djcent squres differ y only one vrile hence the comintion of djcent squres hs the form P ( A A) this cn e simplified (from efore) to just P Exmple (continue) X = A\BC 00 0 0 0 0 0 0 0 -- the djcent squres A B C nd differ only in A -- hence they cn e comined into just BC, indicted y the lue loop -- looping cn lso e done y grouping nd A B C to give AC, s indicted y the red loop -- furthermore, looping cn lso e done y grouping A B C nd to give AB, s indicted y the yellow loop -- The simplified Boolen eqution is one tht sums ll the terms corresponding to ech of the group: X = AC BC AB More exmples on looping of two Looping group of four (quds) A K mp my contin group of four s tht re djcent to ech other. This group is clled qud Looping qud of djcent s elimintes the two vriles tht pper in oth complemented nd uncomplemented form Exmples: 6 st semester, 0 7 st semester, 0 Looping group of eight (Octets) A group of eight s tht re djcent to one nother is clled n octet Looping n octet of djcent s elimintes the three vriles tht pper in oth complemented nd uncomplemented form Exmples: Complete Simplifiction Process. Construct the K mp nd plce s nd 0s in the squres ccording to the truth tle.. Group the isolted s which re not djcent to ny other s. (single loops). Group ny pir which contins djcent to only one other. (doule loops). Group ny octet even if it contins one or more s tht hve lredy een grouped. 5. Group ny qud tht contins one or more s tht hve not lredy een grouped, mking sure to use the minimum numer of groups. 6. Group ny pirs necessry to include ny s tht hve not yet een grouped, mking sure to use the minimum numer of groups. 7. Form the OR sum of ll the terms generted y ech group. 8 st semester, 0 9 st semester, 0 6

5/9/ Exmples: AB\CD 00 0 0 00 0 0 0 0 0 0 0 0 0 0 0 AB\CD 00 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 Quiz AB\CD 00 0 0 AB\CD 00 0 0 00 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Step. Isolted : None Step. Adjcent to only one : None Step. Octet: None Step5. Qud: Blue nd red loops Step6. All s hve een looped => skip this step Step. Isolted : None Step. Adjcent to only one : red loop Step. Octet: None Step5. Qud: Green loops Step6. All s hve een looped => skip this step AB CD BD D ACD BD D ACD BD D D BD D ACD BD ACD ACD ACD ACD BD ACD ACD ACD ACD BD 0 st semester, 0 st semester, 0 More exmples S. Isolted : loop S. Adjcent to only one : loop,5 S. Octet: None S5. Qud: loop 6,7,0, S6. All s hve een looped => skip S. Isolted : None S. Adjcent to only one : loop,7 S. Octet: None S5. Qud: loop 5,6,9,0 nd loop 5,6,7,8 S6. All s hve een looped => skip S. Isolted : None S. Adjcent to only one : loop,6, loop 7,8, loop,5 nd loop 9,0 S-S6. All s hve een looped => skip Putting It Together -BIT ADDER st semester, 0 st semester, 0 Binry Numers Represents numers in se E.g.: 0 = 0 Almost ll computers tody utilize inry representtion of numers internlly Deciml Binry 0 0 0 00 5 0 6 0 7 8 000 9 00 0 00 0 00 From Binry to Deciml Note tht the vlue of inry numer is given y: i i i= 0 where i is the digitl t position i, strting counting from zero from the fr right. Converting from inry to deciml cn e done y dding the power-of- where there is st semester, 0 st semester, 0 5 7

5/9/ Exmple Convert the inry numer 00 into deciml representtion 5 0 0 0 = 0 0 0 = 0 =6 8 = 5 From Deciml to Binry Cn e found using short division : Successively divide the dividend y The reminders form the resulting inry numer when counted from the ottom Exmple: Converts 9 0 into inry 9 9 0 0 è 9 0 = 00 st semester, 0 6 st semester, 0 7 Positive Integers Non-negtive inry numers (0,,,, ) cn e represented nturlly with itstrings tht corresponds to their inry representtion Represents eqully spced integers on the numer line Sometimes clled unsigned integer 00000000 0000000 0000000 000000 0000000 000000 000000 0 5 6 7 8 Vlue Binry Bitstring (8- it) 0 0 00000000 0000000 0 0000000 000000 00 0000000 5 0 000000 6 0 000000 7 00000 8 000 0000000 9 00 000000 0 00 000000 0 00000 00000 st semester, 0 8 Positive Integers With itstring of width n, the following properties hold: min vlue : 0 mx vlue : n The vlue of istring { n n 0 } cn e clculted s: n i i E.g. The vlue of i= 0 0 = 0 =6 = st semester, 0 9 Positive Integers Addition Two ve integers cn e dded similr to the wy deciml numers re dded in long ddition Hlf Adder Bsic ddition of -it vlues Generte crry out to the next it if the result is 9 0 0 0 0 0 0 co s 0 0 0 0 0 0 0 0 0 s = co = How do we implement inry ddition in hrdwre? 0 0 0 0 0 0 st semester, 0 50 st semester, 0 5 8

5/9/ Full Adder The susequent its need to e slightly smrter thn hlf dder There my e crry input from the it to the right A -input function (,, ci) ci co s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 st semester, 0 0 0 0 s = ci co = ci ( ) 0 0 0 0 0 0 5 Multi-it Adder Both HA nd FA cn dd it only A hlf-dder is simply full-dder with the crry input tied to 0 To mke multi-it dder, we cn connect the crry output from one FA to the crry input of nother one Strt from lest significnt it (usully rightmost it) nd propgte the crry to the left (the most significnt it) Mimic the ction of long ddition 0 0 0 st semester, 0 5 0 0 0 Multi-it Adder <> <> <> <> <> <> <0> <0> Crry out co FA s ci co FA s ci co FA s ci co FA s ci 0 s<> s<> s<> s<0> Note: the <> nottion is shorthnd to denote it within multi-it signl. Other common nottion: (0), [0], 0, etc Engineer sometimes cll multi-it signl us, or signl us. st semester, 0 5 9