 # Boolean Algebra and Digital Circuits

## Presentation on theme: "Boolean Algebra and Digital Circuits"— Presentation transcript:

Boolean Algebra and Digital Circuits
Reading: Chapter 8 ( ) from the text book

Defn of a Boolean Algebra
A Boolean algebra consists of: a set B={0, 1}, 2 binary operations on B (denoted by + & ×), a unary operation on B (denoted by '), such that : 0 + 0 = 0 0 × 0 = 0 1 + 0 = 1 0 × 1 = 0 0 + 1 = 1 1 × 0 = 0 1 + 1 = 1 1 × 1 = 1 0’=1 and 1’=0.

Rules of a Boolean Algebra
The following axioms (‘rules’) are satisfied for all elements x, y& z of B: (1) x + y = y + x (commutative axioms) x× y = y × x (2) x + (y + z) = (x + y) + z (associative axioms) x × (y × z) = (x × y) × z (3) x × (y + z) = (x × y) + (x × z) x + (y × z) = (x + y) × (x + z) (distributive axioms) (4) x + 0 = x x × 1 = x (identity axioms) (5) x + x' = 1 x × x' = 0 (inverse axioms)

Duality To form the dual of an expression, replace
all + operators with × operators, all × operators with + operators, all 1’s with 0’s, and all 0’s with 1’s. The principle of duality says that if an expression is valid in Boolean algebra, the dual of that expression is also valid.

Duality Exercise: Form the dual of the expression
a + (bc) = (a + b)(a + c) Solution: Following the replacement rules… a(b + c) = ab + ac Take care not to alter the location of the parentheses if they are present.

Laws of Boolean Algebra
In addition to the laws given by the axioms of Boolean Algebra, we can show the following laws x'' = x (double complement) x + x = x x× x = x (idempotent ) (x + y)' = x' × y' (x × y)' = x' + y' (de Morgan’s laws) x + 1 = 1 x × 0 = 0 (annihilation) x + (x × y) = x x× (x + y) = x (absorption) 0' = 1 1' = 0 (complement)

Exercise (x' × y) + (x × y) Solution: (x' × y) + (x × y)
Simplify the Boolean expression (x' × y) + (x × y) Solution: (x' × y) + (x × y) = (y × x') + (y × x) (commutative) = y × (x' + x) (distributive) = y × (x + x') (commutative) = y × (inverse) = y (identity) Thus (x' × y) + (x × y) = y

Digital Circuits The circuitry in a digital computer operates with signals that can take only 2 values ‘on/off’ (i.e. 0/1). We’ll use the particular Boolean Algebra where B has just the 2 elts 0 & 1, and where Boolean addition corresponds to parallel switch contacts:

Boolean Multiplication
Boolean multiplication corresponds to series switch contacts:

Boolean Notation This means that in effect we’ll be employing
Boolean Algebra notation. The truth tables can be rewritten as

Notational Short-cuts
We will employ short-cuts in notation: In ‘multiplication’ we’ll omit the symbol ×, & write xy for x × y (just as in ordinary algebra) (2) The associative law says that x + (y + z) = (x + y) + z So we’ll write this as simply x + y + z, because the brackets aren’t necessary.

Notational Short-cuts
Similarly, write the product of 3 terms as xyz (3) In ordinary algebra, the expression x + y × z means x + (y × z), because of the convention that multiplication takes precedence over addition. e.g. x + yz means x + (y × z), and not (x + y) × z Similarly, ab + cd means (a × b) + (c × d)

Digital Circuits A digital circuit (or logic gate circuit) is an
electronic device for carrying out digital computations (e.g. addition of 2 numbers) It accepts 1 or more inputs, each of which has 2 possible states (0 for ‘off’ & 1 for ‘on’) For each possible combination of inputs, one or more outputs are produced . Logic Circuit Inputs Outputs

Describing Circuit Functionality: Inverter
Truth Table A Y 1 A Y Symbol Input Output Truth table completely specifies outputs for all input combinations. The above circuit is an inverter. An input of 0 is inverted to a 1. An input of 1 is inverted to a 0. credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

The AND Gate This is an AND gate. So, if the two inputs signals
B Y This is an AND gate. So, if the two inputs signals are asserted (high (ON)) the output will also be asserted (ON). Otherwise, the output will be asserted (low (OFF)). Truth Table Input 1 input2 output A B Y 1

The OR Gate This is an OR gate.
B Y This is an OR gate. So, if at least one of the two input signals is asserted (ON), then output will be asserted (ON). Otherwise, the output will be asserted (low (OFF)). Input Input Output A B Y 1

Consider Three-input Gate
3 Input OR Gate

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

Boolean Functions x 1 y 1 z 1 xy 1 yz 1 G 1 x y z G = xy +yz yz xy We will learn how to transform between expression and truth table.

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 to have the Boolean function. x 1 y 1 z 1 G 1 Any Boolean Expression can be represented in sum of products form! xyz + xyz’ + x’yz

Equivalent Representations of Circuits
Number of 1’s in truth table output column equals AND terms for Sum-Of-Products (SOP) x y z 1 G G = xyz + xyz’ + x’yz credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs.

Reducing Boolean Expressions
Is this the smallest possible implementation of this expression? No! Use Boolean Algebra rules to reduce complexity while preserving functionality. Step 1: Use idempotent law (a + a = a). So xyz + xyz’ + x’yz = xyz + xyz + xyz’ + x’yz G = xyz + xyz’ + x’yz

Reducing Boolean Expressions
Step 2: Use distributive law a(b + c) = ab + ac. So xyz + xyz + xyz’ + x’yz = xy(z + z’) + yz(x + x’) Step 3: Use Inverse law (a + a’ = 1). So xy(z + z’) + yz(x + x’) = xy.1 + yz.1 Step 4: Use Identity law (a . 1 = a). So xy + yz = xy.1 + yz.1 = xyz + xyz’ + x’yz

Reduced Hardware Implementation
Reduced equation requires less hardware! Same function implemented! x 1 y z G x x G credential: bring a computer die photo wafer : This can be an hidden slide. I just want to use this to do my own planning. I have rearranged Culler’s lecture slides slightly and add more slides. This covers everything he covers in his first lecture (and more) but may We will save the fun part, “ Levels of Organization,” at the end (so student can stay awake): I will show the internal stricture of the SS10/20. Notes to Patterson: You may want to edit the slides in your section or add extra slides to taylor your needs. x x x y z G = xyz + xyz’ + x’yz = xy + yz

Karnaugh maps Alternate way of representing Boolean function
All rows of truth table represented with a square Each square represents a minterm x y F 0 0 1 0 1 1 1 0 0 1 1 0 1 y x x’y’ xy’ xy x’y 1 y x

Karnaugh maps Easy to convert between truth table, K-map, and SOP.
Unoptimized form: number of 1’s in K-map equals number of minterms (products) in SOP. Optimized form: reduced number of minterms F(x,y) = x’y + x’y’ = x’

F=AB’C’ +AB C +ABC +ABC  + A’B’C + A’BC’
Karnaugh Maps A Karnaugh map is a graphical tool for assisting in the general simplification procedure. Two variable maps. A 1 B F=AB +A’B B 1 A 1 F=AB +AB +AB  1 1 1 A B C F Three variable maps. 1 1 A 1 00 01 BC 11 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 + F=AB’C’ +AB C +ABC +ABC  + A’B’C + A’BC’

Rules for K-Maps We can reduce functions by circling 1’s in the K-map.
Each circle represents minterm reduction. Following circling, we can deduce minimized and-or form. F(x,y) = x’y + x’y’ = x’ 1 y x

Rules for K-Maps Rules to consider
Every cell containing a 1 must be included at least once. The largest possible “power of 2 rectangle” must be enclosed.

F=AB’C’ +AB C +ABC +ABC  + A’B’C + A’BC’
Karnaugh Maps A Karnaugh map is a graphical tool for assisting in the general simplification procedure. Two variable maps. A 1 B F=AB +A’B A 1 B F=AB +AB +AB  F=A+B Three variable maps. A 1 00 01 BC 11 10 F=A+B C +BC  F=AB’C’ +AB C +ABC +ABC  + A’B’C + A’BC’

More Karnaugh Map Examples
1 1 b b 1 1 1 1 1 1 f = a g = b' ab ab c 00 01 11 10 c 00 01 11 10 1 1 1 1 1 1 1 1 1 1 cout = ab + bc + ac f = a 1. Circle the largest groups possible. 2. Group dimensions must be a power of 2. 3. Remember what circling means!

Download ppt "Boolean Algebra and Digital Circuits"

Similar presentations