Often a question will say whether each input is true or false and then ask you to evaluate the overall output and come up with a single true or false answer. In this case, let’s try evaluating the answer for:
x = true, y = false, z = true
Sponsored Links
The brackets work the normal way – you start from the expression inside the innermost brackets and work your way outwards. The one becomes , which we know is false – .
The expression becomes . This is an OR statement, so if any of the statements are true, then the whole thing is true. In this case we’ve got two true statements in it, so the whole thing becomes true – .
The is an AND statement. This means that all the statements have to be true for the whole thing to be true. Otherwise the whole thing is false. In this case, we’ve got – all the elements are true. So the whole thing is going to be true – . So we can simplify it a bit down to this:
Now there are only a couple more steps. First simplify the bit inside the left brackets. We’ve got . Since there are no brackets around this, we can do it in any order, I’m going to do it from left to right. So first the bit – this is an AND connector, so the outcome is false. So we get:
Now we deal with the second AND statement – the outcome of this is false as well:
So that’s simplified the left square brackets down to a single ‘false’. We’ve got one last step:
This is an OR statement, so we only need one of the statements to be true for the whole thing to be true. So the overall answer is ‘true’:
Here’s a summary of how it went down: