Binary and Boolean logic · Binário e lógica booleana
| English | Português |
|---|---|
| Boolean algebra/ˈbuːlɪən ˈældʒɪbrə/ | Álgebra booleana |
| bit/bɪt/ | bit |
| binary arithmetic/ˈbaɪnəri əˈrɪθmətɪk/ | aritmética binária |
| byte/baɪt/ | byte |
| truth table/truːθ ˈteɪbl/ | tabela-verdade |
| logic gate/ˈlɒdʒɪk ɡeɪt/ | porta lógica |
| logic circuit/ˈlɒdʒɪk ˈsɜːkɪt/ | circuito lógico |
A two-value rule can still have several inputs
- Boolean algebra 布尔代数 uses true and false with operations such as AND, inclusive OR and NOT.
- A processor can implement arithmetic using digital logic. Abstract Boolean reasoning examines a stated input/output rule, rather than proving every detail of a real computer.
Uma regra de dois valores ainda pode ter várias entradas
- A álgebra booleana usa verdadeiro e falso com operações como AND, OR inclusivo e NOT.
- Um processador pode implementar aritmética usando lógica digital. O raciocínio booleano abstrato examina uma regra declarada de entrada/saída, em vez de provar cada detalhe de um computador real.
Keep bit arithmetic and truth values distinct
- Binary arithmetic 二进制运算 carries at 2: binary $1+1=10$. A bit 位 is one binary digit and a byte 字节 is eight bits.
- A bit pattern can encode an unsigned value, a signed value or other information. Specify its width and interpretation before calling its value 255 or inverting it.
Mantenha a aritmética de bits e os valores de verdade distintos
- A aritmética binária carrega em 2: binário $1+1=10$. Um bit é um único dígito binário e um byte são oito bits.
- Um padrão de bits pode codificar um valor sem sinal, um valor com sinal ou outra informação. Especifique sua largura e interpretação antes de chamar seu valor 255 ou inverter.
In binary, what is 1 + 1? · Em binário, qual é 1 + 1?
There is no digit for two, so it carries — the same rule as 9 + 1 in decimal. · Não há dígito para dois, então ocorre carry — a mesma regra que 9 + 1 em decimal.
Evaluate every Boolean combination
- A truth table 真值表 for n unrestricted Boolean inputs has $2^n$ rows. Include intermediate expressions to make grouping visible.
- Identical outputs in every row prove two expressions equivalent for those Boolean inputs. That does not establish circuit timing, authentication security or physical reliability.
Avalie cada combinação booleana
- Uma tabela-verdade para n entradas booleanas irrestritas tem $2^n$ linhas. Inclua expressões intermediárias para tornar o agrupamento visível.
- Saídas idênticas em todas as linhas provam que duas expressões são equivalentes para aquelas entradas booleanas. Isso não estabelece tempo de circuito, segurança de autenticação ou confiabilidade física.
Flip the inputs and watch the output · Inverta as entradas e observe a saída
AND is true only when both are; OR is false only when neither is. · AND (E) é verdadeiro apenas quando ambos são; OR (OU) é falso apenas quando nenhum é.
How many rows does a truth table with three inputs have? · Quantas linhas tem uma tabela-verdade com três entradas?
2³ = 8. Every input doubles the number of combinations. · 2³ = 8. Cada entrada dobra o número de combinações.
Two Boolean expressions have identical truth tables. What follows? · Duas expressões booleanas têm tabelas-verdade idênticas. O que se segue?
Matching every row over the same Boolean inputs proves abstract Boolean equivalence. It does not establish physical timing or real-system security. · Corresponder cada linha sobre as mesmas entradas booleanas prova equivalência booleana abstrata. Não estabelece temporização física ou segurança em sistemas reais.
A complete two-input table. In row order 00, 01, 10, 11, AND outputs 0, 0, 0, 1; inclusive OR outputs 0, 1, 1, 1; NOT A outputs 1, 1, 0, 0. A single matching row is not enough to prove two expressions equivalent.
Uma tabela completa de duas entradas. Na ordem das linhas 00, 01, 10, 11, AND produz 0, 0, 0, 1; OR inclusivo produz 0, 1, 1, 1; NOT A produz 1, 1, 0, 0. Uma única linha correspondente não é suficiente para provar que duas expressões são equivalentes.
"A AND B" is true on exactly one row of its truth table. · "A E B" é verdadeiro em exatamente uma linha de sua tabela-verdade.
Only the row where both inputs are 1. That single row is the whole definition. · Apenas a linha onde ambas as entradas são 1. Essa única linha é toda a definição.
Follow connections through the circuit
- A logic gate 逻辑门 implements a specified operation. A logic circuit 逻辑电路 connects those operations, with outputs feeding later inputs.
- Build intermediate columns according to that dependency order. De Morgan can rewrite NOT of an AND as OR of the negated inputs, but must negate both inputs.
Siga as conexões através do circuito
- Uma porta lógica implementa uma operação especificada. Um circuito lógico conecta essas operações, com saídas alimentando entradas posteriores.
- Construa colunas intermediárias de acordo com essa ordem de dependência. De Morgan pode reescrever NOT de um AND como OR das entradas negadas, mas deve negar ambas as entradas.
Simplify and verify separately. $(A\land B)\lor(A\land\neg B)=A$ by distributivity and $B\lor\neg B$ being true. Sheet 4.3 checks all four rows and separately tests fixed-width bitwise operations.
Simplifique e verifique separadamente. $(A\land B)\lor(A\land\neg B)=A$ pela distributividade e $B\lor\neg B$ sendo verdadeiro. A folha 4.3 verifica todas as quatro linhas e testa separadamente operações bit a bit de largura fixa.
In logic, when is "A OR B" false? · Em lógica, quando "A OU B" é falso?
Inclusive OR is false only when both inputs are false. Both true gives true; this question uses inclusive OR explicitly. · OU inclusivo é falso apenas quando ambas as entradas são falsas. Ambas verdadeiras resultam em verdadeiro; esta questão usa OU inclusivo explicitamente.
Inclusive OR is true when both inputs are true. Bitwise NOT inverts only the stated positions: four-bit NOT of 1100 is 0011, unsigned 3, rather than an unspecified signed or infinite-width value.
OR inclusivo é verdadeiro quando ambas as entradas são verdadeiras. NOT bit a bit inverte apenas as posições declaradas: NOT de 1100 em quatro bits é 0011, decimal 3, em vez de um valor com sinal não especificado ou de largura infinita.