Ripple Counters. Lecture 30 1

Similar documents
University of Technology

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Chapter 10. Counters (a short discussion)

REGISTER TRANSFER LANGUAGE

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

ECE 341 Midterm Exam

Code No: R Set No. 1

ECE 341 Midterm Exam

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Written exam for IE1204/5 Digital Design Thursday 29/

Injntu.com Injntu.com Injntu.com R16

CS/EE Homework 7 Solutions

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT


Binary Adders: Half Adders and Full Adders

Code No: R Set No. 1

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Chapter 5 Registers & Counters

DIGITAL SYSTEM DESIGN

R10. II B. Tech I Semester, Supplementary Examinations, May

Code No: R Set No. 1

Scheme G. Sample Test Paper-I

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Registers and Counters

Philadelphia University Student Name: Student Number:

ELCT 501: Digital System Design

Code No: 07A3EC03 Set No. 1

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

Hours / 100 Marks Seat No.

Systems Programming. Lecture 2 Review of Computer Architecture I

(Refer Slide Time: 00:01:53)

Laboratory Exercise 7

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Model EXAM Question Bank

Microcomputers. Outline. Number Systems and Digital Logic Review

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

CO Computer Architecture and Programming Languages CAPL. Lecture 9

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

(ii) Simplify and implement the following SOP function using NOR gates:

register:a group of binary cells suitable for holding binary information flip-flops + gates

Lecture-55 System Interface:

UPY14602-DIGITAL ELECTRONICS AND MICROPROCESSORS Lesson Plan

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

Question Total Possible Test Score Total 100

Lectures 11 & 12: Synchronous Sequential Circuits Minimization

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

Spiral 1 / Unit 6. Flip-flops and Registers

CARLETON UNIVERSITY School of Computer Science. COMP 2003A Computer Organization Fall 2005 Mid-term Examination Solution Key

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

Department of Electrical and Computer Engineering Introduction to Computer Engineering I (ECSE-221) Assignment 3: Sequential Logic

8254 is a programmable interval timer. Which is widely used in clock driven digital circuits. with out timer there will not be proper synchronization

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

R07

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

MGU-BCA-205- Second Sem- Core VI- Fundamentals of Digital Systems- MCQ s. 2. Why the decimal number system is also called as positional number system?

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

DIGITAL ELECTRONICS. P41l 3 HOURS

CS6201-DIGITAL PRINCIPLE AND SYSTEM DESIGN I YEAR/II SEM PART-B UNIT-I BOOLEAN ALGEBRA AND LOGIC GATES.

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

High School PLTW Digital Electronics Curriculum

EE 3170 Microcontroller Applications

END-TERM EXAMINATION

Implementing Synchronous Counter using Data Mining Techniques

L5: Simple Sequential Circuits and Verilog

L5: Simple Sequential Circuits and Verilog

NADAR SARASWATHI COLLEGE OF ENGINEERING AND TECHNOLOGY Vadapudupatti, Theni

Department of Computer Science & Engineering. Lab Manual DIGITAL LAB. Class: 2nd yr, 3rd sem SYLLABUS

L5: Simple Sequential Circuits and Verilog

Real Digital Problem Set #6

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

[VARIABLE declaration] BEGIN. sequential statements

Philadelphia University Department of Computer Science. By Dareen Hamoudeh

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

Modeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras

L5: Simple Sequential Circuits and Verilog

Unit II Basic Computer Organization

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

CHAPTER 4: Register Transfer Language and Microoperations

10EC33: DIGITAL ELECTRONICS QUESTION BANK

EE 109L Review. Name: Solutions

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Digital VLSI Testing Prof. Santanu Chattopadhyay Department of Electronics and EC Engineering India Institute of Technology, Kharagpur.

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

Hours / 100 Marks Seat No.

SECTION-A

DIRECTORATE OF TECHNICAL EDUCATION DIPLOMA IN ELECTRICAL AND ELECTRONICS ENGINEERING II YEAR M SCHEME IV SEMESTER.

Computer Architecture

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

Transcription:

Ripple Counters A register that goes through a prescribed sequence of states upon the application of input pulses is called a counter. The input pulses may be clock pulses, or they may originate from some external source and may occur at a fixed interval of time or at random. The sequence of states may follow the binary number sequence or any other sequence of states. A counter that follows the binary number sequence is called a binary counter. An n bit binary counter consists of n flip flops and can count in binary from 0 through 2 n - 1. Lecture 30 1

Counters are available in two categories: ripple counters and synchronous counters. In a ripple counter, a flip flop output transition serves as a source for triggering other flip flops. In other words, the C input of some or all flip flops are triggered, not by the common clock pulses, but rather by the transition that occurs in other flip flop outputs. In a synchronous counter, the C inputs of all flip flops receive the common clock. Synchronous counters are presented in the next two sections. Here, we present the binary and BCD ripple counters and explain their operation. Lecture 30 2

Binary Ripple Counter A binary ripple counter consists of a series connection of complementing flip flops, with the output of each flip flop connected to the C input of the next higher order flip flop. The flip flop holding the least significant bit receives the incoming count pulses. A complementing flip flop can be obtained from a JK flip flop with the J and K inputs tied together or from a T flip flop. A third possibility is to use a D flip flop with the complement output connected to the D input. In this way, the D input is always the complement of the present state, and the next clock pulse will cause the flip flop to complement Lecture 30 3

The counter is constructed with complementing flip flops of the T type in part (a) and D type in part (b). The output of each flip flop is connected to the C input of the next flip flop in sequence. The flip flop holding the least significant bit receives the incoming count pulses. The T inputs of all the flip flops in (a) are connected to a permanent logic 1, making each flipflop complement if the signal in its C input goes through a negative transition. Lecture 30 4

The bubble in front of the dynamic indicator symbol next to C indicates that the flip flops respond to the negative edge transition of the input. The negative transition occurs when the output of the previous flip flop to which C is connected goes from 1 to 0. To understand the operation of the four bit binary ripple counter, refer to the first nine binary numbers listed in the table next slide Lecture 30 5

The count starts with binary 0 and increments by 1 with each count pulse input. After the count of 15, the counter goes back to 0 to repeat the count. The least significant bit, A 0, is complemented with each count pulse input. Every time that A 0 goes from 1 to 0, it complements A 1. Every time that A 1 goes from 1 to 0, it complements A 2. Every time that A2 goes from 1 to 0, it complements A 3, and so on for any other higher order bits of a ripple counter. Lecture 30 6

For example, consider the transition from count 0011 to 0100. A 0 is complemented with the count pulse. Since A 0 goes from 1 to 0, it triggers A 1 and complements it. As a result, A 1 goes from 1 to 0, which in turn complements A 2, changing it from 0 to 1. A 2 does not trigger A 3, because A 2 produces a positive transition and the flip flop responds only to negative transitions. Lecture 30 7

Thus, the count from 0011 to 0100 is achieved by changing the bits one at a time, so the count goes from 0011 to 0010, then to 0000, and finally to 0100. The flip flops change one at a time in succession, and the signal propagates through the counter in a ripple fashion from one stage to the next. A binary counter with a reverse count is called a binary countdown counter. In a countdown counter, the binary count is decremented by 1 with every input count pulse. The count of a four bit countdown counter starts from binary 15 and continues to binary counts 14, 13, 12,..., 0 and then back to 15. Lecture 30 8

A list of the count sequence of a binary countdown counter shows that the least significant bit is complemented with every count pulse. Any other bit in the sequence is complemented if its previous least significant bit goes from 0 to 1. Therefore, the diagram of a binary countdown counter looks the same as the binary ripple counter, provided that all flip flops trigger on the positive edge of the clock. (The bubble in the C inputs must be absent.) If negative edge triggered flip flops are used, then the C input of each flip flop must be connected to the complemented output of the previous flip flop. Then, when the true output goes from 0 to 1, the complement will go from 1 to 0 and complement the next flip flop as required. Lecture 30 9

BCD Ripple Counter A decimal counter follows a sequence of 10 states and returns to 0 after the count of 9. Such a counter must have at least four flip flops to represent each decimal digit, since a decimal digit is represented by a binary code with at least four bits. The sequence of states in a decimal counter is dictated by the binary code used to represent a decimal digit. If BCD is used, the sequence of states is as shown in the state diagram: Lecture 30 10

A decimal counter is similar to a binary counter, except that the state after 1001 (the code for decimal digit 9) is 0000 (the code for decimal digit 0). The logic diagram of a BCD ripple counter using JK flip flops is shown in the next slide. The four outputs are designated by the letter symbol Q, with a numeric subscript equal to the binary weight of the corresponding bit in the BCD code. Note that the output of Q 1 is applied to the C inputs of both Q 2 and Q 8 and the output of Q 2 is applied to the C input of Q 4. The J and K inputs are connected either to a permanent 1 signal or to outputs of other flip flops. Lecture 30 11

A ripple counter is an asynchronous sequential circuit. Signals that affect the flip flop transition depend on the way they change from 1 to 0. The operation of the counter can be explained by a list of conditions for flip flop transitions. These conditions are derived from the logic diagram and from knowledge of how a JK flip flop operates. Remember that when the C input goes from 1 to 0, the flip flop is set if J = 1, is cleared if K = 1, is complemented if J = K = 1, and is left unchanged if J = K = 0. Lecture 30 12

To verify that these conditions result in the sequence required by a BCD ripple counter, it is necessary to verify that the flip flop transitions indeed follow a sequence of states as specified by the state diagram. Q 1 changes state after each clock pulse. Q 2 complements every time Q 1 goes from 1 to 0, as long as Q 8 = 0. When Q 8 becomes 1, Q 2 remains at 0. Q 4 complements every time Q 2 goes from 1 to 0. Q 8 remains at 0 as long as Q 2 or Q 4 is 0. When both Q 2 and Q 4 become 1, Q 8 complements when Q 1 goes from 1 to 0. Q 8 is cleared on the next transition of Q 1 The BCD counter of in the previous slide is a decade counter, since it counts from 0 to 9. To count in decimal from 0 to 99, we need a two decade counter. To count from 0 to 999, we need a three decade counter. Lecture 30 13

Multiple decade counters can be constructed by connecting BCD counters in cascade, one for each decade. A three decade counter is shown below. The inputs to the second and third decades come from Q 8 of the previous decade. When Q 8 in one decade goes from 1 to 0, it triggers the count for the next higher order decade while its own decade goes from 9 to 0. Lecture 30 14

Synchronous Counters Synchronous counters are different from ripple counters in that clock pulses are applied to the inputs of all flip flops. A common clock triggers all flip flops simultaneously, rather than one at a time in succession as in a ripple counter. The decision whether a flip flop is to be complemented is determined from the values of the data inputs, such as T or J and K at the time of the clock edge. If T = 0 or J = K = 0, the flip flop does not change state. If T = 1 or J = K = 1, the flip flop complements. Binary Counter The design of a synchronous binary counter is so simple that there is no need to go through a sequential logic design process. In a synchronous binary counter, the flip flop in the least significant position is complemented with every pulse. A flip flop in any other Lecture 30 15

position is complemented when all the bits in the lower significant positions are equal to 1. For example, if the present state of a four bit counter is A 3 A 2 A 1 A 0 = 0011, the next count is 0100. A 0 is always complemented. A1 is complemented because the present state of A 0 = 1. A 2 is complemented because the present state of A 1 A 0 = 11. However, A 3 is not complemented, because the present state of A 2 A 1 A 0 = 011, which does not give an all 1 s condition. Synchronous binary counters have a regular pattern and can be constructed with complementing flip flops and gates. The regular pattern can be seen from the four bit counter depicted in the next figure. The C inputs of all flip flops are connected to a common clock. Lecture 30 16

The counter is enabled by Count_enable. If the enable input is 0, all J and K inputs are equal to 0 and the clock does not change the state of the counter. The first stage, A0, has its J and K equal to 1 if the counter is enabled. The other J and K inputs are equal to 1 if all previous least significant stages are equal to 1 and the count is enabled. The chain of AND gates generates the required logic for the J and K inputs in each stage. The counter can be extended to any number of stages, with each stage having an additional flip flop and an AND gate that gives an output of 1 if all previous flip flop outputs are 1. Lecture 30 17

Note that the flip flops trigger on the positive edge of the clock. The polarity of the clock is not essential here, but it is with the ripple counter. The synchronous counter can be triggered with either the positive or the negative clock edge. The complementing flip flops in a binary counter can be of either the JK type, the T type, or the D type with XOR gates. The equivalency of the three types is indicated in the figure next slide. Lecture 30 18

Lecture 30 19