COMPUTER ORGANIZATION AND DESIGN 5th
Edition
The Hardware/Software Interface
4 bit Synchronous
Up Down Counter
4-bit Synchronous UP counter
■ 4-bit digital counter is a sequential circuit that
uses flipflops, AND gates, and a digital clock.
■ For each clock tick, the 4-bit output increments by
one. After it reaches its maximum value of 15
(calculated by 2^4-1), it resets to zero.
Chapter 3 — Arithmetic for Computers — 2
Step 1
Determine the number of Flip flops needed and decide which
flipflops to use.
For 4-bit counter
Number of Flipflops needed, n = 4
Number of States, N = 2 ^ 4 = 16
16 States are 0 to 15
Step 2
Write the Excitation Table (shows the minimum inputs that are
necessary to generate a particular next state)
Qn (PS = Present State)
Qn+1 (NS = Next State),
T = Excitation Input
XOR operation
Step 3
Draw the State Diagram of 4-
Bit Synchronous Up Counter
Total, N = 16 States
Represented 0 to 15
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Next State ( 4 bits)
Q1+, Q2+, Q3+, Q4+
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Next State ( 4 bits)
Q1+, Q2+, Q3+, Q4+
Excitation Input (4 bits)
T1, T2, T3, T4
(using table from Step 2)
Step 5
Find the Simplified Boolean Expression for
T1, T2, T3, T4 using 4-Variable K-Map
Step 6
Draw the logic diagram using Boolean Expressions
of T1,T2,T3,T4 from step 5
Timing Diagram
Q4
Q3
Q2
Q1
4-bit Synchronous DOWN counter
■ 4-bit digital down counter is a sequential circuit
that uses flipflops, AND gates, and a digital clock.
■ For each clock tick, the 4-bit output decrements
by one. After it reaches its value of 0, it resets to
15 (calculated by 2^4-1).
Chapter 3 — Arithmetic for Computers — 13
Step 1
Determine the number of Flip flops needed and decide which
flipflops to use.
For 4-bit counter
Number of Flipflops needed, n = 4
Number of States, N = 2 ^ 4 = 16
16 States are 0 to 15
Step 2
Write the Excitation Table (shows the minimum inputs that are
necessary to generate a particular next state)
Qn (PS = Present State)
Qn+1 (NS = Next State),
T = Excitation Input
XOR operation
Step 3
Draw the State Diagram of 4-
Bit Synchronous Up Counter
Total, N = 16 States
Represented 0 to 15
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Next State ( 4 bits)
Q1+, Q2+, Q3+, Q4+
Step 4
Write the Circuit Excitation
Table
Present State ( 4 bits)
Q1 Q2 Q3 Q4
Next State ( 4 bits)
Q1+, Q2+, Q3+, Q4+
Excitation Input (4 bits)
T1, T2, T3, T4
(using table from Step 2)
Step 5
Find the Simplified Boolean Expression for
T1, T2, T3, T4 using 4-Variable K-Map
Step 6
Draw the logic diagram using Boolean Expressions
of T1,T2,T3,T4 from step 5