Logic gates · Portas lógicas
| English | Português |
|---|---|
| Boolean logic/ˈbuːlɪən ˈlɒdʒɪk/ | Lógica booleana |
| logic gate/ˈlɒdʒɪk ɡeɪt/ | porta lógica |
| truth table/truːθ ˈteɪbl/ | tabela-verdade |
| inverted/ɪnˈvɜːtɪd/ | invertida |
The building blocks of circuits
- Boolean logic 布尔逻辑 works with values that are true (1) or false (0).
- A logic gate 逻辑门 takes inputs and gives one output by a fixed rule.
- A truth table 真值表 lists every input combination and its output.
Os blocos construtivos dos circuitos
- A lógica booleana 布尔逻辑 opera com valores que são verdadeiro (1) ou falso (0).
- Uma porta lógica 逻辑门 recebe entradas e produz uma saída por uma regra fixa.
- Uma tabela-verdade 真值表 lista cada combinação de entrada e sua respectiva saída.
The six gates
- You must know six: NOT, AND, OR, NAND, NOR, XOR.
- NOT has one input; the rest have two. A small circle on the output means inverted 取反 (NOT, NAND, NOR).
AND outputs 1 only when both inputs are 1
As seis portas
- Você deve conhecer seis: NOT, AND, OR, NAND, NOR, XOR.
- NOT tem uma entrada; as demais têm duas. Um pequeno círculo na saída indica inversão 取反 (NOT, NAND, NOR).


AND outputa 1 apenas quando ambas as entradas são 1
Logic gates · Portas lógicas
output from the truth table · saída da tabela-verdade
Toggle A and B through each gate and read the result off the truth table. · Alternar A e B através de cada porta e ler o resultado na tabela-verdade.
NOT, AND, OR
- NOT reverses the input. AND is 1 only when both inputs are 1. OR is 1 when at least one input is 1.
| A | B | A AND B | A OR B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
(NOT: 0→1, 1→0.)
A real logic chip: inside are logic gates like the ones on this page
NOT, AND, OR
- NOT inverte a entrada. AND é 1 apenas quando ambas as entradas são 1. OR é 1 quando pelo menos uma entrada é 1.
| A | B | A AND B | A OR B |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 |
(NOT: 0→1, 1→0.)

Um chip lógico real: internamente contém portas lógicas como as desta página
An AND gate gives output 1 when: · Uma porta AND dá saída 1 quando:
AND outputs 1 only when every input is 1. · AND sai 1 apenas quando todas as entradas são 1.
An OR gate gives output 0 only when: · Uma porta OR dá saída 0 apenas quando:
OR is 1 if at least one input is 1, so it is 0 only when both are 0. · OR é 1 se pelo menos uma entrada for 1, portanto é 0 apenas quando ambas são 0.
NAND, NOR, XOR
- NAND = opposite of AND; NOR = opposite of OR; XOR = 1 when the inputs are different.
| A | B | A NAND B | A NOR B | A XOR B |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 |
The six logic gates. A small circle on the output means the result is inverted (NOT, NAND, NOR).
NAND, NOR, XOR
- NAND = oposto de AND; NOR = oposto de OR; XOR = 1 quando as entradas são diferentes.
| A | B | A NAND B | A NOR B | A XOR B |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 |

As seis portas lógicas. Um pequeno círculo na saída significa que o resultado está invertido (NOT, NAND, NOR).
A XOR gate gives output 1 when: · Uma porta XOR dá saída 1 quando:
XOR (exclusive OR) is 1 when the inputs differ. · XOR (OU exclusivo) é 1 quando as entradas diferem.
Match each gate to when its output is 1. · Correlacione cada porta ao momento em que sua saída é 1.
AND = all 1s, OR = any 1, XOR = inputs differ, NAND = NOT AND. · AND = todos 1s, OR = qualquer 1, XOR = entradas diferem, NAND = NÃO AND.
A NOR gate with both inputs 0 gives what output (0 or 1)? · Uma porta NOR com ambas as entradas 0 qual saída dá (0 ou 1)?
NOR = NOT OR. OR of (0,0) is 0, so NOR is 1. NOR is 1 only when both inputs are 0. · NOR = NÃO OR. OR de (0,0) é 0, logo NOR é 1. NOR é 1 apenas quando ambas as entradas são 0.
You've got it
- 1 = true, 0 = false; a truth table lists every input combination
- AND = both 1 · OR = at least one 1 · NOT = invert
- NAND/NOR = AND/OR with the output inverted (the circle)
- XOR = 1 when the inputs differ
Entendeu?
- 1 = verdadeiro, 0 = falso; uma tabela-verdade lista todas as combinações de entrada
- AND = ambos 1 · OR = pelo menos um 1 · NOT = inverter
- NAND/NOR = AND/OR com a saída invertida (o círculo)
- XOR = 1 quando as entradas diferem