Digital Logic Design · Lab 12 · read before the labAll labsGo to the lab →

Design a circuit with memory.

The open ended lab asks you to design a sequential circuit from a description. Here is the procedure, and a worked sample you can play with.

01

Sequential logic

The output depends on the present input and on the history of the inputs, kept as a state in flip flops. A Moore machine has outputs that depend only on the state (they change at clock edges); a Mealy machine has outputs that also depend on the inputs.

02

State diagram

101001S0 00S1 01S2 10S3 11self loops: S0 on 0, S1 on 1
A=0B=0Z=0

Inputs so far: -. Z = 1 in S3, right after 1, 0, 1.

03

State table

Present A BXNext A BZ
000000
001010
010100
011010
100000
101110
110101
111011
04

Choice of flip flop

D

The input equation is the next state column itself: the easiest choice.

J-K

Fewer gates sometimes, but J and K come from the excitation table, not straight from the next state.

T

Good for counters: T = 1 wherever a bit must change.

05

Input equations

Map D_A (the next A) over A, B, X. The 1s are at A B X = 010, 110 and 101. Try it:

A \ BX00011110
0
1

F = Σm(2, 5, 6) = AB'X + BX'

Click a cell to cycle 0, 1, X (don't care). The rows and columns follow the Gray code, so neighbouring cells differ in one variable.

D_A = B X' + A B' X, D_B = X and Z = A B.

06

The sample

Build it in the lab with one 7474 (both flip flops), one 7404, two 7408 and one 7432, then clock 1, 0, 1, 0, 1, 1, 0, 1 through it. For a design of your own, switch to the Free bench.

07

Check yourself

Q1How many flip flops does a machine with 4 states need?

Two (2² = 4).

Q2In a Moore machine, when can the output change?

Only at a clock edge, with the state.

Q3Why is the D flip flop the easiest for design?

Its input equation is the next state.

Q4In the sample, what is D_B?

X: after any 1 the machine is in S1 or S3, which both have B = 1.

I am ready, go to the lab →