Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMS 361 Computer Organization

Similar presentations


Presentation on theme: "COMS 361 Computer Organization"— Presentation transcript:

1 COMS 361 Computer Organization
Title: Boolean Algebra Date: 11/02/2004 Lecture Number: 17

2 Announcements Homework 8 Due Thursday, 11/11/04

3 Review Representing numbers in binary Problems One’s complement
Unsigned (magnitude) Sign-magnitude One’s complement Two’s complement

4 Outline Representing numbers in binary Boolean Algebra Boolean Logic
Finish overflow Boolean Algebra Boolean Logic

5 Truth Table Provides a listing of every possible combination of inputs and corresponding outputs Example (2 inputs, 2 outputs):

6 Truth Table Example (3 inputs, 2 outputs):

7 Proof using Truth Table
Can use truth table to prove a Boolean expression Prove that: x . (y + z) = (x . y) + (x . z) (i) Construct truth table for LHS & RHS of above equality

8 Proof using Truth Table
(ii) Check that LHS = RHS Postulate is SATISFIED because output column 2 & 5 (for LHS & RHS expressions) are equal for all cases

9 Duality Duality Principle – every valid Boolean expression (equality) remains valid if the operators and identity elements are interchanged, as follows: +  . 1  0 Example: Given the expression a + (b.c) = (a+b).(a+c) then its dual expression is a . (b+c) = (a.b) + (a.c)

10 Duality Duality gives free theorems
“two for the price of one” You prove one theorem and the other comes for free! If (x+y+z)' = x'.y.'z' is valid, then its dual is also valid: (x.y.z)' = x'+y'+z’ If x + 1 = 1 is valid, then its dual is also valid: x . 0 = 0

11 Basic Theorems of Boolean Algebra
Apart from the axioms/postulates, there are other useful theorems. Idempotency (a) x + x = x (b) x . x = x Proof of (a): x + x = (x + x) (identity) = (x + x).(x + x') (complementarity) = x + x.x' (distributivity) = x (complementarity) = x (identity)

12 Basic Theorems of Boolean Algebra
Theorems can be proved using the truth table method. They can also be proved by algebraic manipulation using axioms/postulates or other basic theorems.

13 Basic Theorems of Boolean Algebra
absorption can be proved by: x + x.y = x.1 + x.y (identity) = x.(1 + y) (distributivity) = x.(y + 1) (commutativity) = x (Theorem 2a) = x (identity) By duality: x.(x+y) = x Try to prove other theorems by algebraic manipulation.

14 Boolean Functions Boolean function is an expression formed with binary variables, the two binary operators, OR and AND, and the unary operator, NOT, parenthesis and the equal sign. Its result is also a binary value. We usually use . for AND, + for OR, and ' or ¬ for NOT. Sometimes, we may omit the . if there is no ambiguity.

15 Boolean Functions From the truth table, F3=F4.
Examples: F1= xyz' F2= x + y'z F3=(x'y'z)+(x'yz)+(xy') F4=xy'+x'z From the truth table, F3=F4. Can you also prove by algebraic manipulation that F3=F4?

16 Complement of Functions
Given a function, F, the complement of this function, F', is obtained by interchanging 1 with 0 in the function’s output values. Example: F1 = xyz' Complement: F1' = (xyz')' = x' + y' + (z')' DeMorgan = x' + y' + z Involution

17 Complement of Functions
More general DeMorgan’s theorems useful for obtaining complement functions: (A + B + C Z)' = A' . B' . C' … . Z' (A . B . C Z)' = A' + B' + C' + … + Z'

18 Standard Forms Certain types of Boolean expressions lead to gating networks which are desirable from implementation viewpoint Two Standard Forms: Sum-of-Products and Product-of-Sums Literals: a variable on its own or in its complemented form. Examples: x, x' , y, y' Product Term: a single literal or a logical product (AND) of several literals. Examples: x, xyz', A'B, AB

19 Standard Forms Sum Term: a single literal or a logical sum (OR) of several literals. Examples: x, x+y+z', A'+B, A+B Sum-of-Products (SOP) Expression: a product term or a logical sum (OR) of several product terms. Examples: x, x+yz', xy'+x'yz, AB+A'B' Product-of-Sums (POS) Expression: a sum term or a logical product (AND) of several sum terms. Exampes: x, x(y+z'), (x+y')(x'+y+z), (A+B)(A'+B')

20 Standard Forms Every boolean expression can either be expressed as sum-of-products or product-of-sums expression

21 Summary Boolean algebra is required for constructing digital circuits
AND, OR and NOT constitute connectives There are certain postulates and theorems in Boolean algebra which helps in manipulation of boolean expression Boolean laws can be proved with either the help of truth table or with the basic postulates SOP and POS are two generic way of expressing any boolean function

22 Example: Half Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: half adder adds two binary digits to form Sum and Carry

23 Example: Half Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: half adder adds two binary digits to form Sum and Carry

24 Example: Half Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: half adder adds two binary digits to form Sum and Carry

25 Example: Half Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: half adder adds two binary digits to form Sum and Carry

26 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

27 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

28 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

29 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

30 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

31 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

32 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

33 Example: Full Adder Truth Tables
Tabulate all possible input combinations and their associated output values Example: full adder adds two binary digits and Carry in to form Sum and Carry Out Example: half adder adds two binary digits to form Sum and Carry

34 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin

35 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin

36 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin

37 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin

38 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin

39 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin

40 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin

41 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin + A B Cin

42 Example: Full Adder A 1 B 1 Cin 1 Sum 1 Cout 1
1 B 1 Cin 1 Sum 1 Cout 1 Sum = A B Cin + A B Cin + A B Cin + A B Cin Cout = A B Cin + A B Cin + A B Cin + A B Cin

43 Example Circuit to drive a digital display
Need 4 bits to represent 10 numbers (0-9) L1 L 6 L2 L3 L 7 L 4 L 5

44 Example Determine which segments are on for each number L1 L 4 L 6 L2

45 Example Determine which segments are on for each number L1 L 4 L 6 L2

46 Example Determine which segments are on for each number L1 L 4 L 6 L2

47 Example Determine which segments are on for each number L1 L 4 L 6 L2

48 Example Determine which segments are on for each number L1 L 4 L 6 L2

49 Example Determine which segments are on for each number L1 L 4 L 6 L2

50 Example Determine which segments are on for each number L1 L 4 L 6 L2

51 Example Determine which segments are on for each number L1 L 4 L 6 L2

52 Example Determine which segments are on for each number L1 L 4 L 6 L2

53 Example Determine which segments are on for each number L1 L 4 L 6 L2

54 Example Circuit to drive segment L4 L1 L 6 L2 L3 L 7 L 4 L 5

55 Reducing Complexity Laws of Boolean algebra can be applied to full adder's carry out Function to derive the following simplified expression Cout = A Cin + B Cin + A B

56 Some standard gates and their symbols and truth tables


Download ppt "COMS 361 Computer Organization"

Similar presentations


Ads by Google