Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Algebra Computer Architecture. Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically.

Similar presentations


Presentation on theme: "Boolean Algebra Computer Architecture. Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically."— Presentation transcript:

1 Boolean Algebra Computer Architecture

2 Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically ranging from 0 to 5 volts on PCs –Digital logic abstracts it to 2 distinct levels –“1” or positive (typically 2.5 V or greater) –“0” or negative (typically less than 1 volt) Eases design and manufacturing –Provides more immunity from noise Analog Voltage WaveformDigital Voltage Waveform 0 0 11 5V 0V

3 Digital Processing Combine “1”s and “0”s in different ways –To generate more “1”s and “0”s This is finally what a computer really does Need a well defined mechanism Ease design & development of circuits –Boolean Algebra Mathematical framework for processing “1”s & “0”s Based on simple, scalable primitive operations –Easy to realize using basic hardware components Scales to reason about complex operations Leads to information processing –When combined with suitable interpretations

4 Axioms of Boolean Algebra Two Boolean constants –“1” or “true” –“0” or “false” Boolean variables –An unknown Boolean value Can be “1” or “0” (but not both at the same time) –Represented using symbols (or alphabets) Examples: “X”, “A”, “B”, “  ”, “  ” 3 primary Operators –NOT (unary operator) –AND (Binary operator) –OR (Binary operator)

5 Truth Table Tabulates results of operators –Involves n variables –Consists of 2 n rows Each row has a unique combination of “1” and “0” for the n variables –Used to define result of primary operators NOT, AND, & OR

6 NOT Operator NOT operator inverts the value of a variable –Given a Boolean variable A –NOT operation is represented as A NOT is described by the following truth table: AA 01 10

7 AND Operator AND operator –Binary operator: Uses 2 operands –Result is a “1” only if both operands are “1” –AND operation is represented as AB or AB Where A and B are two Boolean variables AND is described by the following truth table: AB ABAB 000 010 100 111

8 OR Operator OR operator –Binary operator: Uses 2 operands –Result is a “1” if any one of the operand is a “1” –OR operation is represented as A+B Where A and B are two Boolean variables OR is described by the following truth table: ABA+B 000 011 101 111

9 Exercises If A=1 and B=0, What is –A = –A+B = –AB = –AA = –B+B = –A =

10 Boolean Equation Combination of operands & operators –Examples 1 A+A (A+B)1 (A0)+(B0) A+B+C+D A1+B1 –Operator precedence Inner most parentheses NOT AND OR

11 Boolean Equations & Truth Tables Illustrate Truth Table for A+BC ABCBCA+BC 000 001 010 011 100 101 110 111

12 Laws of Boolean Algebra For a Boolean variable A –Identity law A + 0 = A A 1 = A –Zero and One laws A + 1 = 1 A 0 = 0 –Inverse laws A + A = 1 A A = 0

13 Laws of Boolean Algebra (Contd.) Given Boolean variables A, B, & C –Commutative laws A + B = B + A A B = B A –Associative laws A + (B + C) = (A + B) + C A (B C) = (A B) C –Distributive laws A (B + C) = (A B) + (A C) A+(B C) = (A+B) (A+C) –DeMorgan’s laws (A B) = A + B (A+B) = A B

14 Verification of Laws (1) Using Truth Tables –Identity Law A + 0 = A AA + 0 00 11

15 Verification of Laws (2) –Distributive law A (B + C) = (A B) + (B C) ABCA(B+C) (A B)+(B C) 000 001 010 011 100 101 110 111

16 More Boolean Operators Other commonly used Boolean Operators Convenient when implementing logic operations using electronic components –NAND (AB) –NOR (A+B)

17 English to Logic Conversion Straightforward strategy Use common sense –Identify independent clauses Look for “and” & “or” clauses in sentences –Identify primary inputs –Work logic out for each independent clause –Connect them back together –Optimize the final equation We will not deal with optimizations in this course –Verify using Truth Table

18 Example 1 Output is 1 only if the two primary inputs are zero –Let the primary inputs be A and B –Output is 1 in the following cases A=0 & B=0 => A B –The above equation can be rewritten as: (A+B)

19 Example 2 Output is 1 only if the two primary inputs are different –Let the inputs be A and B –Output is 1 in the following cases A=1, B=0 => AB A=0, B=1 => AB –Combining the above two cases gives: (AB)+(AB) This operation is called Exclusive-OR or XOR –It is frequently used –Represented as A + B

20 Truth Table for XOR XOR is a frequently used operation –It is important to remember its operation ABA+B 000 011 101 110


Download ppt "Boolean Algebra Computer Architecture. Digital Representation Digital is an abstraction of analog voltage –Voltage is a continuous, physical unit Typically."

Similar presentations


Ads by Google