Boolean Expressions
24. End of Chapter
Answer:
Yes. The fragments are equivalent, although the first fragment is easiest to read.
End of Chapter
End of Chapter
You have reached the end of this chapter. If (you are a good student) or (you are interested) you may wish to review the following.
- relational expression Relational expressions.
- logical operator Logical operators.
- and operator AND Operator, &&.
- range testing Checking that numbers are in a specified range.
- logical operator, using Writing complete boolean expressions.
- or operator OR Operator, ||.
- truth table Comparison between AND and OR.
- not operator The NOT operator !