NOT 0 OR 1 AND 1?

Notice that we have parenthesis to gi, to give us the priority here.

So the way we value it is very simple.

We know how to evaluate 1 AND 1, which is 1.

So the whole thing simplifies to NOT 0 AND 1 OR 1.

We know how to evaluate 0 OR 1.

That's going to be 1 because it's an OR operation so that's equal to NOT 1.

And now we know how to evaluate NOT 1, that's simply 0.

All very simple and we can do that.

Now once we know how to evaluate a Boolean expression over values, over 0,

1 values, then we can actually get general expressions, general functions that takes

indeterminates, XYZ as inputs, and for each value of XYZ, produce an output.

So for example, I can define a function, a function of three inputs, XY and Z.

That basically turns x AND y OR NOT x AND

z and look in the parenthesis to see the priority that I was thinking about.

Of course I could use, I could define any other function

by any other Boolean formula and that would give me a function.

If we want to know what kind of function is that,

well we can actually list all the possible values of x, y and z.

And for each one of them, try to write down what is the value of the function?

The really nice thing about Boolean values is the fact there are only a finite number

of possible inputs and we can actually list each one of them.

This is completely different from functions that you've learned

in third grade.

Where you have function from integer through integer,

then there are infinitely many integers.

So you can never write down the function in a complete specification of all

the possible values.

But here, we can actually write down all the possible values that x,

that the triplet x,y,z can have.

We can have x 0,

y 0 and z 0 that corresponds to the first row in the table and so on.

Until the last row of the table that corresponds to all three of them being 1.

Now for each one of these rows, we can just evaluate the function.

What is the function f of x, y, z defined by the previous formula for these values?

For example let's look at the second row.

In the second row we have x equals 0, y equals 0, z equals 1 and

we can just plug in the numbers 0, 0 1 into the formula.

Every time we have an x we put a 0 there.

Every time we have a y we put a 0 there.

Every time we have a z we put a 1 there.

And now we just get formula with constants in it and

we can evaluate it just like we did in the previous slide.

And we can figure out that is 1, that the second row should get a value of 1.

We can do this similarly for each one of the possible rows and we get a,

we can completely fill the table.

And now notice that this table of values

completely gives you the same information as the previous expression did.

It completely specifies the functions, the Boolean function that we just had.

The first day, the first way we described the function was as a formula.

The second way we describe the function was as a Truth Table.

These are two completely identical, def, def, eh, definitions.

Ways to describe the same Boolean function.

So now, eh, once we know we can describe Boolean functions using formulas and

we are thinking we have general Boolean expressions, we can actually try to find

what are a bunch of Boolean identities that always give us equality.

For example, we can always see that x AND y, whatever the values of x and

y is, is exactly equal to y AND x.

This is called the Commutative Law.

We have the same similar phenomena for x OR y equals y OR x.

So these are like commutative laws that hold for

this Boolean algebra, in this, in this Boolean algebra.