 In this video, we're going to explain what it is, a Boolean algebra, and how to manipulate Boolean expressions. Boolean algebra is mostly defined by two ingredients. The first one is the values of this Boolean algebra, which are very simple, it's just the constants 0 and 1. The second ingredient are the operations, and we're going to see three basic ones which are conjunction, disjunction, and negation. And also when manipulating expressions in this Boolean algebra, we're going to be using a set of symbols, which are basically letters, could be x, y, c, a, b, so on and so forth. So let's first elaborate on the rules of these basic operations, and let's start with the conjunction. The conjunction is an operation which we are going to represent either as an asterisk between two symbols, or simply putting two symbols together, a times b, or a, b will represent exactly the same. And the result of this operation is the following. The operation will return the value 1 if both symbols are 1 and 0 otherwise. So this is the definition of one of the three operations of our Boolean algebra. Second operation, the disjunction. The disjunction in this Boolean algebra we're going to represent it also as a familiar symbol, which is going to be the plus symbol, a plus b is a disjunction, and the rule for this operand is that it will return a 1, the result will be 1, if any symbol has value 1. And again, it's in the case of the conjunction 0 otherwise. And finally, the third operation, very simple, is the negation. Now the negation has different representations depending on different types of notations, but mostly we're going to be using this a prime. Although sometimes you can find it also as a bar, and even sometimes with this symbol as prefix. But again, we're going to be using the a prime notation. And the way this operation works is very simple. It works only on a single operand, and it basically translates the operand into the opposite value. In other words, if the symbol has the value 0, the negation transforms it into a 1, and vice versa. Okay, so these are the three operations of our Boolean algebra. These operations have some properties that are fairly common. The first one is that both conjunction and disjunction are commutative. So if I have a times b is equal to b times a, and a plus b is equal to b plus a, both conjunction and disjunction. They're also both associative, so a times b times c is equals to a b times c, and also a plus b plus c is equal to a plus b times c. An additional interesting property of the negation is that if I have the expression a prime, this is obviously equal to a, because as we saw, the operator changes the value to the opposite, changing it twice to the opposite means that it retains its initial value. There are other properties that are satisfied in the Boolean algebra, which we're not going to enumerate all of them. But there's also the distributive property, the important property, several of them that are very useful to manipulate what we're going to see next, which is the concept of Boolean expressions. What are Boolean expressions? Well, very simply, they're just expressions that we obtain by combining these three ingredients. The values here on one, if we need them, conjunction, disjunction and negation, par-emphasis of course, as similar here, plus as many symbols as we need. So in fact, in this right side of the paper, we already see a few Boolean expressions. So let me give you a couple of examples. The first one could, for example, be x times y plus c prime, and another one could be a plus b times c prime plus d prime, which by the way, this one, through the distributed law, you can expand it and say equal to ac prime plus ad prime plus bc prime plus bd prime. So Boolean expressions are simply the combination of these elements that we just described before. Now from a Boolean expression, there is an interesting table that we can deduct, which is called the truth table. Again, given a Boolean expression, we can create its truth table. What is the truth table? Well, the truth table is obtained following two basic rules. The first one is this table is going to have as many rows as possible combinations of symbol values. We're going to see this in an example in a second, but this table is going to have for each row one possible combination of all the symbols that appear in an expression. In this case, this expression has four symbols, x, y, and z. This one is negated. And in this case, we have three symbols here and four symbols here, a, b, c, and d. The second rule is that this table is going to have one column for each symbol plus one column for the result. So let's see what do we mean by this with a concrete example. Let's take this expression over here, x, y, plus z prime. Now the rule says that we're going to have as many rows as possible combination of the symbols and one column per symbol plus one column for the result. So let's first draw here the name of the columns, which are going to be x, y, z, and another one, which we're going to call result. So these are going to be the columns. And the rows, it says here, there has to be one for every possible combination of the symbols. Three symbol sets, y, x, y, and z. Therefore, each one can take the value 0 and 1, which results into eight possible combinations, from all of them being 0, 0, 0, 0, 2, all possible combinations. 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1. In this case, since we have three symbols, each one of them can take independently two values. We have two to the three eight possible values. Now how do we compute the result column? This is the interesting part. The result column, it's going to be compiled for each row as follows. We take the initial expression, and now we replace every symbol that we see here by the value provided by the row. So we'll replace x by 0, y by 0, and z by 0. And then we apply the rules of the operations we've seen before. So if we replace x and y, both by 0, x times y, it's going to be 0, because the conjunction only produces a 1 if both symbols are 1, which is not the case, both symbols are 0. z, when applied a negation, initially is a 0. z prime, it's going to evaluate to the opposite value, therefore a 1. And this disjunction we see here, it's going to take the disjunction between a 0, which is the result of this term, with a 1. 0 plus 1, we say here that is a 1, because one symbol has the value 1. So the result is 1. What we have just done is evaluated this expression for the values of this row. And what we have to do is repeat this operation for all possible rows. If we repeat this, 0, 0, 1, in this case, 0, 0 will transform this conjunction into 0. z negated is also a 0, because z is 1, 0 plus 0, the disjunction returns a 0. And so on and so forth. If you take your time to write the truth table, you'll end up with these combinations in here. Now again, this truth table is derived from this expression, and it represents all the possible values of the result, or in other words, all possible ways of evaluating this expression for all the combinations possible given the symbols. Now the interesting thing, as we've seen, we derived this truth table from a Boolean expression. Now imagine that we have two Boolean expressions, e1 and e2. They are initially, they are different, but when we derive the truth table, imagine we create the truth table, we call it truth table 1, and the other truth table 2. Now imagine that we derive these two truth tables from two initially different Boolean expressions, but we find out that these truth tables are identical. If that is the case, what it means is that no matter which appearance these expressions have, when we enumerate all possible combinations of the inputs, we obtain exactly the same result. And therefore, if the truth tables are identical, we can conclude that these two Boolean expressions are what we call equivalent.