Двоичная и булева логика
Введено| English | Значение |
|---|---|
| Boolean algebra/ˈbuːlɪən ˈældʒɪbrə/ | булева алгебра |
| bit/bɪt/ | бит |
| binary arithmetic/ˈbaɪnəri əˈrɪθmətɪk/ | двоичная арифметика |
| byte/baɪt/ | байт |
| truth table/truːθ ˈteɪbl/ | таблица истинности |
| logic gate/ˈlɒdʒɪk ɡeɪt/ | логический вентиль |
| logic circuit/ˈlɒdʒɪk ˈsɜːkɪt/ | логическая схема |
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.
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.

В двоичной системе, чему равно 1 + 1?
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
Нет цифры для двух, поэтому происходит перенос — то же правило, что и 9 + 1 в десятичной системе.
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.
Поменяйте входы местами и посмотрите на выход
AND истинно только когда оба истинны; OR ложно только когда оба ложны.
Сколько строк в таблице истинности с тремя входами?
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
2³ = 8. Каждый вход удваивает количество комбинаций.
Две булевы функции имеют идентичные таблицы истинности. Что из этого следует?
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
Соответствие каждой строки над одними и теми же булевыми входами доказывает абстрактную булеву эквивалентность. Оно не устанавливает физическое время задержки или безопасность реальных систем.
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.
"A И B" истинно ровно на одной строке своей таблицы истинности.
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
Только на строке, где оба входа равны 1. Эта единственная строка и есть всё определение.
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.
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.
В логике, когда «A ИЛИ B» ложно?
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
Инклюзивное ИЛИ истинно, если хотя бы один вход истинен. Оба входа истинны дают истину; этот вопрос явно использует инклюзивное ИЛИ.
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.