Altifigence Academy

2 / 36 · 概念

Gates and truth tables

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

译文尚未提供,以下显示课时原文。 (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.

更改输入

自己试试

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

阅读解释

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

你的选择适用于此浏览器,可随时在页脚更改。