מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1#

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Presented by: Ms. Maria Estrellita D. Hechanova, ECE
CSE 20 Lecture 9 Boolean Algebra: Theorems and Proofs CK Cheng April 26, 2011 Lecture notes 1.
ECE 2110: Introduction to Digital Systems Combinational Logic Design Principles.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Boolean Algebra cont’ The digital abstraction Graphs and Topological Sort מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 -Part 2.
1 Section 10.1 Boolean Functions. 2 Computers & Boolean Algebra Circuits in computers have inputs whose values are either 0 or 1 Mathematician George.
CSE-221 Digital Logic Design (DLD)
1 CSE 20: Lecture 8 Boolean Postulates and Theorems CK Cheng 4/26/2011.
Boolean Algebra cont’ The digital abstraction מבנה המחשב + מבוא למחשבים ספרתיים תרגול 2#
Lattice and Boolean Algebra
1 CSE 20: Lecture 7 Boolean Algebra CK Cheng 4/21/2011.
Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.
Fall 2002CMSC Discrete Structures1 Yes, No, Maybe... Boolean Algebra.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Chapter 2: Boolean Algebra and Logic Functions
Boolean Algebra أ. زينب آل كاظم 1. Boolean Functions In Boolean algebra we work with the set {0,1}, where: 0 ≡ F (False) & 1 ≡ T (True). The 3 Operations.
Boolean Functions.
Section Section Summary Introduction to Boolean Algebra Boolean Expressions and Boolean Functions Identities of Boolean Algebra Duality The Abstract.
Boolean Algebra Computer Organization 1 © McQuain Boolean Algebra A Boolean algebra is a set B of values together with: -two binary operations,
CHAPTER 2 Boolean Algebra
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
Module 4.  Boolean Algebra is used to simplify the design of digital logic circuits.  The design simplification are based on: Postulates of Boolean.
CompSci 102 Discrete Math for Computer Science
1 Boolean Algebra  Digital circuits Digital circuits  Boolean Algebra Boolean Algebra  Two-Valued Boolean Algebra Two-Valued Boolean Algebra  Boolean.
Boolean Algebras Lecture 27 Section 5.3 Wed, Mar 7, 2007.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Logic Circuits Lecture 3 By Amr Al-Awamry. Basic Definitions Binary Operators  AND z = x y = x yz=1 if x=1 AND y=1  OR z = x + y z=1 if x=1 OR y=1 
Boolean Algebra M. AL- Towaileb1. Boolean Functions In Boolean algebra we work with the set {0,1}, where: 0 ≡ F (False) & 1 ≡ T (True). The 3 Operations.
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
ELEC Digital Logic Circuits Fall 2015 Boolean Algebra (Chapter 2) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/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).
Boolean Algebras Lecture 24 Section 5.3 Wed, Mar 22, 2006.
CSE 461. Binary Logic Binary logic consists of binary variables and logical operations. Variables are designated by letters such as A, B, C, x, y, z etc.
Boolean Algebra.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
CHAPTER 2 Boolean algebra and Logic gates
Boolean Algebra How gates get picked. Boolean Arithmetic Boolean ≠ Binary – Boolean – 1/0 only, no places Boolean addition:
Hoda Roodaki Boolean Algebra Hoda Roodaki
Chapter 2: Boolean Algebra and Logic Functions
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2 Instructor: Andrew B. Kahng (lecture)
Logic Gates and Boolean Algebra
Gate Circuits and Boolean Equations
CHAPTER 2 Boolean Algebra
… and now for the Final Topic:
CHAPTER 2 Boolean Algebra This chapter in the book includes:
Boolean Algebra A Boolean algebra is a set B of values together with:
Boolean Algebra A Boolean algebra is a set B of values together with:
ECE/CS 352 Digital Systems Fundamentals
Lecture 3: Boolean Algebra
Boolean Algebra.
Boolean Algebra.
CMSC Discrete Structures
CSE 370 – Winter Combinational Logic - 1
Boolean Algebra L Al-zaid Math1101.
Yes, No, Maybe... BooleanAlgebra 12/10/2018.
Boolean Algebra Introduction CSCI 240
COMS 361 Computer Organization
CSE 20: Lecture 8 Boolean Postulates and Theorems CK Cheng
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
BOOLEAN ALGEBRA.
CMSC Discrete Structures
Presentation transcript:

מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1# מבנה המחשב + מבוא למחשבים ספרתיים תרגול 1# Boolean Algebra Reference: Introduction to Digital Systems Miloš Ercegovac, Tomás Lang, Jaime H. Moreno Pages: 480-487

A Boolean Algebra is a 3-tuple {B , + , · }, where “plus” / ”OR” “times” / ”AND” A Boolean Algebra is a 3-tuple {B , + , · }, where B is a set of at least 2 elements ( + ) and ( · ) are binary operations (i.e. functions ) satisfying the following axioms: A1. Commutative laws: For every a, b  B a + b = b + a a · b = b · a A2. Distributive laws: For every a, b, c  B a + (b · c) = (a+ b) ·(a + c) a · (b + c) = (a · b) + (a · c)

Precedence ordering: · before + A3. Existence of identity elements: The set B has two distinct identity elements, denoted as 0 and 1, such that for every element a  B a + 0 = 0 + a = a a · 1 = 1 · a = a multiplicative identity element additive identity element A4. Existence of a complement: For every element a  B there exists an element a’ such that a + a’ = 1 a · a’ = 0 the complement of a Precedence ordering: · before + For example: a + (b · c) = a + bc

Switching Algebra B = { 0 , 1 } 1 AND 1 OR AND 1 OR Theorem 1: The switching algebra is a Boolean algebra.

Proof: By satisfying the axioms of Boolean algebra: B is a set of at least two elements B = {0 , 1} , 0 ≠ 1 and |B| ≥ 2. Closure of (+) and (·) over B (functions ) . AND 1 OR 1 1 1 1 1 1 1 closure

A1. Cummutativity of ( + ) and ( · ). 1 AND 1 OR AND 1 OR Symmetric about the main diagonal A2. Distributivity of ( + ) and ( · ). (a + b )(a + c) a + bc abc 000 001 010 1 011 100 101 110 111 ab + ac a(b + c) abc 000 001 010 011 100 1 101 110 111

* Alternative proof of the distributive laws: Claim: (follow directly from operators table) AND( 0 , x ) = 0 AND( 1 , x ) = x OR( 1 , x ) = 1 OR( 0 , x ) = x Consider the distributive law of ( · ): AND( a , OR( b , c ) ) = OR( AND( a , b ) , AND( a , c ) ) a = 0 : AND( 0 , OR( b , c ) ) = OR( AND( 0 , b ) , AND( 0 , c ) ) a = 1 : AND( 1 , OR( b , c ) ) = OR( AND( 1 , b ) , AND( 1 , c ) ) OR( b , c ) b c OR( b , c )

Consider the distributive law of ( + ): OR( a , AND( b , c ) ) = AND( OR( a , b ) , OR( a , c ) ) a = 0 : OR( 0 , AND( b , c ) ) = AND( OR( 0 , b ) , OR( 0 , c ) ) b c AND( b , c ) a = 1 : OR( 1 , AND( b , c ) ) = AND( OR( 1 , b ) , OR( 1 , c ) ) 1 Why have we done that?! For complex expressions truth tables are not an option.

A3. Existence of additive and multiplicative identity element. 0 + 1 = 1 + 0 = 1 0 – additive identity 0 · 1 = 1 · 0 = 0 1 – multiplicative identity A4. Existence of the complement. a · a’ a + a’ a’ a 1 All axioms are satisfied Switching algebra is Boolean algebra.

Theorems in Boolean Algebra Every element in B has a unique complement. Proof: Let a  B. Assume that a1’ and a2’ are both complements of a, (i.e. ai’ + a = 1 & ai’ · a = 0), we show that a1’ = a2’ . Identity a2’ is the complement of a distributivity commutativity a1’ is the complement of a Identity

We swap a1’ and a2’ to obtain, Complement uniqueness ’ can be considered as a unary operation called complementation

Boolean expression - Recursive definition: base: 0 , 1 , a  B – expressions. recursion step: Let E1 and E2 be Boolean expressions. Then, E1’ ( E1 + E2 ) ( E1 · E2 ) expressions Example: ( ( a’ + 0 ) · c ) + ( b + a )’ ) ( ( a’ + 0 ) · c ) ( b + a )’ ( a’ + 0 ) c ( b + a ) a’ b a a

Dual transformation - Recursive definition: Dual: expressions → expressions base: 0 → 1 1 → 0 a → a , a  B recursion step: Let E1 and E2 be Boolean expressions. Then, E1’ → [dual(E1)]’ ( E1 + E2 ) → [ dual(E1) · dual(E2) ] ( E1 · E2 ) → [ dual(E1) + dual(E2) ] Example: ( ( a + b ) + ( a’ · b’ ) ) · 1 ( ( a · b ) · ( a’ + b’ ) ) + 0

The axioms of Boolean algebra are in dual pairs. A1. Commutative laws: For every a, b  B a + b = b + a a · b = b · a A2. Distributive laws: For every a, b, c  B a + (b · c) = (a+ b) ·(a + c) a · (b + c) = (a · b) + (a · c) A3. Existence of identity elements: The set B has two distinct identity elements, denoted as 0 and 1, such that for every element a  B a + 0 = 0 + a = a a · 1 = 1 · a = a A4. Existence of a complement: For every element a  B there exists an element a’ such that a + a’ = 1 a · a’ = 0

Theorem 3: For every a  B: a + 1 = 1 a · 0 = 0 Proof: (1) Identity a’ is the complement of a distributivity Identity a’ is the complement of a

(2) we can do the same way: Identity a’ is the complement of a distributivity Identity a’ is the complement of a Note that: a · 0 , 0 are the dual of a + 1 , 1 respectively. The proof of (2) follows the same steps exactly as the proof of (1) with the same arguments, but applying the dual axiom in each step.

Correctness by the fact that each axiom has a dual axiom as shown Theorem 4: Principle of Duality Every algebraic identity deducible from the axioms of a Boolean algebra attains: Correctness by the fact that each axiom has a dual axiom as shown For example: ( a + b ) + a’ · b’ = 1 ( a · b ) · ( a’ + b’ ) = 0 Every theorem has its dual for “free”

The complement of the element 1 is 0, and vice versa: 0’ = 1 1’ = 0 Theorem 5: The complement of the element 1 is 0, and vice versa: 0’ = 1 1’ = 0 Proof: By Theorem 3, 0 + 1 = 1 and 0 · 1 = 0 By the uniqueness of the complement, the Theorem follows.

Theorem 6: Idempotent Law For every a  B a + a = a a · a = a Proof: (1) Identity a’ is the complement of a distributivity a’ is the complement of a Identity (2) duality.

Theorem 7: Involution Law For every a  B ( a’ )’ = a Proof: ( a’ )’ and a are both complements of a’. Uniqueness of the complement → ( a’ )’ = a. Theorem 8: Absorption Law For every pair of elements a , b  B, a + a · b = a a · ( a + b ) = a Proof: home assignment.

a’ is the complement of a Theorem 9: For every pair of elements a , b  B, a + a’ · b = a + b a · ( a’ + b ) = a·b Proof: (1) distributivity a’ is the complement of a Identity (2) duality.

Theorem 11: DeMorgan’s Law For every pair of elements a , b  B, In a Boolean algebra, each of the binary operations ( + ) and ( · ) is associative. That is, for every a , b , c  B, a + ( b + c ) = ( a + b ) + c a · ( b · c ) = ( a · b ) · c Proof: home assignment (hint: prove that both sides in (1) equal [ ( a + b ) + c ] · [ a + ( b + c ) ] .) Theorem 11: DeMorgan’s Law For every pair of elements a , b  B, ( a + b )’ = a’ · b’ ( a · b )’ = a’ + b’ Proof: home assignment.

Theorem 12: Generalized DeMorgan’s Law Let {a , b , … , c , d} be a set of elements in a Boolean algebra. Then, the following identities hold: (a + b + . . . + c + d)’ = a’ b’. . .c’ d’ (a · b · . . . · c · d)’ = a’ + b’ + . . . + c’ + d’

Proof: By induction. Induction basis: follows from DeMorgan’s Law ( a + b )’ = a’ · b’. Induction hypothesis: DeMorgan’s law is true for n elements. Induction step: show that it is true for n+1 elements. Let a , b , . . . , c be the n elements, and d be the (n+1)st element. Associativity DeMorgan’s Law Induction assumption

Can be substituted by complemented variables or expressions (formulas) The symbols a, b, c, . . . appearing in theorems and axioms are generic variables Can be substituted by complemented variables or expressions (formulas) For example: DeMorgan’s Law etc.

Other Examples of Boolean Algebras Algebra of Sets Consider a set S. B = all the subsets of S (denoted by P(S)). “plus”  set-union U “times”  set-intersection ∩ Additive identity element – empty set Ø Multiplicative identity element – the set S. P(S) has 2|S| elements, where |S | is the number of elements of S

Algebra of Logic (Propositional Calculus) Elements of B are T and F (true and false). “plus”  Logical OR “times”  Logical AND Additive identity element – F Multiplicative identity element – T