Proving 0 is false and 1 is true with AND(), in Excel

# Proving 0 is false and 1 is true with AND(), in Excel

Proving 0 is false and 1 is true with AND(), in Excel.

This quick lesson shows you how to prove 0 is false and 1 is true, in Excel.

## Overview

So, to prove 0 is false and 1 is true, we will use the AND() function. In Excel, AND() is a logical function. In essence, a logical function returns either true or false. Therefore, let’s test it out.

### Steps to prove 0 is false and 1 is true with AND(), in Excel

Follow the steps below in proving 0 is false and 1 is true with AND(), in Excel.

#### Step 1: Testing 0 for false

To test 0 for false, we will use the AND(0) function.

1. Start a new sheet, and in a blank cell, enter the following formula:
=AND(0)
Press Enter.

When we use the AND() function to test 0, it returns false.

#### Step 2: Testing 0 for true

To test 1 for true, we will use the AND(1) function.

1. In a blank cell, enter the following formula:
=AND(1)
Press Enter.

So, when we test AND(1), it returns true.

### Summary of the results

As you see, when you test 0 for false, the result is false. And, when you test 1 for true, the result is true. Therefore, our proof holds true for both conditions.

Because the inside of a computer works on 0’s and 1’s, we think it was a good way to show you the logic. On the outside of the computer, we see true or false. Essentially, as you see, it is the same thing. Now, you can use it in practice.

#### Understanding AND()

In high school, you may have heard your teacher ask, what is 4 and 5. What they were saying is, what is 4 multiplied by 5. Or, what is 4 times 5, which is 20. In computing, we write it as 4 * 5.

So, think of AND() as if you are multiplying numbers or results. Anything result that is not equal to 0 is true.

Let’s look at some examples, using 0’s and 1’s:

• 0 * 0 = 0
• 1 * 0 = 0
• 0 * 1 = 0
• 1 * 1 = 1

Remember, in computing, 0 is false and 1 is true. Thus, let’s test the same proof using true and false.

• false * false = false
• true * false = false
• false * true = false
• true * true = true

Likewise, the above results can be tested in Excel. Again, using the AND() function, you can do something like =AND(0, 1) or =AND(false, true). Hence, they both return false.

Going forward in your computing, it is suggested to use the literals true and false, instead of 0 and 1.

#### Some practical examples

Here are some real world examples. Basically, we are checking if a username and password is valid.