Logic, Computing, and Electronics

Introduction

Logic

Logic, derived from the Greek word logos meaning “word,” “proposition,” or “reason,” is a branch of philosophy studying the formal principles of human knowledge. It focuses on the validity of reasoning and arguments, aiming to determine the conditions under which a conclusion can be justifiably derived from given propositions (premises). Logical validity depends on the relationship between premises and conclusion: if the premises are true, the conclusion must also be true. Logic analyzes the structure and truth value of propositions and their classifications.

Logic Over Time

Throughout history, logic has evolved through two major stages:

Aristotelian Logic

Classical (or traditional) logic, first articulated by Aristotle, established rules for syllogistic reasoning. A syllogism is a proposition composed of four possible statements: “All A is B” (universal affirmative), “No A is B” (universal negative), “Some A is B” (particular affirmative), or “Some A is not B” (particular negative). Letters replace common words (e.g., “dog,” “four-legged animal”) called the “terms” of the syllogism. A well-formed syllogism has two premises and a conclusion, each premise sharing a term with the conclusion and another term with the other premise. Classical logic defines rules to identify valid and invalid syllogisms.

Modern Logic

In the mid-19th century, George Boole and Augustus De Morgan pioneered symbolic (or modern) logic, further developed by Gottlob Frege, Bertrand Russell, and Alfred North Whitehead (Principia Mathematica, 1910-1913). Modern logic encompasses a broader range of arguments than syllogistic logic, using symbols for phrases and conjunctions (e.g., “or,” “and,” “if…then…”). It also differs from classical logic in its existential assumptions. “All A is B” in modern logic translates to “If something is A, then it is B,” which doesn’t assume the existence of A, unlike traditional logic. Juan David Garcia Bacca’s Introduction to Modern Logic (1936) was the first Spanish textbook on formal logic.

Both classical and modern logic primarily employ deductive reasoning, where the conclusion’s truth is guaranteed by the truth of the premises. Inductive logic, where premises provide evidence for a probable conclusion, has also been explored, notably by John Stuart Mill (System of Logic, 1843). This led to the 20th-century field of philosophy of science, closely related to probability theory.

Traditional logic assumes propositions are either true or false. More recently, multi-valued logics have emerged, where propositions can have values beyond true or false (e.g., a neutral third value, or probabilities). Modal logic explores relations between possibility, impossibility, necessity, and contingency, while deontic logic investigates relationships between commands and obligations.

Logic in Electronics and Computing

Logic is applied in electronics through logic gates, which rely on Boolean algebra. Boolean algebra, named after George Boole, defines logical operations (AND, OR, NOT) within a binary system (0 and 1).

A logic gate is an electronic device representing a Boolean operator. These integrated circuits on a chip form the basis of computers, consoles, mobile phones, and other electronic devices. Common logic gates include AND, OR, NOT, and XOR.

Types of Logic Gates

AND Gate

The AND gate performs the logical product (ยท), often omitted (e.g., AB reads “A and B”). It outputs 1 only if all inputs are 1.

AND Gate Truth Table
Input AInput BOutput AB
000
010
100
111

OR Gate

The OR gate performs the logical sum (+, e.g., A + B reads “A or B”). It outputs 1 if at least one input is 1.

OR Gate Truth Table
Input AInput BOutput A + B
000
011
101
111

XOR Gate

The XOR (exclusive-OR) gate performs A’B + AB’. It outputs 1 if inputs are different (0 and 1, or 1 and 0).

XOR Gate Truth Table
Input AInput BOutput AB
000
011
101
110

NOT Gate

The NOT gate performs logical inversion. It outputs the opposite of its input.

NOT Gate Truth Table
Input AOutput
01
10

Other Logic Gates

Other gates provide inverted functions:

  • NAND: Inverted AND (outputs 0 only if all inputs are 1).
  • NOR: Inverted OR (outputs 1 only if all inputs are 0).
  • XNOR: Inverted XOR (outputs 1 if both inputs are equal).