Exercise template for matching logic gate diagrams (drawn with TikZ) to the corresponding truth table.
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.
Shuffling, text blocks, and graphics
Verbatim R input/output:
library("exams") set.seed(1090) exams2html("logic.Rnw") set.seed(1090) exams2pdf("logic.Rnw") set.seed(1090) exams2html("logic.Rmd") set.seed(1090) exams2pdf("logic.Rmd")
To leave a comment for the author, please follow the link and comment on their blog: R/exams.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more…
Source:: R News