Why does 0 And 1 = 0?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Why does 0 And 1 = 0?

25b4a97a
Why does 0 And 1 = 0?

A pretty basic question, I know. But why? The book doesn't say why the Truth Table (Figure 1.1) produces the results in the far right column. Until I understand this, the rest of the book isn't going to make much sense.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why does 0 And 1 = 0?

ybakos
It's all about the basics of Boolean logic and Boolean algebra. For an approachable primer, check out the first few (very short) chapters of Code by Charles Petzold.

Or: Is the thing on the left true OR is the thing on the right true?
Example: If it is cold, OR if it is raining, you should put a coat on. (Do you put a coat on if it is cold? What if it is raining? What if it is both cold and raining? What if it is neither cold nor raining?)

And: Is the thing on the left true AND the thing on the right true?
Example: If it is lunch time, AND you are hungry, you should eat. (Do you eat if it is not lunch time and you are not hungry? What if it is lunch time and but you aren't hungry? What if it is lunch time and you are hungry?)

0 is false
1 is true
0 And 1 = 0, because the thing on the left AND the thing on the right are not both true.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why does 0 And 1 = 0?

25b4a97a
That explains it.
Many thanks.
Loading...