Writing a simple logical statement (True/False)

In Microsoft Excel, when you use the logical functions AND and/or OR inside a SUM+IF statement to test a range for more than one condition, it may not work as expected. A nested IF statement provides this functionality

TRUE*TRUE=1
TRUE*FALSE=0
FALSE*TRUE=0
FALSE*FALSE=0