Altifigence Academy

2 / 36 · Khái niệm

Gates and truth tables

Compare the output rules of AND, OR, NOT and XOR.

Chưa có bản dịch. Nội dung bài học gốc được hiển thị. (English)

Learning goals

  • Read the truth tables of basic gates.
  • Find the input combination where XOR differs from OR.

Check every input combination.

AND is 1 when both inputs are 1. OR is 1 when at least one is 1. XOR is 1 when the inputs differ. NOT inverts one input.

Two inputs have four combinations: 00, 01, 10 and 11. OR and XOR differ only at 11. A few matching examples do not establish equivalence.

aba & baba ^ b
00000
01011
10011
11110

Separate bitwise operations from logical conditions.

a & b applies AND to matching bit positions. a && b tests whether both vectors are nonzero. They may look identical for one-bit inputs but differ for vectors.

4'b0010 & 4'b0100 is 0000, but logical AND is 1 because both values are nonzero. These tables use a two-state 0/1 model, without X or Z.

Thay đổi đầu vào

Tự thử

Find AND, OR and XOR for a=1, b=1.

Đọc giải thích

AND=1, OR=1 and XOR=0. XOR requires exactly one of these two inputs to be 1.

Lựa chọn áp dụng cho trình duyệt này. Có thể đổi ở chân trang bất cứ lúc nào.