LearnTronics
Logic Before Electronics
Logic before logic gates
Before we draw an AND gate or talk about ones and zeros, it helps to understand what logic is doing in ordinary language.
Start with a statement
A statement (often called a proposition) is a sentence that makes a claim which can be considered true or false.
“The lamp is on.” is a statement. “Is the lamp on?” is a question. “Turn the lamp on.” is a command. Logic treats those differently.
Quantifier, subject, and predicate
When we begin building categorical statements for syllogisms, it is useful to separate a statement into three parts:
| Part | What it tells us | Example |
|---|---|---|
| Quantifier | How much of the subject group is being discussed | All, No, Some |
| Subject | The person, thing, or class we are talking about | resistors |
| Predicate | What we are saying about the subject | are electrical components |
Quantifier Subject Predicate
The quantifier is especially important when reasoning about classes of things. All makes a universal claim, no makes a universal negative claim, and some means at least one member of the group.
| Form | Example |
|---|---|
| All S are P | All LEDs are semiconductor devices. |
| No S are P | No open switches are closed switches. |
| Some S are P | Some capacitors are polarized. |
| Some S are not P | Some capacitors are not polarized. |
Not every ordinary statement contains an explicit quantifier. “The lamp is on” and “Socrates is a person” are singular statements about one particular thing or person. But when we construct categorical syllogisms, recognizing the quantifier, subject, and predicate makes the logical form much easier to see.
Premises, conclusions, and the syllogism
An argument begins with one or more premises and asks what conclusion follows from them.
The familiar example below is a syllogism: a deductive argument in which two premises are arranged so that a conclusion follows from their relationship.
Socrates is a person. ← premise
Therefore, Socrates is mortal. ← conclusion
The important point is the form: if the premises are true and the form is valid, the conclusion must follow.
The three terms in a categorical syllogism
A traditional categorical syllogism uses exactly three terms. One appears only in the conclusion as its subject, one appears only in the conclusion as its predicate, and one links the two premises but disappears from the conclusion.
| Term | Job | In the example below |
|---|---|---|
| Minor term | Subject of the conclusion | Greeks |
| Major term | Predicate of the conclusion | mortal |
| Middle term | Connects the premises; does not appear in the conclusion | humans |
All Greeks are humans.
Therefore, all Greeks are mortal.
Here, humans is the middle term. It provides the bridge between Greeks and mortal, then disappears from the conclusion.
Build a syllogism step by step
Write it as a subject and predicate: S is P, or in a categorical form such as All S are P.
The middle term, M, must connect the subject of the conclusion to its predicate.
Connect the middle term to the predicate: All M are P.
Connect the subject to the middle term: All S are M.
If the form is valid, the bridge through M allows: Therefore, all S are P.
All S are M.
Therefore, all S are P.
An electronics example
All 1N4148 diodes are silicon diodes.
Therefore, all 1N4148 diodes are semiconductor devices.
Do not merely make the sentences sound related
A valid syllogism depends on the relationship of the terms, not on the sentences sounding reasonable. For example:
All resistors are electronic components.
Therefore, all resistors are transistors.
That conclusion does not follow. “Electronic components” appears in both premises, but it does not create the necessary bridge. Two different groups can both belong to a larger group without being the same group.
Another way to think of this
An electrician troubleshoots this way all the time:
“If the supply is present, the fuse is good, the switch is closed, the wiring is intact, and the lamp is good, then the lamp should light.”
That is already a logical statement built from several conditions. Later we will turn those words into switches and then into logic gates.
Truth is not the same thing as validity
A premise can be wrong even when the form of an argument is valid. Logic tells us what follows if the premises are accepted. It does not magically guarantee that the premises describe the real world correctly.
As programmers often say: “Garbage in — garbage out.” Perfect reasoning applied to bad starting information can still produce a useless result.
A little history
People were reasoning, arguing, and trying to describe good reasoning long before Aristotle. Earlier Greek thinkers had already examined argument, proof, contradiction, and methods of debate.
Aristotle (384–322 BC), however, is generally credited with giving deductive reasoning its first systematic formal treatment. His study of the syllogism showed that an argument could be judged by its form: certain conclusions follow necessarily when the premises have the proper relationship. His logical works became the foundation for the formal study of logic for many centuries.
Try these yourself
A little deeper
In modern symbolic logic, a simple statement is often represented by a letter such as A or B. Instead of repeatedly writing “the motor is running,” we can simply let A mean “the motor is running.” Then we can study how statements combine without being distracted by the subject matter.