Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 352 Digital System Fundamentals

Similar presentations


Presentation on theme: "ECE 352 Digital System Fundamentals"— Presentation transcript:

1 ECE 352 Digital System Fundamentals
Boolean Algebra In this presentation, we will be looking at Boolean algebra.

2 Topics Boolean Algebra Boolean Functions Functional Waveforms
Boolean Identities and Manipulations We’ll talk about Boolean functions, including waveforms that represent the behavior of a Boolean function over time, and we’ll look at how Boolean algebra fits into the design of digital circuits.

3 Boolean Function Defined by a truth table, which is a complete representation of a Boolean function Same truth table can be implemented using different Boolean functions! If functions have identical truth tables, they are by definition functionally equivalent Different functions with the same truth table may differ in complexity – this is why we use “logic minimization” Can also express the behavior of a Boolean function (or logic circuit) in response to different input values using a waveform… Does not define the behavior, but can verify it A truth table uniquely defines a Boolean function. A truth table is simply an ordered list of all possible input value sets, and specifies the output value for each input set. We can write multiple Boolean algebra functions that have the same truth table – we say that the functions are functionally equivalent. As we’ll see, equivalent functions can differ in complexity, so we will use the idea of logic minimization to create circuits that are optimal implementations of a desired Boolean function. We can also express the behavior of a Boolean function with a waveform, which shows the values of the function’s inputs over time, and the value of its output in response to those inputs.

4 Functional Waveforms F = AB + C A B C F
Express signal/circuit behavior over time 1 is “high” and 0 is “low” Given a set of input signals and their values over time, determine resulting output behavior Inputs may not occur in all possible combinations Input combinations may repeat Not definitive like a truth table! Can complete from left to right, but don’t have to if the function is combinational F = AB + C A By convention, we assume that a logic 1 is represented by a high level on the waveform, and a logic 0 is represented by a low level. The horizontal axis represents time, moving from left to right. Here we have an example waveform for a function with inputs A, B, and C, and output F. Since the Boolean function shown is combinational, the output F at any instant is determined only by the values of the inputs A, B, and C at that instant. B C F

5 Circuits From Boolean Functions
Functions are implemented using logic gates The circuit inputs are the function variables A literal is a single variable within a term (that may or may not be complemented) The circuit output is the “result” Each Boolean function can be directly translated to a gate diagram that produces an output Think how you would read the function out loud... You would use the names of logic functions that each correspond to a gate! If we need more than one output, can create separate functions, separate circuits May be able to share a subset of circuitry… Using logic gates, we can build a circuit that physically implements a Boolean function. The inputs to the circuit are the function’s variables. An important bit of terminology – a “literal” is any single variable (or its complement) within a term of the function. So, if there is a function of A, B, and C, every instance of A, B, or C (whether complemented or not) in the function is a literal. The output of the circuit produces the result of the implemented Boolean function. A Boolean function can be directly translated to a gate diagram. The operators in the function, such as NOT, AND, and OR, become the equivalent logic gates, and then we connect those logic gates to match the order of evaluation in the function. If a circuit must produce more than one output, we would represent it as multiple functions and hence, multiple circuits. As we’ll see later, it may be possible to share some of the circuitry between the functions, which will make for a better implementation.

6 Boolean Algebra An algebra to work with Boolean values
Similar to “regular” algebra except Boolean variables can only be 0 or 1; constants are only 0 or 1… Has operators, parentheses for precedence, etc. This allows us to manipulate Boolean functions Circuit/logic minimization Identify shared sub-functions (shared circuitry) Verify functionality Transform to use other types of gates or structures …etc… Boolean algebra works with Boolean values. It’s similar to the algebra you’re familiar with, except Boolean variables and constants have only two possible values. Boolean algebra is important because it lets us manipulate Boolean functions in order to create minimal (lowest cost) circuits, identify circuitry that can be shared between functions, verify circuit functionality, and to transform functions to use different types of logic gates.

7 Basic Boolean Identities
X + 1 = 1 X + 0 = X X·1 = X X·0 = 0 X + X = X X + X = 1 X·X = X X· X = 0 X = X Commutative: X + Y = Y + X X·Y = Y·X Associative: X+(Y+Z) = (X+Y)+Z X·(Y·Z) = (X·Y)·Z Distributive: X·(Y+Z) = X·Y + X·Z X + Y·Z = (X+Y)(X+Z) De Morgan’s: X + Y = X ∙ Y X ∙ Y = X + Y This table lists the key Boolean algebra identities – you should commit these to memory. Remember that the plus sign represents an OR, and the dot represents an AND. Most of the laws governing Boolean algebra should be familiar. However, you can see that the form of the distributive law on the right is not applicable to normal algebra. De Morgan’s Law is extremely important in circuit design, because it allows us the transform an AND operation into an OR operation, or vice versa.

8 More Algebraic Manipulation
Duality Principle: Dual of a circuit/equation: change ANDs to ORs, and change ORs to ANDs Taking the dual of both sides of a Boolean equation results in a valid equation Consensus Theorem: AB + A C + BC = AB + A C Provides a way to identify and remove a redundant term algebraically There are a few other Boolean transformations that we might need to make. The duality principle states that if you take the dual of both sides of an equation, the result is a valid equation. The two forms of each law on the preceding slide were in fact duals of each other. However, taking the dual of a function does NOT result in an equivalent function – it results in the dual of the function, which is not generally useful. In general, we won’t use duality too much in this class, but you should know what it is. The consensus theorem allows us to identify and remove a redundant term in a Boolean expression.

9 Consensus Theorem AB + A C + BC = AB + A C + BC(A + A ) = AB + A C + ABC + A BC = AB + ABC + A C + A BC = AB∙1 + ABC + A C∙1 + A BC = AB(1 + C) + A C(1 + B) = AB(1) + A C(1) = AB + A C To prove the consensus theorem, we first AND the BC term with 1, in the form of A ORed with its complement. This creates an equivalent expression, but one where we can use the distributive law to then create terms that each have either A or its complement in it. Then we can reorganize, AND terms with 1 without changing their values, factor terms, simplify, and voila, we have eliminated the redundant term from the original equation. Note that both expressions will have exactly the same truth table, so they are functionally equivalent.

10 Why Simplify? AB + A C + BC AB + A C
More complex equation describes more complex circuit More area More delay More power and heat More work to create So, why simplify a Boolean function, if it doesn’t change the function’s behavior? Directly implementing the original Boolean expression, we have this circuit. By eliminating the redundant term, we can instead implement a simpler circuit. The simpler circuit is smaller, faster, easier to build, and it uses less power – now, that’s a win-win-win-win.

11 Complement of a Function
The complement of a function is one that has the “opposite” truth table In the output column, change 0s to 1s and 1s to 0s Use De Morgan’s Law BEWARE operator precedence and grouping Add parentheses if necessary! Can test if correct by comparing truth tables Sometimes we need to transform a function to have exactly the opposite behavior. We call this the complement of a function. Specifically, it has the opposite truth table, where each output value has been flipped—either from a 0 to a 1 or from a 1 to a 0. To perform this transformation algebraically, we complement the entire function and then, if needed, use Boolean algebra to simplify it to a standard form. This simplification will generally require De Morgan’s Law. When you do this, be very careful to observe the correct operator precedence. It can sometimes be helpful to add parenthesis to make the order of evaluation more obvious. When you’re done, you can verify your work by creating a truth table for the complement and verify that it is correct.

12 Complement of a Function
F = A (B + C) + A C F = A B + C + A C = A (B + C) ∙ A C = A + (B + C) ∙ ( A + C ) = A + B C ∙ A + C = A A + AC + A B C + B C C = 0 + AC + A B C + 0 In this example, we want to find the complement of the function F. We begin by complementing the entire function, then we simplify the resulting function using De Morgan’s Law and the algebraic identities. Pause here and identify the law or identity used in each step – you should see that De Morgan’s Law is used repeatedly. F = AC + A B C

13 ECE 352 Digital System Fundamentals
Boolean Algebra This concludes this video on Boolean Algebra.


Download ppt "ECE 352 Digital System Fundamentals"

Similar presentations


Ads by Google