Basic Logic

Wed, Aug 12, 2009

Tutorial

The modern computer is perhaps one of the most complex and perplexing yet ever so simple creations known. The entire personal computer only knows of two numbers – zero and one. Everything you see or do is simply an abstraction. These ones and zeros are called binary and are used to perform logical operations. The six logic operations, conjunction, disjunction, implication, equality, and exclusive disjunction, are outlined below. Their symbols are ¬ (~), ∧ (&, .), ∨ (||, +), →, ≡, and ⊕ respectively.

Negation

A NOT A
1 0
0 1

Conjunction

A B A AND B
1 1 1
1 0 0
0 1 0
0 0 0

Disjunction

A B A OR B
1 1 1
1 0 1
0 1 1
0 0 0

Implication

A B A IMPLIES B
1 1 1
1 0 0
0 1 1
0 0 1

Equality

A B A EQUALS B
1 1 1
1 0 0
0 1 0
0 0 1

Exclusive Disjunction

A B A XOR B
1 1 0
1 0 1
0 1 1
0 0 0

Using these six operations, you can do everything a computer can do. Don’t believe me? Be sure to read my follow up articles.


One Response to “Basic Logic”