Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1And in Conclusion\dots

Our goal this lecture was to build combinational logic blocks. We can summarize this approach with the following diagram:

"TODO"

Figure 1 in previous section.

We discussed how to convert among these three representations, as represented by the arcs in the diagram. Here is a summary:

In digital electronics, it is often important to get certain outputs based on your inputs, as laid out by a truth table. Truth tables map directly to Boolean expressions, and Boolean expressions map directly to logic gates. However, in order to minimize the number of logic gates needed to implement a circuit, it is often useful to simplify long Boolean expressions.

We can simplify expressions using the nine key laws of Boolean algebra:

AND FormOR Form
xy=yxx \cdot y = y \cdot xx+y=y+xx + y = y + xCommutativity
(xy)z=x(yz)(xy)z = x(yz)(x+y)+z=x+(y+z)(x + y) + z = x + (y + z)Associativity
x1=xx \cdot 1 = xx+0=xx + 0 = xIdentity
x0=0x \cdot 0 = 0x+1=1x + 1 = 1Laws of 0’s and 1’s
xy+x=xxy + x = x(x+y)x=x(x + y)x = xUniting Theorem
x(y+z)=xy+xzx(y + z) = xy + xzx+yz=(x+y)(x+z)x + yz = (x + y)(x + z)Distributivity
xx=xx \cdot x = xx+x=xx + x = xIdempotence
xx=0x \cdot \overline{x} = 0x+x=1x + \overline{x} = 1Inverse (Complement)
xy=x+y\overline{xy} = \overline{x} + \overline{y}x+y=xy\overline{x + y} = \overline{x} \cdot \overline{y}DeMorgan’s Laws

Laws of Boolean Algebra (reprint of Table 3 from this section).

Additionally, we have many boolean functions which take boolean signals (0 or 1) as input and output a boolean result (0 or 1). When designing digital systems, boolean functions are represented as logic gates. Common logic gates can be found in this section

There are two basic types of circuits: combinational logic circuits and state elements. Combinational logic circuits simply change based on their inputs after whatever propagation delay is associated with them. For example, if an AND gate (pictured below) has an associated propagation delay of 2ps, its output will change based on its input as follows:

"TODO"

You should notice that the output of this AND gate always changes 2ps after its inputs change. State elements, on the other hand, can remember their inputs even after the inputs change. State elements change value based on a clock signal. A rising edge-triggered register, for example, samples its input at the rising edge of the clock (when the clock signal goes from 0 to 1).

2Textbook Readings

P&H A.3-A.6

3Additional References

These notes would not be possible without Professor John Wawrzynek’s CS 61C handouts:

4Exercises

Check your knowledge!

4.1Conceptual Review

Solution to Exercise 1 #

False. Different gate arrangements that implement the same logic can have different propagation delays, which can affect the allowable clock speed.

Solution to Exercise 2 #

False. A wide circuit with more gates in parallel can have less delay than just a few gates arranged in sequence.

Solution to Exercise 3 #

False. This can result in instability if registers are connected to each other, as register outputs may not have propagated properly before the next rising edge.

Solution to Exercise 4 #

True. NOR can be used to express AND, OR, and NOT gates. Thus, NOR is functionally complete and can be used to represent any possible Boolean expression, and thus any combinational logic circuit.

Solution to Exercise 5 #

False. The minimum clock cycle must allow enough time for every combinational logic delay to settle on an output, so the frequency is based on the longest combinational logic delay possible between state elements.

4.2Short Exercises

Solution to Exercise 6 #

NOT, AND, OR, XOR, NAND, NOR, XNOR

Here are the outputs for each boolean function combined into a single truth table. All possible combinations of the inputs x{x} and y{y} are shown the left, and the output of the the boolean function based on the current inputs is shown on the right

Input(s)NOTANDORXORNANDNORXNOR
x{x} y{y}xˉ\bar{x}xy{x}\cdot{y}x+y{x}+{y}xy{x}\oplus{y}xy\overline{{x}\cdot{y}}x+y\overline{{x}+{y}}xy\overline{{x}\oplus{y}}
0 01000111
0 11011100
1 00011100
1 10110001