ELI5: Explain Like I'm 5

True and false (commands)

When you want to tell the computer what to do, you use special words called commands. One common type of command is to ask the computer a question and have it answer true or false.

Now, true and false are like two opposite answers to a question. If someone asks you if you like cake and you say "yes", that's like saying true, because it's a true statement. If you say "no", that's like saying false, because it's not true.

Similarly, when you give a true or false command to a computer, you are asking it to check something and tell you if it's true or false. For example, you might ask the computer if 2 plus 2 equals 4, and it would say "true" because it is a true statement. Or, you might ask if a certain word is spelled correctly, and if it is, the computer would say "true" but if it's not, it would say "false."

So, true and false commands are really just a way for the computer to answer questions and tell us whether something is true or not.
Related topics others have asked about: