← Back to Digital Electronics

Contest 4

Digital Electronics

A digital circuit is constructed from logic gates. Each logic gate performs a function of boolean logic based on its inputs, such as AND or OR. Each circuit can be represented as a Boolean Algebra expression; this topic is an extension of Boolean Algebra, which includes a thorough description of truth tables and simplifying expressions.

Definitions

The following table illustrates all logic gates with their equivalent Boolean algebra expression and truth table.

BUFFER

Expression: X=AX = A

INPUTOUTPUT
00
11

NOT

Expression: X=AX = \overline{A} or ¬A\neg A

AX
01
10

AND

Expression: X=ABX = AB or X=ABX = A \cdot B

ABX
000
010
100
111

NAND

Expression: X=ABX = \overline{AB} or X=ABX = \overline{A \cdot B}

ABX
001
011
101
110

OR

Expression: X=A+BX = A + B

ABX
000
011
101
111

NOR

Expression: X=A+BX = \overline{A + B}

ABX
001
010
100
110

XOR

Expression: X=ABX = A \oplus B

ABX
000
011
101
110

XNOR

Expression: X=ABX = \overline{A \oplus B} or ABA \odot B

ABX
001
010
100
111

Note that there is some ambiguity in the conversion from a diagram to a circuit. For example, is A+B\overline{A+B} an OR gate followed by a NOT gate, or simply a NOR gate.

Online Tools

The Logisim application is a wonderful tool for exploring this topic. Logisim is free to download and use; among its many features is support to automatically draw a circuit from a Boolean Algebra expression, simulate the circuit with arbitrary inputs, and complete a truth table for the circuit. You can also import the circuit for Sample Problem 1 from this file. There are many YouTube videos that show how to use Logisim, including a 4 minute tutorial.

Sample Problems

Sample Problem 1

Find all ordered triplets (A, B, C) which make the following circuit FALSE:

(Circuit diagram: NAND gate on inputs A, B; output fed into OR gate with input C)

Solution:

One approach is to reason about what inputs and outputs are necessary at each gate. For the circuit to be FALSE, both inputs to the final OR gate must be false. Thus, input C must be FALSE, and the output of the NAND gate must also be false. The NAND gate is false only when both of its inputs are TRUE; thus A and B must both be TRUE. The final answer is (1, 1, 0).

Another approach is to translate the circuit into a Boolean expression: AB+C\overline{AB}+C. To find when this is FALSE, we find when AB+C\overline{\overline{AB}+C} is TRUE. Applying DeMorgan’s Law gives ABC\overline{\overline{AB}} \cdot \overline{C}, which simplifies to ABCAB\overline{C}. This is TRUE only when A=1, B=1, C=0.


Sample Problem 2

How many ordered 4-tuples (A, B, C, D) make the following circuit TRUE?

(Circuit diagram — see wiki page)

Solution: Using a truth table with intermediate gate outputs labeled p through t:

ABCDp=C+Dp=\overline{C+D}q=p+Bq=p+\overline{B}r=ABr=\overline{A}Bs=rqs=r \oplus qt=spt=s \oplus p
000011010
000101011
001001011
001101011
010011101
010100111
011001111
011100111
100011010
100101011
101001011
101101011
110011010
110100000
111000000
111100000

There are 10 rows where the final output t is TRUE.


Sample Problem 3

Simplify the Boolean expression that this circuit represents.

(Circuit diagram — see wiki page)

Solution:

(A(A+B))B+C(\overline{A}(A+B))\overline{B+C} =(AA+AB)BC=(\overline{A}A+\overline{A}B)\overline{B}\overline{C} =(0+AB)BC=(0+\overline{A}B)\overline{B}\overline{C} =ABBC=\overline{A}B\overline{B}\overline{C} =0=0

Video Resources

ACSL Advisors

Video Guide

Digital Electronics -1 (Ravi Yeluru) — Introduces the AND, OR, and NOT gates, and works through a couple of simple circuits.

Video Guide

Digital Electronics -2 (Ravi Yeluru) — Solves a 3-gate circuit given by the Boolean expression (A+B)(B+C)(\overline{A}+B)(\overline{B+C}).

Video Guide

Digital Electronics Boolean Algebra (Tangerine Code) — Solves a 3-gate circuit given by the Boolean expression (A+B)(B+C)\overline{(A+B)}(B+C).

Video Guide

ACSL Digital Electronics Worksheet Sample (misterminich) — Solves a handful of ACSL problems.

Other Videos

Video Guide

Digital Electronics Basics (Beginning Electronics)

Video Guide

Logic Gate Expressions (Kevin Drumm)

Video Guide

Determining the truth table and logic statement (Anna does some physics) — Uses a truth table to find the inputs that make the circuit (A+B)+(AB)\overline{(A+B)}+(AB) true.