#04-2021-1000-119 lecture4 sequential circuit i...combinational logic circuit design ... is your...

79
11.03.21 11:59 CSCI 150 Introduction to Digital and Computer System Design Lecture 4: Sequential Circuit I Jetic Gū

Upload: others

Post on 22-Mar-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

11.03.21 11:59CSCI 150 Introduction to Digital and Computer

System Design Lecture 4: Sequential Circuit I

Jetic Gū

Page 2: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Overview• Focus: Basic Information Retaining Blocks

• Architecture: Sequential Circuit

• Textbook v4: Ch5 5.1, 5.2; v5: Ch4 4.1 4.2

• Core Ideas:

1. Introduction

2. and Latches, LatchSR SR D

Page 3: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Combinational Logic Circuit Design

• Design Principles

• Knows: fixed-Length input and output

• Knows: input/output mapping relations

• Optimisation: Minimise overall delay

Review

P0 Review

Your Favourite Combinational

Circuit

n m

Page 4: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Combinational Logic Circuit Design

• Features

• Fixed-Length input and output

• The same input will always give the same output

• Operations are simultaneous with minimum delay

Review

P0 Review

Your Favourite Combinational

Circuit

n m

Page 5: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Combinational Logic Circuit Design

• Cannot handle variable length input

• Cannot store information

• Cannot perform multi-step tasks

Review

P0 Review

Your Favourite Combinational

Circuit

n m

Page 6: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Introduction to Sequential Circuit

Summary

P1 Introduction

Page 7: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Solution: Storage!

• Cannot handle variable length input

• Cannot store information

• Cannot perform multi-step tasks

Concep

t

P1 Introduction

Your Favourite Combinational

Circuit

n m

Page 8: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Solution: Storage!

• Cannot handle variable length input

• Cannot store information

• Cannot perform multi-step tasks

Concep

t

P1 Introduction

Your Favourite Combinational

Circuit

n m

Page 9: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Solution: Storage!

• Storage of partial input

• Storage of partial results and states

• Storage of instructions

Concep

t

P1 Introduction

• Cannot handle variable length input

• Cannot store information

• Cannot perform multi-step tasks

Your Favourite Combinational

Circuit

n m

Page 10: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Sequential Circuits

Concep

t

P1 Introduction

• Handle variable-length input

• Store information

• Multi-step tasks

• State Transition from time to t t + 1

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Page 11: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Definitions

Concep

t

P1 Introduction

1. Storage Elementscircuits that can store binary information

2. State partial results, instructions, etc.

3. Synchronous Sequential CircuitSignals arrive at discrete instants of time, outputs at next time step

4. Asynchronous Sequential Circuit Signals arrive at any instant of time, outputs when ready

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Page 12: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Definitions

Concep

t

P1 Introduction

3. Synchronous Sequential Circuit Signals arrive at discrete instants of time, outputs at next time step

• Has Clock

4. Asynchronous Sequential Circuit Signals arrive at any instant of time, outputs when ready

• May not have Clock

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 13: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

1. Are calculators designed using Combinational Circuits or Sequential Circuits?

• What about your microwave and toaster?

• What about your digital watch (not smart)?

• What about computers/smartphones?

Exerci

ses

P1 Introduction

Page 14: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

Exerci

ses

P1 Introduction

Page 15: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

2. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

Exerci

ses

P1 Introduction

Page 16: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

2. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the states for this calculator?

Exerci

ses

P1 Introduction

Page 17: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

2. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the states for this calculator?

• What kind of information is stored?

Exerci

ses

P1 Introduction

Page 18: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

Exerci

ses

P1 Introduction

Page 19: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

3. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

Exerci

ses

P1 Introduction

Page 20: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

3. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the states for this calculator?

Exerci

ses

P1 Introduction

Page 21: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

3. Is this calculator using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the states for this calculator?

• What kind of information is stored?

Exerci

ses

P1 Introduction

Page 22: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

Exerci

ses

P1 Introduction

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 23: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

4. Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

Exerci

ses

P1 Introduction

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 24: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

4. Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the Input/Output devices of these computers?

Exerci

ses

P1 Introduction

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 25: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

4. Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the Input/Output devices of these computers?

• What are the storage devices?

Exerci

ses

P1 Introduction

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 26: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Question

4. Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential Circuit?

• What are the Input/Output devices of these computers?

• What are the storage devices?

• What about CPU?

Exerci

ses

P1 Introduction

Your Favourite Combinational

Circuit

n mInputs Outputs

Storage Unit

Statet + 1Statet

Clock

200 CHAPTER 4 / SEQUENTIAL CIRCUITS

the clock pulses are applied with other signals that specify the required change in the storage elements. The outputs of storage elements can change their value only in the presence of clock pulses. Synchronous sequential circuits that use clock pulses as inputs for storage elements are called clocked sequential circuits. These are the types of circuits most frequently encountered in practice, since they operate correctly in spite of wide differences in circuit delays and are relatively easy to design.

The storage elements used in the simplest form of clocked sequential circuits are called !ip- !ops. For simplicity, assume circuits with a single clock signal. A !ip- !op is a binary storage device capable of storing one bit of information and hav-ing timing characteristics to be de"ned in Section 4-9. The block diagram of a syn-chronous clocked sequential circuit is shown in Figure 4-3. The !ip- !ops receive their inputs from the combinational circuit and also from a clock signal with pulses that occur at "xed intervals of time, as shown in the timing diagram. The !ip- !ops can change state only in response to a clock pulse. For a synchronous operation, when a clock pulse is absent, the !ip- !op outputs cannot change even if the outputs of the combinational circuit driving their inputs change in value. Thus, the feedback loops shown in the "gure between the combinational logic and the !ip- !ops are broken. As a result, a transition from one state to the other occurs only at "xed time intervals dictated by the clock pulses, giving synchronous operation. The sequential circuit outputs are shown as outputs of the combinational circuit. This is valid even when some sequential circuit outputs are actually the !ip- !op outputs. In this case, the combinational circuit part between the !ip- !op outputs and the sequential circuit outputs consists of connections only.

A !ip- !op has one or two outputs, one for the normal value of the bit stored and an optional one for the complemented value of the bit stored. Binary informa-tion can enter a !ip- !op in a variety of ways, a fact that gives rise to different types of !ip- !ops. Our focus will be on the most prevalent type used today, the D !ip- !op. Other !ip- !op types, such as the JK and T !ip- !ops, are described in the online mate-rial available at the Companion Website. In preparation for studying !ip- !ops and their operation, necessary groundwork is presented in the next section on latches, from which the !ip- !ops are constructed.

(b) Timing diagram of clock pulses

(a) Block diagram

Inputs Combinationalcircuit

Clock pulses

Outputs

Flip-flops

FIGURE 4-3Synchronous Clocked Sequential Circuit

M04_MANO0637_05_SE_C04.indd 200 23/01/15 1:54 PM

Page 27: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latches

Summary

P2 Latches

and Latches, LatchSR SR D

Page 28: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: the values in a circuit after brief changing due to delay in passing information, reaches a state where it doesn’t change anymore

1

X1

Y1

0 1 2 3 4 5

Z

0 1 0 1 0

0 0 1 1 0

Page 29: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: the values in a circuit after brief changing due to delay in passing information, reaches a state where it doesn’t change anymore

1

X1

Y1

0 1 2 3 4 5

Z

0 1 0 1 0

0 0 1 1 0

1

Page 30: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: the values in a circuit after brief changing due to delay in passing information, reaches a state where it doesn’t change anymore

1

X1

Y1

0 1 2 3 4 5

Z

0 1 0 1 0

0 0 1 1 0

1 Gate delay tG

Page 31: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: all values in a circuit after some changes due to delay in passing signals, reach a state where they don’t anymore

XY Z

01

Page 32: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: all values in a circuit after some changes due to delay in passing signals, reach a state where they don’t anymore

XY Z

01

Page 33: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: all values in a circuit after some changes due to delay in passing signals, reach a state where they don’t anymore

XY Z

01 1

Page 34: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Stability

Concep

t

P2 Latches

• Stable State: all values in a circuit after some changes due to delay in passing signals, reach a state where they don’t anymore

XY Z

01 1

• What other scenarios might bring about these instabilities?

Page 35: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latches

• Basic Storage Elements

• Maintain a binary state indefinitely, as long as there’s power

• The binary state inside can be changed

Concep

t

P2 Latches

LatchSRReset

Set Q

Q

Page 36: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Summary

• Latches and Latches

• Latches

SR SR

D

Review

P2 Latches

Page 37: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

Page 38: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

Page 39: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

Page 40: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

00

Page 41: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

0

0

Page 42: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

0

1

0

Page 43: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

0

1

0

1

Page 44: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

0

1

10

1

Page 45: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

0

0

1

10

1

Page 46: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

Page 47: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

Page 48: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

Page 49: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

00

Page 50: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

0

Page 51: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

0

0

Page 52: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

0

0

0

Page 53: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

0

00

0

Page 54: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

00

0

1

Page 55: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

1

0

0

0

0

11

Page 56: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

10

0

0

1

1

1

Page 57: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 0SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

10

0

0

1

1

1

Page 58: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

Page 59: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

11

Page 60: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

1

1

Page 61: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

1

0

1

Page 62: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

1

0

1

0

Page 63: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

1

0

01

0

Page 64: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

0

0

1

1

0

01

0

Page 65: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

Page 66: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

11

Page 67: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

1

1

Page 68: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

1

0

1

Page 69: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

1

0

1

0

Page 70: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

1

0

01

0

Page 71: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

0

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

0

01

0

Page 72: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

00

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

1

0

0

0

Page 73: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

0

0

0

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

00

0

0

Page 74: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

0

0

0

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

00

0

0

Page 75: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

0

0

0

Latch: Stored value = 1SR

Demo

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

1

0

0

1 1

Page 76: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Exercise

Exerci

se

P2 Latches

4-2 / Latches 201

4-2 LATCHES

A storage element can maintain a binary state inde!nitely (as long as power is deliv-ered to the circuit), until directed by an input signal to switch states. The major dif-ferences among the various types of latches and "ip- "ops are the number of inputs they possess and the manner in which the inputs affect the binary state. The most basic storage elements are latches, from which "ip- "ops are usually constructed. Al-though latches are most often used within "ip- "ops, they can also be used with more complex clocking methods to implement sequential circuits directly. The design of such circuits is, however, beyond the scope of the basic treatment given here. In this section, the focus is on latches as basic primitives for constructing storage elements.

SR and S R Latches

The SR latch is a circuit constructed from two cross- coupled NOR gates. It is derived from the single- loop storage element in Figure 4-2(d) by simply replacing the invert-ers with NOR gates, as shown in Figure 4-4(a). This replacement allows the stored value in the latch to be changed. The latch has two inputs, labeled S for set and R for reset, and two useful states. When output Q = 1 and Q = 0, the latch is said to be in the set state. When Q = 0 and Q = 1, it is in the reset state. Outputs Q and Q are normally the complements of each other. When both inputs are equal to 1 at the same time, an unde!ned state with both outputs equal to 0 occurs.

Under normal conditions, both inputs of the latch remain at 0 unless the state is to be changed. The application of a 1 to the S input causes the latch to go to the set (1) state. The S input must go back to 0 before R is changed to 1 to avoid occurrence of the unde!ned state. As shown in the function table in Figure 4-4(b), two input conditions cause the circuit to be in the set state. The initial condition is S = 1, R = 0, to bring the circuit to the set state. Applying a 0 to S with R = 0 leaves the circuit in the same state. After both inputs return to 0, it is possible to enter the reset state by applying a 1 to the R input. The 1 can then be removed from R, and the cir-cuit remains in the reset state. Thus, when both inputs are equal to 0, the latch can be in either the set or the reset state, depending on which input was most recently a 1.

If a 1 is applied to both the inputs of the latch, both outputs go to 0. This produces an unde!ned state, because it violates the requirement that the outputs be the

(b) Function table

S

1

R

1

Q

0

Q

10

00

11

00

00

10

00

11

0

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

S (Set)

Q

Q

FIGURE 4-4SR Latch with NOR Gates

M04_MANO0637_05_SE_C04.indd 201 23/01/15 1:54 PM

• Draw the Latch in LogicWorks as below, make sure it works as intendedSR

Page 77: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

LatchSR

• Design similar to latches, but with NANDS

• Functions equivalent to latches with and inverted

SR

SR S R

Concep

t

P2 Latches 4-2 / Latches 203

the NAND latch requires a 0 signal to change its state, it is referred to as an S R latch. The bar above the letters designates the fact that the inputs must be in their comple-ment form in order to act upon the circuit state.

The operation of the basic NOR and NAND latches can be modi!ed by pro-viding an additional control input that determines when the state of the latch can be changed. An SR latch with a control input is shown in Figure 4-7. It consists of the basic NAND latch and two additional NAND gates. The control input C acts as an enable signal for the other two inputs. The output of the NAND gates stays at the logic- 1 level as long as the control input remains at 0. This is the quiescent condition for the S R latch composed of two NAND gates. When the control input goes to 1, information from the S and R inputs is allowed to affect the S R latch. The set state is reached with S = 1, R = 0, and C = 1. To change to the reset state, the inputs must be S = 0, R = 1, and C = 1. In either case, when C returns to 0, the circuit remains in its current state. Control input C = 0 disables the circuit so that the state of the output does not change, regardless of the values of S and R. Moreover, when C = 1 and both the S and R inputs are equal to 0, the state of the circuit does not change. These conditions are listed in the function table accompanying the diagram.

An unde!ned state occurs when all three inputs are equal to 1. This condition places 0s on both inputs of the basic S R latch, giving an unde!ned state. When the

S (Set)Q

(b) Function table

S

0

R

0

Q

1

01

11

11

00

11

01

00

11

1

Set state

Reset state

Undefined

(a) Logic diagram

R (Reset)

Q

Q

FIGURE 4-6S R Latch with NAND Gates

(a) Logic diagram (b) Function table

C

011

1

1

S

X00

1

1

R

X01

0

1

Next state of Q

No changeNo changeQ ! 0; Reset state

Q ! 1; Set state

Undefined

S

C

R

Q

Q

FIGURE 4-7SR Latch with Control Input

M04_MANO0637_05_SE_C04.indd 203 23/01/15 1:54 PM

Page 78: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

LatchD

• Implemented using latches

• : Signals changes to the stored states; the value to change to

SR

C D

Concep

t

P2 Latches204 CHAPTER 4 / SEQUENTIAL CIRCUITS

control input goes back to 0, one cannot conclusively determine the next state, since the S R latch sees inputs (0, 0) followed by (1, 1). The SR latch with control input is an important circuit, because other latches and !ip- !ops are constructed from it. Sometimes the SR latch with control input is referred to as an SR (or RS) !ip- !op—however, according to our terminology, it does not qualify as a !ip- !op, since the circuit does not ful"ll the !ip- !op requirements presented in the next section.

D Latch

One way to eliminate the undesirable unde"ned state in the SR latch is to ensure that inputs S and R are never equal to 1 at the same time. This is done in the D latch, shown in Figure 4-8. This latch has only two inputs: D (data) and C (control). The complement of the D input goes directly to the S input, and D is applied to the R in-put. As long as the control input is 0, the S R latch has both inputs at the 1 level, and the circuit cannot change state regardless of the value of D. The D input is sampled when C = 1. If D is 1, the Q output goes to 1, placing the circuit in the set state. If D is 0, output Q goes to 0, placing the circuit in the reset state.

The D latch receives its designation from its ability to hold data in its internal stor-age. The binary information present at the data input of the D latch is transferred to the Q output when the control input is enabled (1). The output follows changes in the data input, as long as the control input is enabled. When the control input is disabled (0), the binary information that was present at the data input at the time the transition in C occurred is retained at the Q output until the control input C is enabled again.

4-3 FLIP- FLOPS

A change in value on the control input allows the state of a latch in a !ip- !op to switch. This change is called a trigger, and it enables, or triggers, the !ip- !op. The D

(b) Function table

C

011

D

X

01

Next state of Q

No change

(a) Logic diagram

D

C

Q

Q

S

R

FIGURE 4-8D Latch

M04_MANO0637_05_SE_C04.indd 204 23/01/15 1:54 PM

204 CHAPTER 4 / SEQUENTIAL CIRCUITS

control input goes back to 0, one cannot conclusively determine the next state, since the S R latch sees inputs (0, 0) followed by (1, 1). The SR latch with control input is an important circuit, because other latches and !ip- !ops are constructed from it. Sometimes the SR latch with control input is referred to as an SR (or RS) !ip- !op—however, according to our terminology, it does not qualify as a !ip- !op, since the circuit does not ful"ll the !ip- !op requirements presented in the next section.

D Latch

One way to eliminate the undesirable unde"ned state in the SR latch is to ensure that inputs S and R are never equal to 1 at the same time. This is done in the D latch, shown in Figure 4-8. This latch has only two inputs: D (data) and C (control). The complement of the D input goes directly to the S input, and D is applied to the R in-put. As long as the control input is 0, the S R latch has both inputs at the 1 level, and the circuit cannot change state regardless of the value of D. The D input is sampled when C = 1. If D is 1, the Q output goes to 1, placing the circuit in the set state. If D is 0, output Q goes to 0, placing the circuit in the reset state.

The D latch receives its designation from its ability to hold data in its internal stor-age. The binary information present at the data input of the D latch is transferred to the Q output when the control input is enabled (1). The output follows changes in the data input, as long as the control input is enabled. When the control input is disabled (0), the binary information that was present at the data input at the time the transition in C occurred is retained at the Q output until the control input C is enabled again.

4-3 FLIP- FLOPS

A change in value on the control input allows the state of a latch in a !ip- !op to switch. This change is called a trigger, and it enables, or triggers, the !ip- !op. The D

(b) Function table

C

011

D

X

01

Next state of Q

No change

(a) Logic diagram

D

C

Q

Q

S

R

FIGURE 4-8D Latch

M04_MANO0637_05_SE_C04.indd 204 23/01/15 1:54 PM

Page 79: #04-2021-1000-119 Lecture4 Sequential Circuit I...Combinational Logic Circuit Design ... Is your laptop/PC/smartphone using Asynchronous Sequential Circuit or Synchronous Sequential

Latches• Implement latch, save as a component in your library

• Implement latch, save as a component in your library

SR

D

Exerci

se

P2 Latches

204 CHAPTER 4 / SEQUENTIAL CIRCUITS

control input goes back to 0, one cannot conclusively determine the next state, since the S R latch sees inputs (0, 0) followed by (1, 1). The SR latch with control input is an important circuit, because other latches and !ip- !ops are constructed from it. Sometimes the SR latch with control input is referred to as an SR (or RS) !ip- !op—however, according to our terminology, it does not qualify as a !ip- !op, since the circuit does not ful"ll the !ip- !op requirements presented in the next section.

D Latch

One way to eliminate the undesirable unde"ned state in the SR latch is to ensure that inputs S and R are never equal to 1 at the same time. This is done in the D latch, shown in Figure 4-8. This latch has only two inputs: D (data) and C (control). The complement of the D input goes directly to the S input, and D is applied to the R in-put. As long as the control input is 0, the S R latch has both inputs at the 1 level, and the circuit cannot change state regardless of the value of D. The D input is sampled when C = 1. If D is 1, the Q output goes to 1, placing the circuit in the set state. If D is 0, output Q goes to 0, placing the circuit in the reset state.

The D latch receives its designation from its ability to hold data in its internal stor-age. The binary information present at the data input of the D latch is transferred to the Q output when the control input is enabled (1). The output follows changes in the data input, as long as the control input is enabled. When the control input is disabled (0), the binary information that was present at the data input at the time the transition in C occurred is retained at the Q output until the control input C is enabled again.

4-3 FLIP- FLOPS

A change in value on the control input allows the state of a latch in a !ip- !op to switch. This change is called a trigger, and it enables, or triggers, the !ip- !op. The D

(b) Function table

C

011

D

X

01

Next state of Q

No change

(a) Logic diagram

D

C

Q

Q

S

R

FIGURE 4-8D Latch

M04_MANO0637_05_SE_C04.indd 204 23/01/15 1:54 PM