Skip to content
LearnTronics menu

LearnTronics

Boolean Logic — True/False Becomes 1/0

Tutorial Index

From True/False to 1/0

Now we make a small change in notation:

False = 0     True = 1

Nothing about the logic has changed. We have simply replaced words with two convenient symbols.

From words to symbols

This is the point where our study begins to move from verbal or philosophical logic into symbolic and mathematical logic. The ideas are the same; symbols let us write them more compactly and manipulate them much as we do equations.

Different books and fields use somewhat different symbols. A very common electronics / Boolean-algebra set is:

~A
NOT A
also written ¬A, A′, or A
A • B
A AND B
also written A·B, AB, or A ∧ B
A + B
A OR B
also written A ∨ B
A ⊕ B
A XOR B
exclusive OR

The line drawn over a letter is usually called an overbar (sometimes informally an overscore). Thus A means NOT A. Overbars are especially common in electronics drawings and Boolean algebra.

Grade-school arithmetic still helps — with one warning

AND behaves much like multiplication. If either factor is 0, the result is 0; only 1 AND 1 gives 1:

A • B    behaves like    A × B

OR is commonly written with a plus sign. That makes it look like addition, and the analogy is useful — but Boolean addition has its own rule:

0 + 0 = 0    0 + 1 = 1    1 + 0 = 1    1 + 1 = 1

So ordinary arithmetic still gives us a helpful mental framework, but this is Boolean algebra, not ordinary counting arithmetic.

XOR is even closer to addition when we only care whether the total is odd or even:

0 ⊕ 0 = 0    0 ⊕ 1 = 1    1 ⊕ 0 = 1    1 ⊕ 1 = 0

This is the same pattern as addition modulo 2.

Another way to think of it

Instead of writing “switch closed = true,” we can choose to represent that state with a 1. “Switch open = false” can be represented with a 0. Later an electronic circuit may use voltage levels to represent the same two logical states.

Boolean examples

ABA AND BA OR B
0000
0101
1001
1111

George Boole

George Boole developed an algebraic approach to logic in the 19th century. His The Mathematical Analysis of Logic appeared in 1847, followed by The Laws of Thought in 1854. The great practical surprise came later: logical algebra turned out to fit two-state electrical switching remarkably well.

Worked expression

Let A = 1 and B = 0. In words:

Y = A AND (NOT B)

Using Boolean symbols, the same statement can be written:

Y = A • ~B

or, using an overbar for NOT:

Y = A • B

Since B = 0, NOT B = 1:

Y = 1 • 1 = 1

A caution about 1 and 0

In digital electronics, 1 and 0 are logical states. They are not automatically the literal voltages 1 volt and 0 volts. A particular logic family defines which voltage ranges count as LOW and HIGH.

Try these yourself

In our beginner Boolean convention, True is represented by:
We will use 1 for True and 0 for False.
If A = 1 and B = 0, what is A AND B?
AND requires both inputs to be 1.
If A = 1, what is NOT A?
NOT reverses the Boolean state: NOT 1 = 0.
Which expression means “A AND NOT B”?
The dot means AND and the tilde means NOT, so A • ~B reads “A AND NOT B.”