truth table: Binary Operations 5
requirements
more examples
security alarm
if the inputs are
is there motion?
is the code right?
then the possible states for the inputs are
motion (first) |
code (second) |
|---|---|
motion |
right code |
motion |
wrong code |
no motion |
right code |
no motion |
wrong code |
and the possible outputs are
ON
OFF
the truth table shows all the logically possible states of the alarm
contradiction:
return Falsemotion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
OFF
no motion
right code
OFF
no motion
wrong code
OFF
outputs OFF always, it does not care about the inputs.
logical_conjunction:
return first and secondmotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
OFF
no motion
right code
OFF
no motion
wrong code
OFF
outputs ON only if there is motion AND the right code is entered. Authorized entry.
project_second:
return secondmotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
OFF
no motion
right code
ON
no motion
wrong code
OFF
outputs ON only if the right code is entered, it does not care if there is motion or no motion. How is the right code entered without motion?
converse_non_implication:
return (not first) and secondmotion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
OFF
no motion
right code
ON
no motion
wrong code
OFF
outputs ON only if there is no motion AND the right code is entered. How is the right code entered without motion?
negate_first:
return not firstmotion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
OFF
no motion
right code
ON
no motion
wrong code
ON
outputs ON only if there is no motion, it does not care if the right code or wrong code was entered.
logical_nand:
return not (first and second)motion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
ON
no motion
right code
ON
no motion
wrong code
ON
outputs OFF only if there is motion AND the right code is entered.
tautology:
return Truemotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
ON
no motion
right code
ON
no motion
wrong code
ON
outputs ON always, it does not care about the inputs.
logical_disjunction:
return first or secondmotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
ON
no motion
right code
ON
no motion
wrong code
OFF
outputs OFF only if there is no motion AND the wrong code is entered. How is the code entered without motion?
exclusive_disjunction:
return (not (first and second) and (first or second))motion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
ON
no motion
right code
ON
no motion
wrong code
OFF
outputs OFF if there is motion AND the right code is entered
outputs OFF if there is no motion AND the wrong code is entered
Wait a minute! Why is “motion AND the right code” the same as “NOT motion AND NOT the right code”?
material_non_implication:
return first and (not second)motion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
ON
no motion
right code
OFF
no motion
wrong code
OFF
outputs ON only if there is motion AND NOT the right code is entered. Is there a burglar?
project_first:
return firstmotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
ON
no motion
right code
OFF
no motion
wrong code
OFF
outputs ON only if there is motion, it does not care if the right code or wrong code was entered.
converse_implication:
return first or (not second)motion (first)
code (second)
output
motion
right code
ON
motion
wrong code
ON
no motion
right code
OFF
no motion
wrong code
ON
outputs OFF only if there is no motion AND the right code is entered. How is the code entered if there is no motion?
negate_second:
return not secondmotion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
ON
no motion
right code
OFF
no motion
wrong code
ON
outputs ON only if the wrong code is entered, it does not care if there is motion or no motion.
logical_nor:
return not (first or second)motion (first)
code (second)
output
motion
right code
OFF
motion
wrong code
OFF
no motion
right code
OFF
no motion
wrong code
ON
outputs ON only if there is no motion AND the wrong code is entered.
logical_equality:
return (not first or second) and (first or not second)motion (first)
code (second)
output
motion
right code
ON
motion
wrong code
OFF
no motion
right code
OFF
no motion
wrong code
ON
outputs ON if there is motion AND the right code is entered
outputs ON if there is no motion AND the wrong code is entered
material_implication:
return (not first) or secondmotion (first)
code (second)
output
motion
right code
ON
motion
wrong code
OFF
no motion
right code
ON
no motion
wrong code
ON
outputs OFF only if there is motion AND NOT the right code is entered.
I do not need to know or memorize every operation, the only operations that I want in this case are:
logical_conjunction, where it outputs ON only if there is motion AND the right code is entered. I assume this is an authorized entry.
material_non_implication, where it outputs ON only if there is motion AND the wrong code is entered. I assume this is NOT an authorized entry.
Because I want to first check if there is motion, then check if the code entered is correct.
hiring
if the inputs are
is the person a strong option?
is the person a strong fit?
then the possible states for the inputs are
option (first) |
fit (second) |
|---|---|
strong option |
strong fit |
strong option |
weak fit |
weak option |
strong fit |
weak option |
weak fit |
and the possible outputs are
HIRE
REJECT
the truth table shows all the logically possible states of
contradiction:
return Falseoption (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
REJECT
weak option
strong fit
REJECT
weak option
weak fit
REJECT
always REJECT. The inputs do not matter.
logical_conjunction:
return first and secondoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
REJECT
weak option
strong fit
REJECT
weak option
weak fit
REJECT
HIRE only if it is a strong option AND it is a strong fit. I only hire A players.
project_second:
return secondoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
REJECT
weak option
strong fit
HIRE
weak option
weak fit
REJECT
HIRE only if it is a strong fit, I do not care if it is a strong option or weak option. I like this person and do not care about whether it is a strong or weak option. How does the team feel about this?
converse_non_implication:
return (not first) and secondoption (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
REJECT
weak option
strong fit
HIRE
weak option
weak fit
REJECT
HIRE only if it is a weak option AND it is a strong fit. What is the benefit of a weak option that is a strong fit?
negate_first:
return not firstoption (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
REJECT
weak option
strong fit
HIRE
weak option
weak fit
HIRE
HIRE only if it is a weak option, I do not care if it is a strong fit or weak fit. Why would I hire a weak option?
logical_nand:
return not (first and second)option (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
HIRE
weak option
strong fit
HIRE
weak option
weak fit
HIRE
REJECT only if it is a strong option AND it is a strong fit. Why do I not want a strong option that is a strong fit?
tautology:
return Trueoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
HIRE
weak option
strong fit
HIRE
weak option
weak fit
HIRE
HIRE always, I do not care about the inputs. Anybody can get a job here.
logical_disjunction:
return first or secondoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
HIRE
weak option
strong fit
HIRE
weak option
weak fit
REJECT
REJECT only if it is a weak option and NOT a strong fit. I hire just about anybody but have to draw the line somewhere.
exclusive_disjunction:
return (not (first and second) and (first or second))option (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
HIRE
weak option
strong fit
HIRE
weak option
weak fit
REJECT
REJECT if it is a strong option AND it is a strong fit
REJECT if it is NOT a strong option AND NOT a strong fit
Wait a minute! Why is “strong option AND strong fit” the same as “weak option AND weak fit”? Do I just not like extremes?
material_non_implication:
return first and (not second)option (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
HIRE
weak option
strong fit
REJECT
weak option
weak fit
REJECT
HIRE only if it is a strong option AND NOT a strong fit. How does the team feel about this?
project_first:
return firstoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
HIRE
weak option
strong fit
REJECT
weak option
weak fit
REJECT
HIRE only if it is a strong option, I do not care if it is a strong fit or weak fit.
converse_implication:
return first or (not second)option (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
HIRE
weak option
strong fit
REJECT
weak option
weak fit
HIRE
REJECT only if it is a weak option AND it is a strong fit. Did I just hire a weak option that is also a weak fit?
negate_second:
return not secondoption (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
HIRE
weak option
strong fit
REJECT
weak option
weak fit
HIRE
HIRE only if it is a weak fit, I do not care if it is a strong option or weak option.
logical_nor:
return not (first or second)option (first)
fit (second)
output
strong option
strong fit
REJECT
strong option
weak fit
REJECT
weak option
strong fit
REJECT
weak option
weak fit
HIRE
HIRE only if it is a weak option AND NOT a strong fit. Trouble.
logical_equality:
return (not first or second) and (first or not second)option (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
REJECT
weak option
strong fit
REJECT
weak option
weak fit
HIRE
HIRE if it is a strong option AND it is a strong fit
HIRE if it is NOT a strong option AND NOT a strong fit
maybe I need someone else making these decisions
material_implication:
return (not first) or secondoption (first)
fit (second)
output
strong option
strong fit
HIRE
strong option
weak fit
REJECT
weak option
strong fit
HIRE
weak option
weak fit
HIRE
REJECT only if it is a strong option AND NOT a strong fit.
I do not need to know or memorize every operation, the only operations that I want in this case are:
logical_conjunction, HIRE only if it is a strong option AND it is a strong fit if I only want A players that can work with the team.
material_non_implication, if I am okay with hiring someone who is a strong option AND NOT a strong fit.
maybe logical_disjunction, if I will HIRE pretty much anyone and only REJECT a weak option that is also a weak fit.
store discount policy
if the inputs are
does the person have a coupon?
is the person a member?
then the possible states for the inputs are
coupon (first) |
member (second) |
|---|---|
coupon |
member |
coupon |
NOT a member |
no coupon |
member |
no coupon |
NOT a member |
and the possible outputs are
DISCOUNT PRICE
REGULAR PRICE
the truth table shows all the logically possible states of
contradiction:
return Falsecoupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
REGULAR PRICE
REGULAR PRICE always. I never give a discount, everyone pays full price.
logical_conjunction:
return first and secondcoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
REGULAR PRICE
DISCOUNT PRICE only if the person has a coupon AND is a member. A loyalty/rewards program.
project_second:
return secondcoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
REGULAR PRICE
DISCOUNT PRICE only if the person is a member, I do not care if they have a coupon or no coupon. I give the discount only to members. A loyalty program. Sorry you brought a coupon.
converse_non_implication:
return (not first) and secondcoupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
REGULAR PRICE
DISCOUNT PRICE only if the person does NOT have a coupon AND is a member. What happens to the members who have coupons?
negate_first:
return not firstcoupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
DISCOUNT PRICE
DISCOUNT PRICE only if the person does NOT have a coupon, I do not care if it is a member or not. Do I want all the people with coupons to be upset?
logical_nand:
return not (first and second)coupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
DISCOUNT PRICE
REGULAR PRICE only if the person has a coupon AND is a member. I might already have a benefit I give to members and do not want to give discounts with that.
tautology:
return Truecoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
DISCOUNT PRICE
DISCOUNT PRICE always. I am always giving a discount, everybody loves me.
logical_disjunction:
return first or secondcoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
REGULAR PRICE
REGULAR PRICE only if the person does NOT have a coupon AND is NOT a member. The person has to be a member, have a coupon, or both to get the discount.
exclusive_disjunction:
return (not (first and second) and (first or second))coupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
REGULAR PRICE
REGULAR PRICE if the person has a coupon AND is a member
REGULAR PRICE if the person does NOT have a coupon AND is NOT a member
Why is “coupon AND member” the same as “no coupon AND not member”? I do not want a member to have a coupon and I do not want someone who is not a member and does not have a coupon.
material_non_implication:
return first and (not second)coupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
REGULAR PRICE
DISCOUNT PRICE only if the person has a coupon AND is NOT a member. A coupon for people that are not members.
project_first:
return firstcoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
REGULAR PRICE
DISCOUNT PRICE only if the person has a coupon, I do not care about if they are a member or NOT a member.
converse_implication:
return first or (not second)coupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
DISCOUNT PRICE
REGULAR PRICE only if the person does NOT have a coupon AND is a member.
negate_second:
return not secondcoupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
DISCOUNT PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
DISCOUNT PRICE
DISCOUNT PRICE only if the person is NOT a member, I do not care if they have a coupon or not. Why do I have coupons?
logical_nor:
return not (first or second)coupon (first)
member (second)
output
coupon
member
REGULAR PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
DISCOUNT PRICE
DISCOUNT PRICE only if the person does NOT have a coupon AND is NOT a member. Is it opposite day?
logical_equality:
return (not first or second) and (first or not second)coupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
REGULAR PRICE
no coupon
NOT a member
DISCOUNT PRICE
DISCOUNT PRICE if the person has a coupon AND is a member
DISCOUNT PRICE if the person does NOT have a coupon AND is NOT a member
this is just confusing, which meets both conditions?
material_implication:
return (not first) or secondcoupon (first)
member (second)
output
coupon
member
DISCOUNT PRICE
coupon
NOT a member
REGULAR PRICE
no coupon
member
DISCOUNT PRICE
no coupon
NOT a member
DISCOUNT PRICE
REGULAR PRICE if the person has a coupon AND NOT a member.
I do not need to know or memorize every operation, the only operations that I want in this case are:
logical_conjunction, if I give a DISCOUNT PRICE only if the person has a coupon AND is a member because I want to reward my most loyal customers.
material_non_implication, if I give a DISCOUNT PRICE to someone who has a coupon and is NOT a member. This could be a way to get people to become members though it is not as good as
project_second if I give a DISCOUNT PRICE only if the person is a member or
logical_disjunction, if I only charge a REGULAR PRICE to the person who does NOT have a coupon AND is not a member.
watering plants
if the inputs are
is the soil dry?
did it rain?
then the possible states for the inputs are
soil (first) |
rain (second) |
|---|---|
soil is dry |
it rained |
soil is dry |
NOT rain |
soil is wet |
it rained |
soil is wet |
NOT rain |
and the possible outputs are
WATER
DO NOT WATER
the truth table shows all the logically possible states of
contradiction:
return Falsesoil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
DO NOT WATER
DO NOT WATER always. I never water, survival of the fittest.
logical_conjunction:
return first and secondsoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
DO NOT WATER
WATER only if the soil is dry AND it rained. Why is the soil still dry after it rained?
project_second:
return secondsoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
DO NOT WATER
WATER only if it rained, I do not care if the soil is dry or if the soil is wet. Am I trying to make a swamp?
converse_non_implication:
return (not first) and secondsoil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
DO NOT WATER
WATER only if the soil is wet AND it rained. Maybe this is why all my plants die, I keep over watering them.
negate_first:
return not firstsoil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
WATER
WATER only if the soil is wet, I do not care if it rained or did NOT rain. I must really want a swamp.
logical_nand:
return not (first and second)soil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
WATER
DO NOT WATER only if the soil is dry AND it rained. Why do I water when the soil is wet and it rained?
tautology:
return Truesoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
WATER
WATER always.
logical_disjunction:
return first or secondsoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
DO NOT WATER
DO NOT WATER only if the soil is wet AND it did NOT rain. I pretty much always water unless the soil is wet and it did not rain.
exclusive_disjunction:
return (not (first and second) and (first or second))soil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
DO NOT WATER
DO NOT WATER if the soil is dry AND it rained
DO NOT WATER if the soil is wet AND it did NOT rain
material_non_implication:
return first and (not second)soil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
DO NOT WATER
WATER only if the soil is dry AND it did NOT rain. I think the plants might like this.
project_first:
return firstsoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
DO NOT WATER
WATER only if the soil is dry, I do not care if it rained or did NOT rain. Maybe there was not enough rain.
converse_implication:
return first or (not second)soil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
WATER
DO NOT WATER only if the soil is wet AND it rained. Too much water.
negate_second:
return not secondsoil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
WATER
WATER only if it did NOT rain, I do not care if the soil is dry or if the soil is wet.
logical_nor:
return not (first or second)soil (first)
rain (second)
output
soil is dry
it rained
DO NOT WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
WATER
WATER only if the soil is wet AND it did NOT rain. How did the soil get wet? Did I water it already and forget?
logical_equality:
return (not first or second) and (first or not second)soil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
DO NOT WATER
soil is wet
NOT rain
WATER
WATER if the soil is dry AND it rained
WATER if the soil is wet AND it did NOT rain
this could be ideal if I treat it as one or the other, but both things cannot be True at the same time
material_implication:
return (not first) or secondsoil (first)
rain (second)
output
soil is dry
it rained
WATER
soil is dry
NOT rain
DO NOT WATER
soil is wet
it rained
WATER
soil is wet
NOT rain
WATER
DO NOT WATER if the soil is dry AND it did NOT rain. I want to kill the plants.
I do not need to know or memorize every operation, the only operations that I want in this case are:
material_non_implication, if I WATER the plants only if the soil is dry AND it did NOT rain or
project_first if I WATER only if the soil is dry because I want the plants to stay wet
converse_implication to stop me from watering if the soil is wet AND it rained.
review
The truth table shows the possible states inputs can take and how they interact to give possible outputs. In most cases, I do not need to know all the operations. I only need to know the conditions for the problem I am solving, and remember that they can be made with some combination of NOT, AND and OR
The examples above show
-
output
motion, right code
motion, wrong code
no motion, right code
no motion, wrong code
operation
OFF
OFF
OFF
OFF
OFF
motion AND right code
ON
OFF
OFF
OFF
right code
ON
OFF
ON
OFF
no motion AND right code
OFF
OFF
ON
OFF
no motion
OFF
OFF
ON
ON
NOT (motion AND right code)
OFF
ON
ON
ON
ON
ON
ON
ON
ON
motion OR right code
ON
ON
ON
OFF
(NOT (motion AND right code)) AND (motion OR right code)
OFF
ON
ON
OFF
motion AND wrong code
OFF
ON
OFF
OFF
motion
ON
ON
OFF
OFF
motion OR wrong code
ON
ON
OFF
ON
wrong code
OFF
ON
OFF
ON
NOT (motion OR right code)
OFF
OFF
OFF
ON
(no motion OR right code) AND (motion OR wrong code)
ON
OFF
OFF
ON
no motion OR right code
ON
OFF
ON
ON
I can say this in English as
operation
rule
outputs OFF always, it does not care about the inputs
outputs ON only if there is motion AND the right code is entered
outputs ON only if the right code is entered
outputs ON only if there is no motion AND the right code is entered
outputs ON only if there is no motion, it does not care if the right code or wrong code was entered
outputs OFF only if there is motion AND the right code is entered.
outputs ON always, it does not care about the inputs
outputs OFF only if there is no motion AND the wrong code is entered
outputs OFF if there is motion AND the right code is entered, OR if there is no motion AND the wrong code is entered
outputs ON only if there is motion AND NOT the right code is entered
outputs ON only if there is motion, it does not care if the right code or wrong code was entered
outputs OFF if there is no motion AND the right code is entered
outputs ON only if the wrong code is entered
outputs ON only if there is no motion AND the wrong code is entered
outputs ON only if there is motion AND the right code is entered, AND if there is no motion AND the wrong code is entered
outputs OFF only if there is motion AND NOT the right code is entered.
-
output
strong option, strong fit
strong option, weak fit
weak option, strong fit
weak option, weak fit
operation
REJECT
REJECT
REJECT
REJECT
REJECT
strong option AND strong fit
HIRE
REJECT
REJECT
REJECT
strong fit
HIRE
REJECT
HIRE
REJECT
weak option AND strong fit
REJECT
REJECT
HIRE
REJECT
weak option
REJECT
REJECT
HIRE
HIRE
NOT (strong option AND strong fit)
REJECT
HIRE
HIRE
HIRE
HIRE
HIRE
HIRE
HIRE
HIRE
strong option OR strong fit
HIRE
HIRE
HIRE
REJECT
(NOT (strong option AND strong fit)) AND (strong option OR strong fit)
REJECT
HIRE
HIRE
REJECT
strong option AND weak fit
REJECT
HIRE
REJECT
REJECT
strong option
HIRE
HIRE
REJECT
REJECT
strong option OR weak fit
HIRE
HIRE
REJECT
HIRE
weak fit
REJECT
HIRE
REJECT
HIRE
NOT (strong option OR strong fit)
REJECT
REJECT
REJECT
HIRE
(weak option OR strong fit) AND (strong option OR weak fit)
HIRE
REJECT
REJECT
HIRE
weak option OR strong fit
HIRE
REJECT
HIRE
HIRE
I can say this in English as
operation
rule
always REJECT
HIRE only if it is a strong option AND it is a strong fit
HIRE only if it is a strong fit, I do not care if it is a strong option or weak option
HIRE only if it is a weak option AND it is a strong fit
HIRE only if it is a weak option, I do not care if it is a strong fit or weak fit
REJECT only if it is a strong option AND it is a strong fit
HIRE always, I do not care about the inputs
REJECT only if it is a weak option and NOT a strong fit
REJECT if it is a strong option AND it is a strong fit, OR if it is NOT a strong option AND NOT a strong fit
HIRE only if it is a strong option AND NOT a strong fit
HIRE only if it is a strong option, I do not care if it is a strong fit or weak fit
REJECT only if it is a weak option AND it is a strong fit
HIRE only if it is a weak fit, I do not care if it is a strong option or weak option
HIRE only if it is a weak option AND NOT a strong fit
HIRE only if it is a strong option AND it is a strong fit, AND if it is NOT a strong option AND NOT a strong fit
REJECT only if it is a strong option AND NOT a strong fit
-
output
coupon, member
coupon, NOT a member
no coupon, member
no coupon, NOT a member
operation
REGULAR PRICE
REGULAR PRICE
REGULAR PRICE
REGULAR PRICE
REGULAR PRICE
coupon AND member
DISCOUNT PRICE
REGULAR PRICE
REGULAR PRICE
REGULAR PRICE
member
DISCOUNT PRICE
REGULAR PRICE
DISCOUNT PRICE
REGULAR PRICE
no coupon AND member
REGULAR PRICE
REGULAR PRICE
DISCOUNT PRICE
REGULAR PRICE
no coupon
REGULAR PRICE
REGULAR PRICE
DISCOUNT PRICE
DISCOUNT PRICE
NOT (coupon AND member)
REGULAR PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
coupon OR member
DISCOUNT PRICE
DISCOUNT PRICE
DISCOUNT PRICE
REGULAR PRICE
(NOT (coupon AND member)) AND (coupon OR member)
REGULAR PRICE
DISCOUNT PRICE
DISCOUNT PRICE
REGULAR PRICE
coupon AND NOT a member
REGULAR PRICE
DISCOUNT PRICE
REGULAR PRICE
REGULAR PRICE
coupon
DISCOUNT PRICE
DISCOUNT PRICE
REGULAR PRICE
REGULAR PRICE
coupon OR NOT a member
DISCOUNT PRICE
DISCOUNT PRICE
REGULAR PRICE
DISCOUNT PRICE
NOT a member
REGULAR PRICE
DISCOUNT PRICE
REGULAR PRICE
DISCOUNT PRICE
NOT (coupon OR member)
REGULAR PRICE
REGULAR PRICE
REGULAR PRICE
DISCOUNT PRICE
(no coupon OR member) AND (coupon OR NOT a member)
DISCOUNT PRICE
REGULAR PRICE
REGULAR PRICE
DISCOUNT PRICE
no coupon OR member
DISCOUNT PRICE
REGULAR PRICE
DISCOUNT PRICE
DISCOUNT PRICE
I can say this in English as
operation
rule
REGULAR PRICE always
DISCOUNT PRICE only if the person has a coupon AND is a member
DISCOUNT PRICE only if the person is a member, I do not care if they have a coupon or no coupon
DISCOUNT PRICE only if the person does NOT have a coupon AND is a member
DISCOUNT PRICE only if the person does NOT have a coupon, I do not care if it is a member or not
REGULAR PRICE only if the person has a coupon AND is a member
DISCOUNT PRICE always
REGULAR PRICE only if the person does NOT have a coupon AND is NOT a member
REGULAR PRICE if the person has a coupon AND is a member, OR if the person does NOT have a coupon AND is NOT a member
DISCOUNT PRICE only if the person has a coupon AND is NOT a member
DISCOUNT PRICE only if the person has a coupon
REGULAR PRICE only if the person does NOT have a coupon AND is a member
DISCOUNT PRICE only if the person is NOT a member, I do not care if they have a coupon or not
DISCOUNT PRICE only if the person does NOT have a coupon AND is NOT a member
DISCOUNT PRICE if the person has a coupon AND is a member, AND if the person does NOT have a coupon AND is NOT a member
REGULAR PRICE if the person has a coupon AND NOT a member
-
output
soil is dry, it rained
soil is dry, NOT rain
soil is wet, it rained
soil is wet, NOT rain
operation
DO NOT WATER
DO NOT WATER
DO NOT WATER
DO NOT WATER
DO NOT WATER
soil is dry AND it rained
WATER
DO NOT WATER
DO NOT WATER
DO NOT WATER
it rained
WATER
DO NOT WATER
WATER
DO NOT WATER
soil is wet AND it rained
DO NOT WATER
DO NOT WATER
WATER
DO NOT WATER
soil is wet
DO NOT WATER
DO NOT WATER
WATER
WATER
NOT (soil is dry AND it rained)
DO NOT WATER
WATER
WATER
WATER
WATER
WATER
WATER
WATER
WATER
soil is dry OR it rained
WATER
WATER
WATER
DO NOT WATER
(NOT (soil is dry AND it rained)) AND (soil is dry OR it rained)
DO NOT WATER
WATER
WATER
DO NOT WATER
soil is dry AND NOT rain
DO NOT WATER
WATER
DO NOT WATER
DO NOT WATER
soil is dry
WATER
WATER
DO NOT WATER
DO NOT WATER
soil is dry OR NOT rain
WATER
WATER
DO NOT WATER
WATER
NOT rain
DO NOT WATER
WATER
DO NOT WATER
WATER
NOT (soil is dry OR it rained)
DO NOT WATER
DO NOT WATER
DO NOT WATER
WATER
(soil is wet OR it rained) AND (soil is dry OR NOT rain)
WATER
DO NOT WATER
DO NOT WATER
WATER
soil is wet OR it rained
WATER
DO NOT WATER
WATER
WATER
I can say this in English as
operation
rule
DO NOT WATER always
WATER only if the soil is dry AND it rained
WATER only if it rained, I do not care if the soil is dry or if the soil is wet
WATER only if the soil is wet AND it rained
WATER only if the soil is wet, I do not care if it rained or did NOT rain
DO NOT WATER only if the soil is dry AND it rained
WATER always
DO NOT WATER only if the soil is wet AND it did NOT rain
DO NOT WATER if the soil is dry AND it rained, OR if the soil is wet AND it did NOT rain
WATER only if the soil is dry AND it did NOT rain
WATER only if the soil is dry, I do not care if it rained or did NOT rain
DO NOT WATER only if the soil is wet AND it rained
WATER only if it did NOT rain, I do not care if the soil is dry or if the soil is wet
WATER only if the soil is wet AND it did NOT rain
WATER if the soil is dry AND it rained, AND if the soil is wet AND it did NOT rain
DO NOT WATER if the soil is dry AND it did NOT rain
what is next?
rate pumping python
If this has been a 7 star experience for you, please CLICK HERE to leave a 5 star review of pumping python. It helps other people get into the book too.