1 Chapter 4 Combinational and Sequential Circuit.

Slides:



Advertisements
Similar presentations
Registers and Counters
Advertisements

التصميم المنطقي Second Course
Digital Electronics Lecture 7 Sequential Logic Circuit Design.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
1 Sequential Circuits Dr. Pang. 2 Outline Introduction to sequential circuits Basic latch Gated SR latch and gated D latch D flip-flop, T flip-flop, JK.
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
+ CS 325: CS Hardware and Software Organization and Architecture Sequential Circuits 1.
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Half Adder Sum = X’Y+XY’ = X  Y Carry = XY YXYXYX  YYYX  XX XOR XNOR.
Chapter 11_2 (10_2 edition 8) Sequential Circuits etc.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
Overview Logic Combinational Logic Sequential Logic Storage Devices SR Flip-Flops D Flip Flops JK Flip Flops Registers Addressing Computer Memory.
Overview Recall Combinational Logic Sequential Logic Storage Devices
Logic and Computer Design Fundamentals Registers and Counters
EE 4271 VLSI Design, Fall 2010 Sequential Circuits.
Chapter 7 - Part 2 1 CPEN Digital System Design Chapter 7 – Registers and Register Transfers Part 2 – Counters, Register Cells, Buses, & Serial Operations.
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
So far, all of the logic circuits we have studied were basically based on the analysis and design of combinational digital circuits. The other major aspect.
SEQUENTIAL CIRCUITS USING TTL 74XX ICS
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
ReVieW Combinational & Sequential Logic Circuit EKT 221 / 4 DIGITAL ELECTRONICS II.
Digital Computer Design Fundamental
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Combinational vs.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
ENG241 Digital Design Week #8 Registers and Counters.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 9: Digital Electronics – Sequential Logic by Muhazam Mustapha, November 2011.
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Computer Architecture and Organization Unit -1. Digital Logic Circuits – Logic Gates – Boolean Algebra – Map Simplification – Combinational Circuits –
Sequential logic circuits
1 Lecture #11 EGR 277 – Digital Logic Ch. 5 - Synchronous Sequential Logic There are two primary classifications of logic circuits: 1.Combinational logic.
Logic Design / Processor and Control Units Tony Diep.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #3 Flip-Flops, Registers, Shift registers, Counters, Memory 3/3/2005.
WORKING PRINCIPLE OF DIGITAL LOGIC
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Sequential Logic Circuit Design Eng.Maha Alqubali.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Digital Design Fundamentals
Boolean Algebra and Digital Logic
29-Nov-18 Counters Chapter 5 (Sections ).
Combinational Circuits
FLIP-FLOPS.
Digital Logic Department of CNET Chapter-6
Synchronous sequential
Digital Logic Department of CNET Chapter-6
Synchronous Sequential
Sequential Circuits UNIT- IV
Week 11 Flip flop & Latches.
Presentation transcript:

1 Chapter 4 Combinational and Sequential Circuit

2 Topics Combinational Circuit and Sequential Circuit Criterions Some Examples of Combinational Circuit: Parallel Adder, Decoder, etc Some Examples of Sequential Circuits: Flip-flop, Register, Serial Adder, etc.

3 Combinational vs Sequential Circuit A B F C D Combinational Circuit -output determined solely by inputs Sequential Circuit -output determined by inputs AND previous outputs A B F C

4 Combinational Logic circuit contains logic gates where its output is determined by the combination of the current input, regardless of the output or the prior combination of input. Basically, combinational circuit can be depicted by Diagram 1 below: n input m output combinational circuit Examples of Combinational circuits in the computer system are decoder, parallel adder, and multiplexer. (Note: Students are encouraged to obtain examples of combinational circuits stated above) Combinational Circuit

5 Sequential Logic Circuit contains logic gates arranged in parallel and its output is not only determined by the combination of the current input, but also the prior output. The circuit also contains memory elements that enable it to store the information of the prior output. Sequential Circuit n input m output sequential logic circuit memory elements Examples of sequential circuits in the computer system are like registers, counters and serial adders.

6 Some Examples of Combinational Circuit: Parallel Adder, Decoder, etc The circuits learnt in chapter 3 are combinational circuits. The steps to design combinational circuits are as the following: 1. Understand the problem 2. Determine the number of input and output variables that are needed 3. Give symbols for the stated input and output 4. Construct a truth table that defines the relationship between the input and output 5. Obtain the Boolean function or the logical expression from the truth table in (4) using Karnaugh Map or other known methods. 6. Draw a logic circuit based on the expression obtained from (5) above. (Note : Alarm System in Chapter 3 is an example of designing a combinational circuit )

7 Adder is based on the addition of the binary system. For example, 1+0=1, 1+1=10, 1+1+1=11 There are 2 kinds of addition, which are identified to be half addition and full addition. Half addition is the addition of 2 bits data (doesn’t involve carry) that produces 2 bits outputs, that is the result and the carrier. For example, = 0 carry 1 Full addition is the addition of 3 bits data (2 bits data and 1 bit carry) that produces 2 bits outputs (sum and carry). Logic circuit for half addition is known as Half Adder while the logic circuit for full addition is known as Full Adder. Adder

8 Designing a Circuit for Half Adder The steps are as below: 1.Problem: to build a logic circuit for the addition of 2 bits data 2.Number of input : 2; Number of output : 2 3.Variables for input: x and y Variables for output : s (sum) and c (carry) 4.The Truth Table for the problem : INPUTOUTPUT xysc

x y 1 1 _ _ s = x y + x y = x  y For s x y 1 c = x y For c 5. The expressions for s and c using Karnaugh Map

10 6. A logic circuits for Half Adder (HA) x y _ _ s = xy + xy c = xy OR x y x  y = s xy = c

11 A Block Diagram for HA is as below: x y s c HA inputoutput

12 Designing a Circuit for Full Adder (FA) The same method used to design HA. 1.Problem: Build logic circuit for the addition of 3 bits data 2.Number of input : 3 Number of output : 2 3.Variables for input: x, y and c i Variables for output : s (sum) and c o (carry)

13 INPUTOUTPUT xycici scoco Obtain the expression for r and c o using Karnaugh Map (Students are required to try this out themselves): will obtain s = x y p i + x y c i + x y c i + x y c i = x  y  c i and c o = x y + y c i + x c i 4.The truth table for the problem :

14 6. Draw the circuit for FA (Students are required to try this out themselves): Generally, the block diagram for FA is shown as below : x y s FAinput output coco cici

15 To construct a 4-bit parallel adder, 3 FA and 1 HA are required like the diagram below with the input as X = x 3 x 2 x 1 x 0 and Y = y 3 y 2 y 1 y 0 (X and Y are binary numbers 4-bit) and the output (addition result) is s 3 s 2 s 1 s 0. x 3 y 3 FA HA x 2 y 2 x 1 y 1 x 0 y 0 c 3 s 3 c0c0 s0 s0 c2c2 c1c1 s2 s2 s1 s1 INPUT OUTPUT x 3 y 3 FA x 2 y 2 x 1 y 1 x 0 y 0 c 3 s 3 c0c0 s0 s0 c2c2 c1c1 s2 s2 s1 s1 INPUT OUTPUT 0 or

16 Some Examples of Sequential Circuits: Flip-flop, Register, Serial Adder, etc. Sequential circuits are a kind of logic circuit where the current output not only depends on the current input but also on the past history of inputs. Another and generally more useful way to view it is that the current output of a sequential circuit depends on the current input and the current state of that circuit. The simplest form of sequential circuit is a flip-flop. Flip- flop is a kind of logic circuit that is capable of exhibiting 2 stable conditions. It is also known as 1-bit memory element and is mostly used to make important computer components such as registers, counters, memory etc.

17 There are a variety of flip-flops, all of which share two properties: 1. The flip-flop is a bistable device either 0 or 1. It exists in one of two states and, in the absence of input, remains in that state. Thus, the flip-flop can function as a 1-bit memory. 2. The flip-flop has two outputs, which are always the complements of each other. These are generally labeled Q and Q.

18 Table 1 shows symbolic graphic and feature table for three types of flip-flop that are S ‑ R, J ‑ K and D flip ‑ flops. Flip-flop is a form of memory element used to construct sequential circuits that are more complex, such as registers etc. Sequential circuits can be divided into: 1. Synchronous 2. Asynchronous In synchronous sequential circuit, all flip ‑ flops are moved by the same clock pulse so that all flip ‑ flops involved change simultaneously. In asynchronous circuit, the change of flip ‑ flop condition depends on the change that occurs on the input and the late time that is in the circuit.

19 Clock SQ R Q JQ K Q DQ Q NameGraphical SymbolFeature Table S-R SRQ n+1 00QnQn J-K JKQ n+1 00QnQn Change condition D DQ n Table 1: Basic Flip-flops

20 S ‑ R Flip ‑ flop S ‑ R flip ‑ flop has 2 inputs, S (set) and R (reset) like Diagram 3 below. In the diagram below, (also for JK and D flip-flops), they used another input called clock. It is to control the movement of input that is input will only occur when given a clock pulse (synchronous circuit) The features of S ‑ R flip ‑ flop can be depicted in Table 2 below. It can be summarized that: 1. If the value of both S and R are 0, the flip ‑ flop will remain in its present condition (either 0 or 1). 2. If S = 0 and R = 1 (reset), then the flip ‑ flop condition will change to 0 (its output, Q = 0). 3. If S = 1 (set) and R = 0, then the flip ‑ flop condition will change to 1 (output, Q = 1). 4. This circuit does not allow combinational input of input S = 1 and R = 1. SRQnQn Q n Table 2 : Feature table of S-R Flip-flop

21 clock S R Q Q Diagram 3 : S-R Flip-flop control the movement of input

22 J-K Flip-flop J-K flip-flop also has 2 inputs, J and K. The function of clock is same as S ‑ R flip ‑ flop. Unlike S ‑ R flip ‑ flop, J ‑ K flip ‑ flop allows all combination of inputs. It can be observed that J ‑ K flip-flop is built to address the input problem of S = R = 1 in S ‑ R flip-flop. Features 1 till 3 are same as S ‑ R flip-flop. Table 3 shows the features of J ‑ K flip ‑ flop. From the table, it can be summarized that: 1.If J = 0 and K = 0, it will maintain the flip ‑ flop condition like before 2.If J = 0 and K = 1, it will cause flip ‑ flop to change to condition 0 (reset). 3.If J = 1 and K = 0, it will cause flip ‑ flop to change to condition 1 (set). 4.If J = 1 and K = 1, it will change the flip ‑ flop condition, that is it will become complementary to the initial or prior condition JKQnQn Q n Table 3: Features table of J-K flip-flop

23 Clock J K Q Q Diagram 4: J-K Flip-flop The logic circuit for J-K flip-flop is shown in Diagram 4 below.

24 D Flip ‑ flop Logic circuit for D flip ‑ flop is shown in Diagram 5. This flip ‑ flop only has one input that is D. The clock function is same as S ‑ R and J-K flip ‑ flops. The features of D flip ‑ flop can be illustrated by Table 4. From the table, it can be seen that this flip ‑ flop produces the same output as its input regardless of the condition of the stated flip-flop. This feature is very suitable to be used as memory element and this flip-flop is mostly used to make registers and computer memory (RAM) DQnQn Q n Table 4 : Feature table of D Flip-flop

25 clock D Q Q Diagram 5 : D Flip-flop

26 Examples of Flip-flop (Sequential Circuit) usage As priory stated, flip-flop is an example of the simplest form of sequential circuit. It is also a form of memory element where a flip-flop can store 1 bit of data. In this section, examples of sequential circuits that use flip-flop will be given: 1. Register 2. Adder

27 Register Register is an important component in the computer. Generally, it can be categorized into: 1. Storage Register (or Parallel Register) 2. Shift Register (or Serial Register) Parallel register is made up of a set of 1-bit (flip-flop) that can be written on and read simultaneously. This register is used to store data (output=input). The amount of flip-flop used depends on the size of the register that is to be built. If a parallel register that can store 8 bits of data is to be built, then 8 flip-flops are needed. Diagram 6 below is a 4 bit parallel register that uses flip-flop D. (Note: all kinds of flip-flop can be used to build storage register, but its circuit will differ because every flip-flop has its own features)

28 Clock DQ I2I2 DQ I1I1 DQ I4I4 DQ I3I3 Q1Q1 Q2Q2 Q3Q3 Q4Q4 Pulse _Q_Q _Q_Q _Q_Q _Q_Q Diagram 6: A 4-bit parallel register that uses D Flip-flop Diagram 6 below is a 4 bit parallel register that uses flip-flop D. (Note: all kinds of flip-flop can be used to build storage register, but its circuit will differ because every flip-flop has its own features) In the above diagram, 4 bits of input is admitted simultaneously, that is I 1, I 2, I 3 and I 4, whereas its output is also is simultaneous or parallel, that is Q 1, Q 2, Q 3 and Q 4.

29 In shift register, only one output is produced at a time. There are 2 types of shift register that is shift to right and shift to left. Shift to right register means the rightmost bit of the stated will be taken out first followed by the following bits after a given clock beat. It’s vice versa for move to shift to left register. Diagram 7 below is an example of 4-bit shift to right register that utilizes J-K flip-flop. Output Clock JQ K JQ K JQ K JQ K Input Clock Pulse _Q_Q _Q_Q _Q_Q _Q_Q Diagram 7: Shift to Right Register Using J-K Flip-flop

30 Parallel Adder In the computer environment, there are 2 types of adders: 1. Parallel Adder 2. Serial Adder Parallel adder is an adder that performs addition concurrently for each bit involved. Adder in section 4.2 is called a serial adder. Serial Adder performs addition bit by bit starting with the rightmost bit, followed by the following bits. Diagram 8 below is an example of a serial 4-bit adder. This adder uses two Shift to Right Registers, X and Y to hold operand 1 (A = A 3 A 2 A I A 0 ) and operand 2 (B = B 3 B 2 B 1 B 0 ), a full adder and a flip ‑ flop (usually D flip-flop) to hold the carrier value.

31 The addition process in the adder are as below : X = X + Y that is the X and Y registers will hold operand 1 and operand 2 and the addition result will be kept in the X register. Hence, in the addition, the value in the Y (Operand 2) register cannot change while the X register holds the addition result (the value of operand 1 will be lost) Note: observe and understand the data movement in the stated circuit after every clock pulse is given. A3A3 A2A2 A0A0 A1A1 B3B3 B2B2 B0B0 B1B1 Full Adder AiAi BiBi CiCi C i+1 SiSi D flip-flop Carry Y Register X Register Clock Pulse Diagram 8 : 4-bit Serial Adder