In this video we're going to show the procedure to derive a circuit from a given Boolean expression. We start the example with this given Boolean expression x times y plus z prime. From this Boolean expression we can immediately derive the truth table by exercising all possible eight combinations of the values of x, y, and z. For those values we obtain this column over here which is the output or the result of evaluating this Boolean expression. Now suppose that instead of being given the Boolean expression you are only given the truth table and you're requested to implement a digital circuit that replicates the behavior specified by this table. So one possibility is to use what we call the canonical representation sum of products. The sum of product representation of this truth table over here requires us to create a product for each row in the truth table that has a value one in the output column. And this product needs to be a Boolean expression that returns one when these symbols over here specifically have this combination. So this row over here will translate into the product x prime y prime z prime. This row will be x prime y z prime. This row that has a one as well would be x, y prime, z prime. This row will be x, y, z prime. And the last row which is the last one with a one here will give x, x, y, and z. So far what we have done is derived from this expression the truth table and from the truth table the sum of products. Now if you look carefully this sum of products is already telling us one possible circuit we can implement with this. We can represent or produce the value of each of these products as a three input and gate. So we have one, two, three, four, five of these products. So we're going to create one, two, three, four, and five inputs gates. Each one of these will implement the conjunction or the product of these sum of products. And then at the end what we're going to do is the result of each one of these gates will be fed as an input in an or gate connected the way it is done here. So this will be the output of our circuits. What remains to be connected then is each of the three inputs of these and gates. But as we can see for each one of them we're going to have a connection to either a symbol or its negation. So one possibility is to say well we're going to have the input x here but also we're going to negate this value to create x bar. The same thing for y we're going to generate y but also the negation of y and finally z and the negation of z. So this trick over here allows me to access both the value of my symbol and the value of its negation. Now the trick here is the following. We go by one on these gates and we decide how to connect either of these six signals, the correct three signals to the right and gate. Let's start from the last term and we know here that we have to connect x, y, and z. So what we do is we take this first input x and connected like this. The second one will be y so we connected like this and the third one will be z and we connected like this. So with these three connections we have replicated this product which itself is feeding into this overall sum. We do exactly the same for the values and in this case is x, y, and z prime. So x I simply connected like this, y I connected like this but now z prime rather than connected to this line which is z. I have to bring the value of this signal all the way down here and connected like this. This product over here contains x, y prime, z prime. So we will connect x like this. What prime we need to bring down the line of this inverter and z prime we already have it here so we connected it like this. This term over here is x prime y z prime. So the first thing we do is we connect this to x prime which brings it down like this. Second one is y. We connected like this and the third one is z prime which we have it right here. And finally this term is x prime y prime z prime which means I have to connect the three inputs of this gate to the three lines that come out of the inverters. So this is the result. This is the digital circuit derived from the Boolean expression. Let's summarize the process. We started with the expression. We obtained the truth table. With the truth table we know how to obtain a canonical representation which is the sum of products and these sum of product corresponds almost one to one with the structure of this circuit. The only thing that we have used is the gate with arbitrary number of inputs. So in these cases the function has three input variables. All these and gates will have three inputs and the overall or or the final or that we connect all of them has as many inputs as terms or products are in our SOP representation. Now once we have that we can closely look at what happened here. We started with this expression. Let's call it E1. And then we derive this other expression which is E2. Now these two expressions E1 and E2, they represent exactly the same function. Therefore they are equivalent. We can write here that E1 is equivalent to E2. Now from E2 we derive the circuit. But if we look closely at this expression here we also have the possibility of deriving a circuit looking at this expression. This expression can be represented as this. X times Y is an AND gate. And this AND gate has a disjunction or an OR with Z prime but Z prime is this. So here we have that from the expression to we derive this circuit but from the first expression we derive this other digital circuit. Now these two circuits are also equivalent in other words. No matter which combination we set both circuits at the inputs they will give us exactly the same output. Therefore these two circuits are also equivalent. And this is a great example to show the wide variety of possibilities that you have to implement a circuit from a given Boolean expression. If you resort only to the truth table using the sum of products is one possibility to come up with a circuit. However certain functions, if you manipulate the results accordingly and you apply simplification rules, some of the functions can be represented in Boolean expressions that are much more compact. And these Boolean expressions that are much more compact, very likely, like it is in this case, will produce a much more compact circuit. Now we take into account that these digital gates occupy a space in a chip and these digital gates sometimes are slower than other, especially those that have more than two inputs. Then what we have is this circuit over here is preferred over this one because it occupies less space and probably is also faster. And this is at the bottom of the optimizations that digital designers have to deal with when they are facing a problem not as simple as this one with a three input function but for functions that have maybe 10, 15 or 10s or hundreds of inputs. And they have to produce the most compact Boolean representations such that the circuit occupies the least amount of space and works as fast as possible.