Chapter 6 Registers and Counters Originally By Wafa
Chapter 6: Registers and Counters Originally By Wafa Alrajhi Imam Muhammad Bin Saud University
Outline q Registers. � q Shift Registers. � q Registers with parallel load. Serial Transfer. Counters. Binary Ripple Counters. � Binary Synchronous Counters. � 2
Register q It s a group of FFs, each one can store one bit. q An n-bit register has n FFs to store n bit of information. q The transfer of new information into a register is called loading or updating the register. q Types of transfer: Parallel transfer : When all bits of the register are loaded simultaneously with a common clock pulse. � Serial transfer: information is transferred one bit at a time. � 3
Registers q Figure shows one of the simplest registers � The clock input triggers FFs on positive edge. � Four inputs are transferred into registers. � The four outputs are to obtain the stored information. � Clear is direct input to reset FFs asynchronously . 4
Registers with Parallel Load q The previous construction of the register have no change state. q Solutions: Inhibit clock. (undesirable) � Add a load control signal. � q The load input determines whether no changes in content or load new information. 1 new information � 0 leave the content as it is. � 5
Registers with Parallel Load q In most digital systems, a master clock generator supplies clock pulses to all parts of the system, just as the heart that supplies a constant beat to all parts in the human system. q Because of this fact, the input values in the register are loaded when a clock pulse arrives. q This implies that, whenever a clock pulse arrives, it would load the register with new values, thus overwriting the previously stored register data. 6
Shift Registers q It is a register that can shift information in each cell to its neighboring cell. q It has chain of FF in cascade � The output of one FF is connected to the input of the next FF. q Can be unidirectional or bidirectional. q Shift can be : right shift or left shift. q Serial input: determines what will go into the leftmost FF. 7
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 First Second Third 8 1 1
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 First Second Third 9 1 1
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 First 1 0 Second Third 10 1 1
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second Third 11
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second Third 12
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second Third 13
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 Third 14
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 1 1 0 Third 15
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 1 1 0 Third 16
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 1 1 0 Third 17
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number four times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 1 1 0 Third 0 18
Shift Register : Right Shift q Each time you shift the register to the right, you do 3 things: The rightmost digit drops off � You move the next three digits over one position to the right � you fill in the leftmost position with rightmost digit. � q Example : Contents are initially 1011, shift the number three times to the right. Initial 1 0 1 1 First 1 1 0 1 Second 1 1 1 0 Third 0 1 19
Shift Registers - Serial Transfer q The serial transfer from one register to the other is done with shift registers. q The shift input controls the shifting. 20
Shift Registers - Serial Transfer Initial A 1 0 B 1 1 T 2 21 0 0 1 0
Shift Registers - Serial Transfer Initial A 1 0 B 1 1 T 2 22 0 0 1 0
Shift Registers - Serial Transfer Initial A 1 0 B 1 1 T 2 23 0 0 1 0
Shift Registers - Serial Transfer Initial A 1 T 1 0 B 1 1 1 0 1 T 2 24 0 1 0
Shift Registers - Serial Transfer Initial T 1 A B 1 0 1 1 T 2 25 0 1 0
Shift Registers - Serial Transfer Initial T 1 A B 1 0 1 1 0 0 1 T 2 26
Shift Registers - Serial Transfer Initial T 1 A B 1 0 1 1 0 0 1 T 2 27
Shift Registers - Serial Transfer Initial A B 1 0 1 1 0 0 1 0 T 1 1 1 0 0 1 T 2 1 1 28
Shift Registers - Serial Transfer Initial A B 1 0 1 1 0 0 1 0 T 1 1 1 0 0 1 T 2 1 1 1 0 0 29
Shift Registers - Serial Transfer q And complete the rest of the table. . 30
- Slides: 30