00:01
Okay, so in this question we want an ac unit to run at full power if the temperature is above is, how is it phrased, is at 75 degrees fahrenheit or higher, and higher.
00:49
We wanted to be turned off if it's below 75 degree fahrenheit.
01:15
So we want to write that in propositional logic as well as programming language.
01:22
I'm going to divide my answer in two parts.
01:27
On the right we're going to have the propositional logic.
01:36
I try to draw a line as possible.
01:43
And on the right, we're going to have the computer logic.
01:52
But not any specific language.
01:55
We're just going to do it like general computer logic.
01:57
You're going to see those two us very similar.
02:01
So let's start with propositional logic.
02:06
So we're going to need a statement.
02:09
We're going to need two propositions.
02:12
So our first statement is going to be a, and a is going to be that temperature is greater or equal to 75 degrees fahrenheit.
02:39
So that's the first part of our statement here.
02:43
So temperature is at 75 degrees fahrenheit or higher.
02:49
If we write it in slightly more mathematical terms, slightly more logic term, and simply write temperature greater or equal to 75 degrees fahrenheit and b the ac is on.
03:12
Now what is not a? well not a is i'm going to temperature not a means the opposite of a.
03:28
So what's the opposite of being greater or equal to 75 degrees celsius well it's 75 being below 75 degrees celsius that's the opposite and the same thing not be the opposite of b what is the opposite of being turned of having the ac on is the ac is opposite of on is so to write oh yeah yeah so yeah we have a temperature 75 b is on let's pretend it's on on equals four power in that case so ac is running ac is on now we have to write this statement so if we write a if a then b that's how you read it if a then b which means if the temperature is 75 degrees fahrenheit or higher then the ac is on that's how you write it in propositional logic the same way if you have not a so if you have the opposite of a so if the ace the temperature is below 75 degrees celsius you have not b i .e the ac is off so you can write a double arrow b.
05:26
So how you read this? a if and only if b, meaning the ac will be on...