Registers and Counters

Slides:



Advertisements
Similar presentations
Lecture 23: Registers and Counters (2)
Advertisements

CSE 205: Digital Logic Design
Registers and Counters
CENG 241 Digital Design 1 Lecture 11
ECE 331 – Digital System Design Flip-Flops and Registers (Lecture #18) The slides included herein were taken from the materials accompanying Fundamentals.
Registers and Counters
Logic and Computer Design Fundamentals Registers and Counters
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Sequential Circuit Introduction to Counter
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
KU College of Engineering Elec 204: Digital Systems Design
A.Abhari CPS2131 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers:
REGISTER A Register is a group of binary storage cells suitable for holding binary information. A group of flip-flops constitutes a register, since each.
Mantıksal Tasarım – BBM231 M. Önder Efe
Registers and Counters
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
Counters.
Registers and Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
Registers & Counters M. Önder Efe
Registers CPE 49 RMUTI KOTAT.
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
Chapter 6 Registers and Counter
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
Registers and Counters by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
Digital Design Lectures 11 & 12 Shift Registers and Counters.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
ENG241 Digital Design Week #8 Registers and Counters.
Registers and Counters Chapter 6. Digital Circuits 2 Clocked sequential circuits a group of flip-flops and combinational gates connected to form a feedback.
Chap 5. Registers and Counters. Chap Definition of Register and Counter l a clocked sequential circuit o consist of a group of flip-flops & combinational.
Chapter 6 Registers and Counters
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.
Abdullah Said Alkalbani University of Buraimi
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Registers and Counters
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
Digital Electronics.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Fall 2000 Chapter 5 – Part 2 Tom Kaminski & Charles.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 7 – Part 2.
Chap 5. Registers and Counters
DIGITAL COMPONENTS. MULTIPLEXERS A multiplexer is a combinational circuit that receives binary information from one of 2 n input data lines and directs.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Fuw-Yi Yang1 數位系統 Digital Systems Department of Computer Science and Information Engineering, Chaoyang University of Technology 朝陽科技大學資工系 Speaker: Fuw-Yi.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Registers and Counters
FIGURE 6.1 Four‐bit register
EKT 221 : Digital 2 COUNTERS.
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
Digital System Design Review.
Registers and Counters
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.
COE 202: Digital Logic Design Sequential Circuits Part 4
29-Nov-18 Counters Chapter 5 (Sections ).
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Computer Architecture and Organization: L02: Logic design Review
6. Registers and Counters
Switching Theory and Logic Design Chapter 5:
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Outline Registers Counters 5/11/2019.
Digital Electronics and Logic Design
Presentation transcript:

Registers and Counters Chapter 6 Registers and Counters

Outline Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

Registers and Counters A set of flip-flops, possibly with added combinational gates, that perform data-processing tasks Store and manipulate information in a digital system Counter: A register that goes through a predetermined sequence of states A special type of register Employed in circuits to sequence and control operations

The Simplest Register Consist of only flip-flops Triggered by common clock input The Clear input goes to the R (reset) input of all flip-flops Clear = 0  all flip-flops are reset asynchronously The Clear input is useful for cleaning the registers to all 0’s prior to its clocked operation Must maintain at logic 1 during normal operations

Register with Parallel Load When Load = 1, all the bits of data inputs are transferred into the registers Parallel loaded When Load =0, the outputs of the flip-flops are connected to their respective inputs Keep no change control data loading at the input side

Outline Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

The Simplest Shift Register Shift register: a register capable of shifting its binary information in one or both directions The simplest form: consist of only a chain of flip-flops in cascade

Serial Transfer Serial mode: information is transferred and manipulated one bit at a time Parallel mode: all the bits of the registers are transferred at the same time Shift control: determine when and how many times of the registers are shifted Register A is connected in circular mode in this circuit

Serial Transfer Example Timing Pulse Shift Register A Shift Register B Initial value 1 0 1 1 0 0 1 0 After T1 1 1 0 1 1 0 0 1 After T2 1 1 1 0 1 1 0 0 After T3 0 1 1 1 0 1 1 0 After T4

Serial Adder The bits of two binary numbers are added one pair at a time through a single full adder (FA) circuit Initialization: A = augend; B = addend Carry flip-flop is cleared to 0 For each clock pulse: A new sum bit is transferred to A A new carry is transferred to Q Both registers are shifted right To add three or more numbers: Shift in the next number from the serial input while B is shifted to the FA A will accumulate their sum

Serial v.s. Parallel Serial adders: Parallel adders: Use shift registers A sequential circuit Require only one FA and a carry flip-flop Slower but require less equipment Parallel adders: Use registers with parallel load for sum Basically a pure combinational circuit n FAs are required Faster

Redesign the Serial Adder Present State Inputs Next Outputs F/F Inputs Q X Y S JQ KQ 0 0 0 X 0 1 1 1 0 1 1 1 X X 1 X 0 JQ = xy KQ = x’y’ = (x + y)’ S = x  y  Q

Universal Shift Register The most general shift register has the following capabilities: A clear control to clear the register to 0 A clock input to synchronize the operations A shift-right (left) control to enable the shift right (left) operation and the serial input and output lines associated with the shift right (left) A parallel-load control to enable a parallel transfer and the n input lines associated with the parallel transfer n parallel output lines A control state that leaves the information in the register unchanged in the presence of the clock

4-Bit Universal Shift Register Mode Control Register S1 S0 Operation No change 1 Shift right Shift left Parallel load

Outline Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

Binary Ripple Counter Binary Count Sequence A3 A2 A1 A0 1 the output transition triggers the next flip-flop

BCD Ripple Counter The count will return to 0 after 9 Q1: always complemented Q2: inverted when Q8 = 0 and Q1 = 1  0 Q4: inverted when Q2 = 1  0 Q8: when Q1 = 1  0 if (Q2 = Q4 = 1) Q8 is inverted else Q8 = 0

Three-Decade BCD Counter connected to the “Count” port

Outline Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

Ripple v.s. Synchronous Ripple counters: Synchronous counters: Flip-flops are triggered by the outputs of another flip-flops Triggering source may not the same for each flip-flop The flip-flops are changed serially Synchronous counters: Flip-flops are triggered by common clock pulses Triggering sources are the same for all flip-flops All operations are performed simultaneously

Binary Counter 01…15 01… J=0,K=0: no change J=1,K=1: complement triggered by positive clock edge complemented when all the lower bits are “1” (checked by a AND chain)

Up-Down Binary Counter take the complemented values for count-down calculation

Design a BCD Counter Go through normal sequential circuit design procedure Present State Next State Output Flip-Flop Inputs Q8 Q4 Q2 Q1 y TQ8 TQ4 TQ2 TQ1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 1 TQ1 = 1 TQ2 = Q8’Q1 TQ4 = Q2Q1 TQ8 = Q8Q1+Q4Q2Q1 y = Q8Q1

Binary Counter with Parallel Load controlled by AND gates Clear CLK Load Count Function X Clear to 0 1  Load inputs Count next No change asynchronous input merged by OR gates set when count = 1111

Achieve a BCD Counter Load “0000” after “1001” Clear to “0000” immediately at “1010”

Outline Registers Shift Registers Ripple Counters Synchronous Counters Other Counters

Counter with Unused States If the machine falls into the unused states, we have to bring it back !! Cannot assign the used states as don’t cares Present State Next Flip-Flop Inputs A B C JA KA JB KB JC KC 0 0 0 0 0 1 0 X 0 X 1 X 0 1 0 0 X 1 X X 1 1 0 0 1 X X 1 0 X 1 0 1 X 0 0 X 1 X 1 1 0 X 0 1 X X 1 X 1 X 1 0 X the destination can be assigned arbitrarily

Ring Counter Ring counter: a circular shift register with only one flip-flop being set at any time

Johnson Counter Double the number of states of a ring counter by switch-tail connection If this counter falls into an unused state, it will never come back to normal states !! To avoid this situation, use some gates to form the input equation of each flip-flop instead of connecting directly Ex: Dc = (A + C) B