1 Binary storage & registers. CS 151 Binary Variables Recall that the two binary values have different names: –True/False –On/Off –Yes/No –1/0 We use.

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Chapter 2 Logic Circuits.
ECE 331 – Digital System Design
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
Overview Part 1 – Gate Circuits and Boolean Equations
CS 151 Digital Systems Design Lecture 6 More Boolean Algebra A B.
Boolean Algebra and Logic Gates
EE365 Adv. Digital Circuit Design Clarkson University Lecture #2 Boolean Laws and Methods.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Edited by Dr. Muhamed Mudawar for COE 202 & EE 200 at KFUPM) Boolean Algebra and Logic Gates.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra. Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic.
طراحی مدارهای منطقی نیمسال دوم دانشگاه آزاد اسلامی واحد پرند.
Gate Circuits and Boolean Equations BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Logic Design CS221 1 st Term Boolean Algebra Cairo University Faculty of Computers and Information.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
Binary Logic and Gates Binary variables take on one of two values.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
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.
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
CSE-221 Digital Logic Design (DLD) Lecture-4: Basic theorems and properties of Boolean algebra,Boolean functions.
Chapter 2: Boolean Algebra and Logic Gates. F 1 = XY’ + X’Z XYZX’Y’XY’X’ZF1F
Switching Theory and Logic Design
Overview Part 1 – Gate Circuits and Boolean Equations
LOGIC GATES & BOOLEAN ALGEBRA
Venn Diagram – the visual aid in verifying theorems and properties 1 E.
Boolean Algebra and Logic Gates
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
Chap 2. Combinational Logic Circuits
ENGIN112 L6: More Boolean Algebra September 15, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 6 More Boolean Algebra A B.
A. Abhari CPS2131 Chapter 2: Boolean Algebra and Logic Gates Topics in this Chapter: Boolean Algebra Boolean Functions Boolean Function Simplification.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and Gates.
Module 5.  In Module 3, you have learned the concept of Boolean Algebra which consists of binary variables and binary operator.  A binary variable x,
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 1.
ECE DIGITAL LOGIC LECTURE 8: BOOLEAN FUNCTIONS Assistant Prof. Fareena Saqib Florida Institute of Technology Spring 2016, 02/11/2016.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
Lecture 5 More Boolean Algebra A B. Overview °Expressing Boolean functions °Relationships between algebraic equations, symbols, and truth tables °Simplification.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. De Morgan’s Theorem De Morgan’s Theorem.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
CHAPTER 2 Boolean algebra and Logic gates
ECE 301 – Digital Electronics
De Morgan’s Theorem,.
Overview Part 1 – Gate Circuits and Boolean Equations
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
Gate Circuits and Boolean Equations
Overview Part 1 – Gate Circuits and Boolean Equations
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
Give qualifications of instructors: DAP
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
Boolean Algebra.
فصل دوم جبر بول.
Boolean Algebra.
Chapter 2 Boolean Algebra and Logic Gate
Functions Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways: We can represent.
From now on: Combinatorial Circuits:
Digital Logic Chapter-2
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

1 Binary storage & registers

CS 151 Binary Variables Recall that the two binary values have different names: –True/False –On/Off –Yes/No –1/0 We use 1 and 0 to denote the two values. Variable identifier examples: –A, B, y, z, or X 1 for now –RESET, START_IT, or ADD1 later

CS 151 Logical Operations The three basic logical operations are: –AND –OR –NOT AND is denoted by a dot (·). OR is denoted by a plus (+). NOT is denoted by an overbar ( ¯ ), a single quote mark (') after, or (~) before the variable.

CS 151 Examples: – is read “Y is equal to A AND B.” – is read “z is equal to x OR y.” – Notation Examples  Note: The statement: = 2 (read “one plus one equals two”) is not the same as = 1 (read “1 or 1 equals 1”).  BAY  yxz   AX  is read “X is equal to NOT A.”

CS 151 Operator Definitions  Operations are defined on the values "0" and "1" for each operator: AND 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 OR = = = = 1 NOT 10  01 

منطق دو دويي

CS X NOT XZ  Truth Tables Truth table  a tabular listing of the values of a function for all possible combinations of values on its arguments Example: Truth tables for the basic logic operations: Z = X·Y YX AND OR XYZ = X+Y

گيتهاي منطقي معادل

CS 151 Using Switches –For inputs: logic 1 is switch closed logic 0 is switch open –For outputs: logic 1 is light on logic 0 is light off. NOT uses a switch such that: logic 1 is switch open logic 0 is switch closed Logic Function Implementation Switches in series => AND Switches in parallel => OR C Normally-closed switch => NOT

اصول جبر بول If a & b K a.b K a+b K اصول اساسی : اصل 1: تعریف : برای هر و که متعلق به مجموعه ی هستند، و نیز به مجموعه ی تعلق دارند. ( ، و ، نامیده می شود ). ab a.b a+b And a.bOr a+b k k

x + 0 = x اصول جبر بول اصل 2: موجودیت عناصر 0 و 1: x. 1 = x x x + 0 x

اصول جبر بول (3) اصل 3: خاصیت عناصر + و. : x + y = y + x x. y = y. x xy x.yy.xx+yy+x

x.(y + z) = x. y + x. z خاصیت توزیع پذیری + بر. و. بر +: x +(y. z) = (x + y). (x + z) اصول جبر بول

xyzy.zx+y.zx+yx+z(x+y)(x+z) آزمون درستی توزیع پذیری + بر. و. بر + (2) =

Postulates and Theorems of Boolean Algebra Postulate 2(a) x+0= x (b) x. 1 = x Postulate 5(a) x + x = 1 (b) x. x = 0 Theorem 1(a) x + x = x (b) x. x = x Theorem 2(a) x + 1 = 1 (b) x. 0 = 0 Theorem 3, involution(x ) = x Postulate 3, commutative(a) x+y = y+x (b) xy =yx Theorem 4, associative(a) x +(y+z) = (x+y)+z (b) x(yz)=(xy)z Postulate 4, distributive(a) x(y+z) = xy+xz (b) x+yz =(x+y)(x+z) Theorem 5, DeMorgen(a) (x +y) = xy (b) (xy) =x+y Theorem 6, absorption(a) x+xy =x(b) x(x+y)=x

نحوه نمايش توابع بولي بصورت تركيبي از عبارات و متغيرهاي بولي. جدول صحت مداري متشكل از گيتهاي منطقي

CS Logic Diagrams and Expressions Boolean equations, truth tables and logic diagrams describe the same function! Truth tables are unique; expressions and logic diagrams are not. This gives flexibility in implementing functions. X Y F Z Logic Diagram Equation ZY X F  Truth Table X Y Z Z Y X F    Y Y Z X + Y Z

CS Boolean Operator Precedence  The order of evaluation in a Boolean expression is: 1.Parentheses 2.NOT 3.AND 4.OR  Consequence: Parentheses appear around OR expressions  Example: F = A(B + C)(C + D)

BME 231 DIGITAL DESIGN22

BME 231 DIGITAL DESIGN23

BME 231 DIGITAL DESIGN24

BME 231 DIGITAL DESIGN25

BME 231 DIGITAL DESIGN26

BME 231 DIGITAL DESIGN27

BME 231 DIGITAL DESIGN28

BME 231 DIGITAL DESIGN29

CS Boolean Function Evaluation z x yx F4 x z yx zyx F3 x F2 xy F1     z yz  y  Kindly view notes page for answer

BME 231 DIGITAL DESIGN31 Boolean Functions Boolean algebra deals with binary variables and logic operations. Function results in binary 0 or 1 x x y y z z F F F = x(y+z’) x y z z’ y+z’ F = x(y+z’)

BME 231 DIGITAL DESIGN32 Boolean Functions Boolean algebra deals with binary variables and logic operations. Function results in binary 0 or 1 x x y y z z xy 0 1 x y z G = xy +yz yz xy We will learn how to transition between equation, symbols, and truth table. yz G G

CS Which Design is simpler? Expression Simplification F= XYZ + XYZ + XZ = XY(Z + Z) + XZ = XY. 1 + XZ = XY + XZ

CS Algebraic Manipulation XYZXZXYZ XZXYXYZ+XYZ+XZXY+XZ All possible combinations of 3 variables Intermediate Results (Terms in Function) F1F2

CS Algebraic Manipulation How can we reduce Boolean expression in order to simplify circuits? –Computer programs –Manual method (cut-and-try procedures) Examples: 1.X + XY = X(1 + Y) = X 2.XY + XY = X(Y + Y) = X 3.X + XY = (X+X)(X+Y) = X+Y 4.X(X+Y) = X + XY = X 5.(X+Y)(X+Y) = X + YY = X 6.X (X+Y) = XX + XY = XY Dual of equations 1,2,3

قوانین دمرگان ( 1) (x.y)’=x’+y’ (x+y)’=x’.y’ این قانون می تواند به صورت زیر تعمیم پیدا کند : (x.y.....t)’=x’+y’+...+t’ (x+y+...+t)’=x’.y’.....t’

(duality) دوگان 01 duality AndOr duality مثال: x+y’z x.(y’+z) دوگان

نحوه نمايش توابع بولي توابع بولي را مي‌توان به چند طريق نمايش داد: بصورت تركيبي نامرتب از عبارات و متغيرهاي بولي. بصورت مجموع جملات مي‌نيمم بصورت حاصلضرب جملات ماكزيمم چند جمله ‌ اي مي ‌ نيمم : يك عبارت حاصلضرب است كه همة متغيرها يا مكمل آنها حتماً وجود دارد.

مثال : جدول درستي را براي تابع f(A,B,C) = AB + A΄C + AC΄ بدست آوريد.

BME 231 DIGITAL DESIGN40 Minterms, Maxterms and Canonical Forms Each variable in a Boolean expression is a literal Boolean variables can appear in normal (x) or complement form (x’) Each AND combination of terms is a minterm Each OR combination of terms is a maxterm Minterms x y z Minterm x’y’z’ m x’y’z m 1 … xy’z’ m 4 … xyz m 7 Maxterms x y z Maxterm x+y+z M x+y+z’ M 1 … x’+y+z M 4 … x’+y’+z’ M 7

) (1) POS)) و ماکسترم ها SOP) مینترم xyzx+y+z Minterm Maxterm x’.y’.z’ m 0 x+y+z M x’.y’.z m 1 x+y+z’ M x’.y.z’ m 2 x+y’+z M x’.y.z m 3 x+y’+z’ M x.y’.z’ m 4 x’+y+z M x.y’.z m 5 x’+y+z’ M x.y.z’ m 6 x’+y’+z M x.y.z m 7 x’+y’+z’ M 7

) (2) POS)) و ماکسترم ها SOP) مینترم مثال: تابع زیر را به صورت مینترمی بنویسید. xyF F (x, y) = x. y 1. رسم جدول درستی 2. تعیین مینترم ها F (x, y) = F(2)

BME 231 DIGITAL DESIGN43 Representing Functions with Minterms Minterm number same as row position in truth table (starting from top from 0) Shorthand way to represent functions x x y y z z F F F = xyz + xyz’ + x’yz F = m 7 + m 6 + m 3 = Σ(3, 6, 7)

BME 231 DIGITAL DESIGN44 Truth Table to Expression Converting a truth table to an expression –Each row with output of 1 becomes a product term –Sum product terms together. x x y y z z F F xyz + xyz’ + x’yz Any Boolean Expression can be represented in sum of products form!

BME 231 DIGITAL DESIGN45 Equivalent Representations of Circuits All three formats are equivalent Number of 1’s in truth table output column equals AND terms for Sum-of-Products (SOP) x y z x x y y z z F F F = xyz + xyz’ + x’yz F x x x x x x x x x

BME 231 DIGITAL DESIGN46 Reduced Hardware Implementation Reduced equation requires less hardware! Same function implemented! x y z x x y y z z F F F = xyz + xyz’ + x’yz = xy + yz F x x x x

BME 231 DIGITAL DESIGN47 Conversion Between Canonical Forms Easy to convert between minterm and maxterm representations For maxterm representation, select rows with 0’s x x y y z z F F F = xyz + xyz’ + x’yz F = m 7 + m 6 + m 3 = Σ(3, 6, 7) F = M 0 M 1 M 2 M 4 M 5 = Π(0,1,2,4,5) F = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)

نحوه نمايش توابع بولي توابع بولي را مي‌توان به چند طريق نمايش داد: بصورت تركيبي نامرتب از عبارات و متغيرهاي بولي. بصورت مجموع جملات مي‌نيمم بصورت حاصلضرب جملات ماكزيمم چند جمله ‌ اي مي ‌ نيمم : يك عبارت حاصلضرب است كه همة متغيرها يا مكمل آنها حتماً وجود دارد.

تبديل بين شكلهاي متعارف هرگاه يك تابع بولي بر حسب مجموع جملات مي‌نيمم نوشته شده باشد ، مكمل آن برابر است با حاصلجمع جملات مينيممي كه از تابع اصلي حذف شده اند. بطور مشابه مي توان هر تابع بصورت مجموع جملات مي‌نيمم را بصورت حاصلضرب جملات ماكزيممي نوشت كه شماره هاي متناظر آن از جملات مينيمم، از تابع اصلي حذف شده‌اند. مثال : f 1 (A,B,C) =  m (2,3,6,7) = f 2 (A,B,C) =  M(0,1,4,5)

روش ديگر مي توان براي يافتن حاصلضرب جملات ماكزيمم از مجموع جملات مي نيمم نيز استفاده كرد. مثال : تابع زير را بصورت حاصلضرب جملات ماكزيمم نمايش دهيد: f(A,B,C) = AB + AC΄ + A΄C حل : در مثال قبل اين تابع بولي را به صورت مجموع جملات مي‌نيمم نمايش داديم: f(A,B,C )=  m(1, 3, 4, 6, 7) بنابراين مي توان نوشت: f(A,B,C ) )=  m(1, 3, 4, 6, 7)==П(0,2,4)