Is there an easy way to learn truth tables?

Keva161 picture Keva161 · Jan 8, 2012 · Viewed 9.1k times · Source

I'm following an online tutorial for Ruby and I'm at a point where it's mentioning truth tables and how I need to learn them before proceeding.

Is there an easy way to learn them? Do I just need to learn what constitutes as true and false?

Answer

DigitalRoss picture DigitalRoss · Jan 8, 2012

Do not memorize truth tables

What's important is understanding the functions that are used to compute truth tables. When you understand the functions the truth tables will be obvious.

A OR  B: Either A or B    # cream OR sugar, T if either (or both), F if neither
A AND B: Both A and B     # cream AND sugar, T only when the coffee has both
A XOR B: One but not both # T only if sugar but no cream or if cream but no sugar
NOT   A: Kind of obvious  # NOT sugar, true if the tea has no sugar

A NAND B: NOT (A AND B)   # T unless both cream and sugar are in the tea
A NOR  B: NOT (A OR B)    # T only if there is no sugar and also no cream