Logic circuits · Circuits logiques
| English | Français |
|---|---|
| logic circuit/ˈlɒdʒɪk ˈsɜːkɪt/ | circuit logique |
| Boolean expression/ˈbuːlɪən ekˈspreʃn/ | expression booléenne |
| problem statement/ˈprɒbləm ˈsteɪtmənt/ | énoncé du problème |
| truth table/truːθ ˈteɪbl/ | table de vérité |
| sum of products/sʌm ɒv ˈprɒdʌkts/ | somme de produits |
| half adder/hɑːf ˈædə/ | demi-additionneur |
Three sensors, two gates, one decision
- A microwave oven heats only when the door is closed and the start button has been pressed and the timer has not reached zero.
- Three sensors give three 0/1 signals. Two AND gates combine them into one signal that switches the magnetron. Open the door and the output drops to 0 at once.
- Every safety interlock, every alarm and every processor instruction is a decision like this, built from the six gates of the last lesson.
- This lesson is about building and reading those circuits, and moving between the four ways of writing the same decision.
Trois capteurs, deux portes, une décision
- Un four à micro-ondes chauffe uniquement si la porte est fermée et que le bouton de démarrage a été pressé et que le minuteur n'a pas atteint zéro.
- Trois capteurs donnent trois signaux 0/1. Deux portes AND les combinent en un seul signal qui active le magnétron. Ouvrir la porte fait chuter la sortie à 0 instantanément.
- Chaque verrouillage de sécurité, chaque alarme et chaque instruction de processeur est une décision comme celle-ci, construite à partir des six portes de la leçon précédente.
- Cette leçon traite de la construction et de la lecture de ces circuits, et du passage entre les quatre manières d'écrire la même décision.
Four views of one function
- A logic circuit 逻辑电路 is a network of gates that carries out a Boolean expression 布尔表达式.
- The same function can be written as a problem statement 问题陈述 in English, as an expression, as a circuit diagram, or as a truth table 真值表. The exam asks you to move in every direction between them.
- The paper writes expressions in words,
X = (A AND NOT B) OR (B AND C), and accepts the algebraic form $X = A\overline{B} + BC$, where a dot or nothing is AND, a plus is OR and a bar is NOT. Use whichever the question uses.
Gates wired together to carry out one Boolean expression
Quatre vues d'une même fonction
- Un circuit logique 逻辑电路 est un réseau de portes qui exécute une expression booléenne 布尔表达式.
- La même fonction peut être écrite comme un énoncé de problème 问题陈述 en anglais, comme une expression, comme un schéma de circuit, ou comme une table de vérité 真值表. L'examen vous demande de passer dans toutes les directions entre eux.
- Le sujet écrit les expressions en mots,
X = (A AND NOT B) OR (B AND C), et accepte la forme algébrique $X = A\overline{B} + BC$, où un point ou rien signifie AND, un plus signifie OR et une barre signifie NOT. Utilisez celle que la question utilise.

Portes câblées ensemble pour exécuter une expression booléenne
Expression to circuit
- Draw one gate per operator, starting from the innermost brackets.
- For
X = (A AND B) OR (NOT C): an AND gate on A and B, a NOT gate on the C wire, and an OR gate combining the two results. - Inputs on the left, the single output on the right, every line ending at a gate input or the output, and the output labelled X.
One gate for each operator in the expression
Expression vers circuit
- Dessinez une porte par opérateur, en commençant par les parenthèses les plus internes.
- Pour
X = (A AND B) OR (NOT C): une porte AND sur A et B, une porte NOT sur le fil C, et une porte OR combinant les deux résultats. - Entrées à gauche, unique sortie à droite, chaque ligne finissant à une entrée de porte ou à la sortie, et la sortie étiquetée X.

Une porte pour chaque opérateur dans l'expression
Logic circuits · Circuits logiques
gates combine into circuits · les portes s'assemblent en circuits
Each gate has a fixed rule; chaining them builds every circuit — start with one gate. · Chaque porte a une règle fixe ; les chaîner construit tous les circuits — commencez par une porte.
For · Pour $X = (A \cdot B) + \overline{C}$ with $A=1, B=1, C=1$, what is $X$? · Pour $X = (A \cdot B) + \overline{C}$ avec $A=1, B=1, C=1$, que vaut $X$ ?
$A \cdot B = 1$, and $\overline{C} = 0$. $X = 1 + 0 = 1$. · $A \cdot B = 1$, et $\overline{C} = 0$. $X = 1 + 0 = 1$.
Worked example: circuit to expression
- Work forwards from the inputs and label every intermediate output.
- In the circuit below, B passes through a NOT gate. A and NOT B feed an AND gate: call its output P, so
P = A AND NOT B. B and C feed a second AND gate:Q = B AND C. - P and Q feed the OR gate, so
X = P OR Q = (A AND NOT B) OR (B AND C). - Labelling P and Q is not decoration. It is what lets you fill the truth table one gate at a time.
Label every intermediate output before you write the expression
Exemple résolu : circuit vers expression
- Travaillez vers l'avant depuis les entrées et étiquetez chaque sortie intermédiaire.
- Dans le circuit ci-dessous, B passe par une porte NOT. A et NOT B alimentent une porte AND : appelons sa sortie P, donc
P = A AND NOT B. B et C alimentent une deuxième porte AND :Q = B AND C. - P et Q alimentent la porte OU, donc
X = P OR Q = (A AND NOT B) OR (B AND C). - Étiqueter P et Q n'est pas décoratif. C'est ce qui permet de remplir la table de vérité porte par porte.

Étiquetez chaque sortie intermédiaire avant d'écrire l'expression
In the worked circuit, the second AND gate's output is Q = B AND ____. · Dans le circuit résolu, la sortie du deuxième port AND est Q = B ET ____.
B and C feed the lower AND gate. Labelling that output Q lets the truth table be filled one gate at a time. · B et C alimentent le port AND inférieur. Étiqueter cette sortie Q permet de remplir la table de vérité porte par porte.
Circuit to truth table
- For $n$ inputs there are $2^{n}$ rows: two inputs give 4, three give 8, four give 16. List them in binary counting order.
- Give the table a column for each intermediate output as well as the final one, so every row is checked one gate at a time.
- Fill the columns left to right: first the NOT, then each AND, then the OR.
Circuit vers table de vérité
- Pour $n$ entrées, il y a $2^{n}$ lignes : deux entrées donnent 4, trois donnent 8, quatre donnent 16. Énumérez-les par ordre de comptage binaire.
- Donnez à la table une colonne pour chaque sortie intermédiaire ainsi que la finale, afin que chaque ligne soit vérifiée porte par porte.
- Remplissez les colonnes de gauche à droite : d'abord NOT, puis chaque AND, ensuite OR.
How many rows does a truth table have for a circuit with 3 inputs? · Combien de lignes contient une table de vérité pour un circuit à 3 entrées ?
$2^n$ rows; for 3 inputs, $2^3 = 8$. · $2^n$ lignes ; pour 3 entrées, $2^3 = 8$.
How many rows for 4 inputs? · Combien de lignes pour 4 entrées ?
$2^4 = 16$ rows. · $2^4 = 16$ lignes.
Worked example: the eight rows
- The circuit from the worked example above, with columns for NOT B, P, Q and X:
| A | B | C | NOT B | P | Q | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 | 1 |
- X is 1 in four of the eight rows. Check any one against the expression: row 1 0 0 has A = 1 and NOT B = 1, so P = 1, so X = 1.
Exemple résolu : les huit lignes
- Le circuit de l'exemple résolu ci-dessus, avec des colonnes pour NOT B, P, Q et X :
| A | B | C | NOT B | P | Q | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 | 1 |
- X vaut 1 dans quatre des huit lignes. Vérifiez une seule contre l'expression : la ligne 1 0 0 a A = 1 et NOT B = 1, donc P = 1, donc X = 1.
For · Pour X = (A AND NOT B) OR (B AND C), which of these input rows give X = 1? Select all · tout that apply. · Pour X = (A AND NOT B) OR (B AND C), quelles lignes d'entrée donnent X = 1 ? Sélectionnez toutes celles qui s'appliquent.
Row 011 makes Q = 1; row 100 makes P = 1. In row 110, B = 1 kills P and C = 0 kills Q; in row 001 both terms are 0. · La ligne 011 fait Q = 1 ; la ligne 100 fait P = 1. Dans la ligne 110, B = 1 annule P et C = 0 annule Q ; dans la ligne 001, les deux termes valent 0.
Truth table to expression: sum of products
- Sum of products 积之和: for each row whose output is 1, write an AND of the inputs, putting NOT on any input that is 0 in that row. Then OR those terms together.
- A table that is 1 only on (A = 0, B = 1) and (A = 1, B = 0) gives
(NOT A AND B) OR (A AND NOT B), which is exactly A XOR B. - Simplify only if the question asks; the unsimplified sum of products earns the marks.
Table de vérité vers expression : somme de produits
- Somme de produits 积之和 : pour chaque ligne dont la sortie est 1, écrivez un AND des entrées, en plaçant NOT sur toute entrée valant 0 dans cette ligne. Ensuite, ORez ces termes ensemble.
- Une table qui vaut 1 uniquement sur (A = 0, B = 1) et (A = 1, B = 0) donne
(NOT A AND B) OR (A AND NOT B), ce qui est exactement A XOR B. - Simplifiez uniquement si la question le demande ; la somme de produits non simplifiée rapporte les points.
In the sum-of-products method, for each row whose output is 1 you write: · Dans la méthode somme-de-produits, pour chaque ligne dont la sortie est 1, vous écrivez :
Each 1-row becomes an AND term (NOT the 0 inputs); you then OR all those terms together. · Chaque ligne 1 devient un terme ET (NON pour les entrées 0) ; vous ensuite OU tous ces termes ensemble.
In sum-of-products, you OR together one AND-term for every row whose output is 1. · En somme-de-produits, vous OU ensemble un terme ET pour chaque ligne dont la sortie est 1.
Each output-1 row becomes an AND term (NOT-ing the 0 inputs); ORing those terms gives an expression that is 1 on exactly those rows. · Chaque ligne de sortie 1 devient un terme ET (NON pour les entrées 0) ; l'OR de ces termes donne une expression qui vaut 1 exactement sur ces lignes.
The half adder
- Adding two bits gives a sum bit and a carry bit: 1 + 1 = 10 in binary.
- The sum column is 0, 1, 1, 0, which is XOR. The carry column is 0, 0, 0, 1, which is AND. Two gates make a half adder 半加器.
- It is the standard example of reading gates straight off a truth table, and the first piece of every processor's arithmetic unit.
Each input pair flows through the gates: XOR gives the sum, AND gives the carry, so 1 + 1 = 10
L'additionneur demi
- Additionner deux bits donne un bit de somme et un bit de retenue : 1 + 1 = 10 en binaire.
- La colonne somme est 0, 1, 1, 0, ce qui est XOR. La colonne retenue est 0, 0, 0, 1, ce qui est AND. Deux portes font un additionneur demi 半加器.
- C'est l'exemple standard de lecture de portes directement depuis une table de vérité, et la première pièce de l'unité arithmétique de tout processeur.
Chaque paire d'entrées traverse les portes : XOR donne la somme, AND donne la retenue, donc 1 + 1 = 10
Half adder · Additionneur partiel
Wire XOR and AND to the same two inputs: XOR gives the sum bit, AND gives the carry. Click A and B. · Reliez XOR et AND aux mêmes deux entrées : XOR donne le bit de somme, AND donne la retenue. Cliquez sur A et B.
In a half adder, which gate produces the carry bit? · Dans un additionneur partiel, quelle porte produit le bit de retenue ?
The carry is 1 only when both bits are 1, which is AND. The sum is 1 when the bits differ, which is XOR. · La retenue vaut 1 uniquement si les deux bits valent 1, ce qui correspond à AND. La somme vaut 1 si les bits diffèrent, ce qui correspond à XOR.
From a problem statement
- Turn the English into Boolean one clause at a time before drawing anything.
- "A and B" is
A AND B. "A or B, or both" isA OR B. "exactly one of A and B" isA XOR B. - "neither A nor B" is
A NOR B. "not both" isA NAND B. "unless" usually means AND NOT.
D'un énoncé de problème
- Transformez l'anglais en booléen une clause à la fois avant de dessiner quoi que ce soit.
- "A and B" est
A AND B. "A or B, or both" estA OR B. "exactly one of A and B" estA XOR B. - "neither A nor B" est
A NOR B. "not both" estA NAND B. "unless" signifie généralement AND NOT.
Match each English phrase to the single gate that implements it. · Associez chaque phrase anglaise au port unique qui l'implémente.
both = AND, differ = XOR, neither = NOR, not-both = NAND.
Worked example: a machine alarm
- An alarm X sounds when the guard is open (A = 1) and either the motor is running (B = 1) or the temperature is high (C = 1).
- "Either B or C" is
B OR C. "A and that" isX = A AND (B OR C). The brackets around the OR are essential. - X = 1 needs A = 1 and at least one of B, C equal to 1: the rows (1, 0, 1), (1, 1, 0) and (1, 1, 1). Three rows out of eight, and A = 0 can never sound the alarm.
- The circuit is one OR gate on B and C feeding one AND gate with A.
Exemple résolu : alarme de machine
- Une alarme X sonne quand le garde est ouvert (A = 1) and soit le moteur tourne (B = 1) soit la température est élevée (C = 1).
- "Either B or C" est
B OR C. "A and that" estX = A AND (B OR C). Les parenthèses autour de OR sont essentielles. - X = 1 nécessite A = 1 et au moins un de B, C égal à 1 : les lignes (1, 0, 1), (1, 1, 0) et (1, 1, 1). Trois lignes sur huit, et A = 0 ne peut jamais déclencher l'alarme.
- Le circuit est une porte OR sur B et C alimentant une porte AND avec A.
For the alarm X = A AND (B OR C), the alarm can sound when A = 0 provided both B and C are 1. · Pour l'alarme X = A AND (B OR C), l'alarme peut sonner quand A = 0 à condition que B et C soient tous deux égaux à 1.
The AND with A means A = 1 is required in every row where X = 1. With A = 0 the output is 0 whatever B and C do. · L'AND avec A signifie que A = 1 est requis dans chaque ligne où X = 1. Avec A = 0, la sortie vaut 0 peu importe B et C.
Marks that slip away
A AND B OR Cwithout brackets is ambiguous, and the examiner reads it as you did not intend. Bracket the OR before ANDing it.- A wire that goes nowhere, or an output with no label, loses the circuit mark even when the gates are right.
- A NOT on an input is a gate on the diagram, not a bar written over the letter.
- Three inputs mean eight rows. A table with fewer rows cannot be marked as complete.
Pièges qui font perdre des points
A AND B OR Csans parenthèses est ambigu, et l'examinateur lit cela comme si vous ne l'aviez pas intentionné. Mettez des parenthèses autour de OR avant de l'ANDer.- Un fil qui ne va nulle part, ou une sortie sans étiquette, fait perdre le point de circuit même si les portes sont correctes.
- Un NOT sur une entrée est une porte sur le diagramme, pas une barre écrite au-dessus de la lettre.
- Trois entrées signifient huit lignes. Un tableau avec moins de lignes ne peut pas être noté comme complet.
You've got it
- expression → circuit: one gate per operator, innermost brackets first, inputs left, labelled output right
- circuit → expression: label each intermediate output (P, Q) and combine; circuit → truth table: $2^{n}$ rows with a column per gate
- truth table → expression: sum of products, one AND-term per output-1 row, ORed together; XOR + AND make the half adder
- problem → Boolean: exactly one = XOR, neither = NOR, not both = NAND; bracket the OR inside an AND
Vous avez compris
- expression → circuit : une porte par opérateur, parenthèses internes en premier, entrées à gauche, sortie étiquetée à droite
- circuit → expression : étiquetez chaque sortie intermédiaire (P, Q) et combinez ; circuit → table de vérité : $2^{n}$ lignes avec une colonne par porte
- table de vérité → expression : somme de produits, un terme AND par ligne sortie-1, ORés ensemble ; XOR + AND font l'additionneur demi
- problème → booléen : exactly one = XOR, neither = NOR, not both = NAND ; mettez des parenthèses autour de OR à l'intérieur d'un AND