logic: Interpretation of Logic Gates (Using TikZ)

Exercise template for matching logic gate diagrams (drawn with TikZ) to the corresponding truth table.

Name:
logic
Type:
Related:
Preview:

Consider the following gates coding logical operators:

A B C

Which of these gates belongs to the following logical truth table?

The truth table codes the logical and operator.

The gates displayed code the following logical operators: A = nor, B = nand, C = xor.

Hence, the truth table corresponds to: None of these.

  • False
  • False
  • False
  • True

Consider the following gates coding logical operators:

A B C

Which of these gates belongs to the following logical truth table?

The truth table codes the logical xor operator.

The gates displayed code the following logical operators: A = and, B = nand, C = xor.

Hence, the truth table corresponds to: C.

  • False
  • False
  • True
  • False

Consider the following gates coding logical operators:

A B C

Which of these gates belongs to the following logical truth table?

The truth table codes the logical and operator.

The gates displayed code the following logical operators: A = and, B = nand, C = xor.

Hence, the truth table corresponds to: A.

  • True
  • False
  • False
  • False
Description:
Gate diagrams for three logical operators (sampled from: and, or, xor, nand, nor) are drawn with TikZ and have to be matched to a truth table for another randomly drawn logical operator. Depending on the exams2xyz() interface the TikZ graphic can be rendered in PNG, SVG, or directly by LaTeX.
Solution feedback:
Yes
Randomization:
Shuffling, text blocks, and graphics
Mathematical notation:
No
Verbatim R input/output:
No
Images:
Yes
Other supplements:
No
Template:
Raw: (1 random version)
PDF:
logic-Rmd-pdf
logic-Rnw-pdf
HTML:
logic-Rmd-html
logic-Rnw-html

Demo code:

library("exams")

set.seed(403)
exams2html("logic.Rmd")
set.seed(403)
exams2pdf("logic.Rmd")

set.seed(403)
exams2html("logic.Rnw")
set.seed(403)
exams2pdf("logic.Rnw")