Altifigence Academy

2 / 36 · Concetto

Gates and truth tables

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

La traduzione non è ancora disponibile. Viene mostrata la lezione originale. (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.

Modifica gli ingressi

Prova tu

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

Leggi la spiegazione

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

La scelta vale per questo browser. Puoi modificarla in qualsiasi momento dal piè di pagina.