# Digital logic

> Karnaugh maps, logic gates, timing diagrams, and sorting networks. 4 examples, each rendered, with complete LaTeX source to copy or open in TeXeR.

A package in the TeXeR TikZ library: https://texer.org/library/digital-logic

Category: Computer Science. On CTAN: https://ctan.org/pkg/pgf

Tags: digital logic, boolean algebra, hardware

## Examples

- [Karnaugh map](https://texer.org/library/digital-logic/karnaugh-map.md): A four-variable map with its two groups circled, which simplify to BD + B'D'.
- [Half adder](https://texer.org/library/digital-logic/half-adder.md): An XOR gate for the sum and an AND gate for the carry, with TikZ's US-style logic symbols.
- [Timing diagram](https://texer.org/library/digital-logic/timing-diagram.md): A clock, a data input, and a flip-flop output that changes only on rising clock edges.
- [Sorting network](https://texer.org/library/digital-logic/sorting-network.md): The five comparators that sort any four values, shown sorting 3, 1, 4, 2.
