Registers and Counters

Slides:



Advertisements
Similar presentations
Registers and Counters
Advertisements

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.
Shift Registers and Shift Register Counters
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
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:
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
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.
SEQUENTIAL CIRCUITS USING TTL 74XX ICS
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
1 Shift Registers. –Definitions –I/O Types: serial, parallel, combinations –Direction: left, right, bidirectional –Applications –VHDL implementations.
Registers and Counters
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
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
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.
Sequential Logic Circuit
Sequential logic circuits
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
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.
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.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
Dr. Clincy Professor of CS
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
LATCHED, FLIP-FLOPS,AND TIMERS
REGISTER TRANSFER LANGUAGE (RTL)
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Registers and Counters
Synchronous Counter with MSI Gates
Sequential Logic.
EKT 221 : Digital 2 COUNTERS.
KU College of Engineering Elec 204: Digital Systems Design
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
Flip-Flop.
Latches, Flip-Flops and Registers
3.2 Shift Register Basic shift register function
Shift Registers.
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Registers and Counters
Digital Fundamentals with PLD Programming Floyd Chapter 10
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.
LECTURE 15 – DIGITAL ELECTRONICS
COE 202: Digital Logic Design Sequential Circuits Part 4
Synchronous Counters with MSI Gates
29-Nov-18 Counters Chapter 5 (Sections ).
Instructor: Alexander Stoytchev
Synchronous Counters with MSI Gates
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Dr. Clincy Professor of CS
Dr. Clincy Professor of CS
Instructor: Alexander Stoytchev
Computer Architecture and Organization: L02: Logic design Review
Chapter 8 Counters Changjiang Zhang
Overview Part 1 - Registers, Microoperations and Implementations
CHAPTER 4 SHIFT REGISTER
FLIP-FLOPS.
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Sequential Circuits UNIT- IV
Counters.
Registers Today we’ll see some common sequential devices: counters and registers. They’re good examples of sequential analysis and design. They are also.
Week 11 Flip flop & Latches.
Shift Registers Dr. Rebhi S. Baraka
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Digital Electronics and Logic Design
Presentation transcript:

Registers and Counters

Registers Register is very important building blocks. A data register is often used to store binary information. A register might be used to accept input data from an alphanumeric keyboard and the present this data to the circuitry used to display on the CRT screen. Register is a group of flip flops that can be used to store a binary number. n-bit register has n flip flops and each FF stores one bit. Two basic functions: data storage and data movement. A binary register also performs very important arithmetic operations such as complementation, multiplication, and division.

Four bit Register Circuit Symbol D C Q D0 D1 D2 D3 Q0 Q1 Q2 Q3 clk D0

Shift Registers A shift register can also be connected to form a number of different types of counters (count the clock pulses). The FF must be connected such that the binary number can be entered (shifted in) into the register and possibly shifted out. A group of flip flops connected to provide either shifted in or shifted out or both of these functions is called a shift register. In the shift register, binary number can be moved from one place to another in either of two ways: Shifting the data 1 bit at a time in a serial fashion either from LSB or MSB. This technique is referred to as serial shifting. Shifting all the data bits simultaneously which is referred to as parallel shifting.

Shift Registers Shift registers are a type of sequential logic circuit, mainly for storage of digital data.   They are a group of flip-flops connected in a chain so that the output from one flip-flop becomes the input of the next flip-flop.   All the flip-flops are driven by a common clock, and all are set or reset simultaneously. A shift register is a digital memory circuit found in calculators, computers, and data-processing system.

Types of Registers There are two ways to shift the data into a register (serial or parallel) and similarly two ways to shift the data out of a register. This lead to construction of four basic types of registers: (d) Parallel in- Parallel out

1. Shift Registers – Serial-in Serial-out Consider 4 D flip flops connected and forming 4-bit shift register. A common clock provides trigger at its negative edge to all the FFs. This negative transition of the clock NT is referred to as a shift pulse. As output of one D FF is connected to the input of next at every clock trigger and data stored in one FF is transferred to the next. For this circuitry, transfer takes place like this Q to R, R to S, S to T and the serial data input is transferred to Q.

Shift Registers – Serial-in Serial-out

Shift Registers – Serial-in Serial-out A basic four-bit shift register can be constructed using four D flip-flops. The operation of the circuit is as follows.   The register is first cleared, forcing all four outputs to zero.   The input data is then applied sequentially to the D input of the first flip-flop on the left (FF0).  During each clock pulse, one bit is transmitted from left to right.   Assume a data word to be 1001.  The least significant bit of the data has to be shifted through the register from FF0 to FF3. In order to get the data out of the register, they must be shifted out serially. 

Shift Registers – Serial-in Serial-out B DQRS=0000; QRST=0000 C DQRS=1000; QRST=1000 D DQRS=0100; QRST=0100

Shift Registers – Serial-in Serial-out Points to note: At every clock pulse, the first flip flop is loaded with the value of the data in stream The data that was in this flip flop is then loaded into the second and so on. The data can be taken out of the last flip flop in serial form or it can be taken from all outputs at the same time – parallel form.

Shift Registers – Serial-in Serial-out For each flip flop there is a delay between clock pulse and output. This delay provides time for the next flip flop in the chain to load the data from the previous stage. D C Q Da Qa Qb Qc Qd A B data clock Qa Qb etc

8 bit Shift Register – Serial-in Serial-out

2. Shift Registers – Serial-in Parallel-out In the second type of shift registers, data is shifted serially, but shifted out in parallel. In order to shift the data out in parallel, it is simply necessary to have all the data bits available as outputs at the same time. This is accomplished by connecting the output of each FF to output pin. For eg. an 8-bit shift register would have eight output lines-one for each FF in the register. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

2. Shift Registers – Serial-in Parallel-out This configuration allows conversion from serial to parallel format. Data is input serially, as described in the SISO section above. Once the data has been clocked in, it may be either read off at each output simultaneously, or it can be shifted out. If four data bits are shifted in by four clock pulses via a single wire at Input data, the data becomes available simultaneously on the four Outputs Q0 to Q3 after the fourth clock pulse In this configuration, each flip-flop is edge triggered. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available Four-bit binary number 1001 is shifted to the Q outputs of the register

2. Shift Registers – Serial-in Parallel-out Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

2. Shift Registers – Serial-in Parallel-out The Shift register 74LS91 is exactly similar to 54/74164 8-bit register with 2 exceptions: Each FF is available as an output – all 8 bits of any number stored in the register are available simultaneously as an output (parallel data output). Each FF has an asynchronous clear input. Thus it is applied through amplifier and will reset (clear) every FF. Since It is an asynchronous signal, it can be applied at any time without regard to the clock waveform and this signal is level sensitive. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

2. Shift Registers – Serial-in Parallel-out Let’s take a look at the gated serial inputs A and B. Suppose that the serial data is connected to A; then B can be used as a control line. B is held high: The NAND gate is enabled and the serial input data passes through the NAND gate inverted. The input data is shifted serially into the register. B is held low: The NAND gate output is forced high, the input data stream is inhibited, and the next positive clock transition will shift a 0 into the first flip flop. Each succeeding positive clock transition will shift another 0 into the register. After eight clock pulses, the register will be full of zeros. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

2. Shift Registers – Serial-in Parallel-out This fig. shown the response of a 54/74164. The serial data is input at A (pin 1), while a gating control signal is applied at B (pin 2). The first pulse occurs at time A and simply resets all FF to 0. The clock begins at time B, but the first PT does nothing since the control line is low. At time C, the control line goes high and the first data bit (a 0) is shifted into the register at time D. The next 7 data bits are shifted in, in order, at times E, F, G, H, I J and K. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

This assumes that the LSB was shifted in the first and appears at QH. The clock remains high after time K, and the 8-bit number 0010 1100 now resides in the register and is available on the eight output lines. This assumes that the LSB was shifted in the first and appears at QH. Notice that the clock must be stopped after its PT at time K, otherwise shifting will continue and the data bits will be lost. Finally, another clear pulse occurs at time L, the FFs are all reset to 0, and another shift sequence may begin. Incidentally, the register can be cleared by holding the control line at B low and allowing the clock to run for eight PTs. This simply shifts eight 0s into the register Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

3. Shift Registers – Parallel-in Serial-out The third types uses parallel entry of data into register. There are a number different techniques for the parallel entry of data, but focused on commercially available TTL. Eg.: 54/74166 which is an 8-bit shift register and the same circuit is repeated eight times. TTL (Transistor–transistor logic) Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

3. Shift Registers – Parallel-in Serial-out According to TTL functional description data sheet, 54/74166 is an 8-bit shift register, capable of either serial or parallel data entry, and serial data output. Notice that there are 8 RS FFs, each with some attached logic circuitry. Recall the concepts of RS FF and the attached inverter that forms a D FF If a data bit X is to be clocked into the FF, the complement of X must be present at the input. For instance, if X = 0, then R = 0 and S = 1 and a 1 will be clocked into the FF when the clock transitions. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

3. Shift Registers – Parallel-in Serial-out Now add a NOR gate. If one leg of this NOR gate is at ground level, a data bit X at the other leg, which is simply inverted by the NOR gate. If X = 1, then at the output of the NOR gate X = 0, allowing a 1 to be clocked into the FF. This NOR gate offers the option of entering data from two different sources, either X1 or X2. Holding X2 at ground will allow the data at X1 to be shifted into the FF. Conversely, holding X1 at ground will allow data at X2 to be shifted in. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

3. Shift Registers – Parallel-in Serial-out Next, addition of two AND gates and two inverters that will allow the selection of data X1 or data X2. If the control line is high, the upper AND gate is enabled and the lower AND gate is disabled. Thus X1 will appear at the upper leg of the NOR gate while the lower leg of the NOR gate will be at ground level. On the other hand, if the control line is low, the upper AND gate is disabled while the lower AND gate is at ground level. Control is high: Data bit at X1 will be shifted into the FF at the next clock transition. Control is low: Data bit at X2 will be shifted into the FF at the next clock transition. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

3. Shift Registers: Parallel-in Serial-out 54/74166 8 bit Shift Register Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out The fourth type of register is designed such that data can be shifted either into or out of the register in parallel. Q0 CLK D C Q Q1 Q2 Q3 Parallel data inputs D0 D1 D2 D3 Parallel data outputs Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out 74ALS174 is an 6 bit register that has parallel inputs D5 through D0 and parallel-outputs Q5 through Q0. It is simply a parallel arrangement of six D-FF. Each FF is negative-edge triggered and thus a PT will shift data into the register. The six data bits, D1 through D6 are all shifted into the register in parallel. The stored data is immediately available, in parallel, at the outputs Q1 through Q6. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out Another example is 54/74198 is an 8-bit TTL having both parallel input and parallel output capacity. It uses positive edge-triggered FFs. Notice that a 24-pin package is required since 16 pins are needed just for the input and output data lines. It is also used to shift data through the register in either direction – shift left and shift right. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out Since this register is used to store the data, it is referred to as data register or data latch. Notice that it is not possible to shift stored data either to the right or to the left. A low level at the clear input will immediately reset all FFs low. The clear input is asynchronous – it can be done at any time and it takes precedence over all other inputs. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out Another example is 54/7495A is a 4-bit parallel access shift register. It can be packaged in a 16-pin DIP. It has serial data input and can be used to shift data to the right (from QA toward QB) and to the left. Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

4. Shift Registers – Parallel-in Parallel-out Serial loading - reading values off Da fill register in a serial fashion Serial Output - contents of register appear one by one on the Qd output as each clock pulse applied Parallel Output- Contents output in parallel using Qa through Qd Parallel loading - Contents of all registers loaded in a single clock pulse - Da through Dd available

Registers/Shift registers Summary Registers consist of a group of D-type latches or flip-flops which are clocked simultaneously to store a binary word set-up and hold times must be observed Shift registers allow data to be moved from one bit position to another used for parallel«serial conversion and some types of arithmetic operations