Digital Circuits/Registers and Counters

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Let's say we take several latches, and we put them all in a row. We can then connect the outputs of each latch to the inputs of the next latch in the following way: Each clock cycle, the output of one latch goes into the next latch, and the next latch receives the data. In this way, we essentially "shift" each value down the row of latches. This mechanism is called a shift register

Contents

[edit] Registers

Each flip-flop is a binary cell capable of storing one bit of information. A Register is simply a group of flip-flops. An n-bit register has a group of n flip-flops. The basic function of a register is to hold information within a digital system so as to make it available to the logic elements during the computing process. Since a register consists a finite number of flip-flops and as each of those flip-flops is capable to store a single 0 or 1, there are a finite number of 0-1 combinations that can be stored into a register. Each of those combinations is known as state or content of that register. With flip-flop we can store data bitwise but usually data does not appear as single bits. Instead it is common to store data words of n bit with typical word lengths of 4, 8, 16, 32 or 64 bit. Thus, several flip-flops are combined to form a register to store whole data words. Registers are synchronous circuits thus all flip-flops are controlled by a common clock line. As registers are often use to collect serial data they are also called accumulators. There exist several types of registers as there are -

[edit] Shift Registers

Information often comes bitwise i.e. one bit every clock pulse. To store such data shift registers are used. A shift register has one input. Every clock pulse one bit is loaded into the first flip-flop of the register while all the actual flip-flop contents are shifted and the “oldest” bit got dropped. If the output of all flip-flops (and therefore the register’s complete content) are read from the lines Q1 to Qn the register is used as Serial In – Parallel Out (SIPO). A typical purpose for such a SIPO register is to collect data that is delivered bitwise and that is needed in n-bit data words (e.g. to convert the signals from serial ports of a computer: the line transports 1 bit a time, the computer uses 8, 16 or 32 bit data words). Shifting bits are important for mathematical operations: if the output of the whole register is interpreted as a dual number, shifting by on bit corresponds to multiplying or dividing by 2 (depends on which flip-flop is interpreted as MSB).

[edit] Cyclic Registers

Sometimes it is necessary to “recycle” the same values again and again. Thus the bit that usually would get dropped is fed to the register input again to receive a cyclic serial register

[edit] Parallel In-Serial Out

As there is a need for serial – parallel conversion the inverse operation is equally required. It is done by a Parallel In – Serial Out register (PISO) that allows loading data as whole data words and serial shifting. For this operation it needs two control lines: one to trigger the shifting and one to control when a new data word is loaded to the register .

[edit] Barrel Shifters

[edit] Cascade Shifters

[edit] Counters

A counter is a sequential circuit that – counts. That means it proceeds through a pre-defined sequence of states where the state of the circuit is determined by the states of all its flip flops. As every state of the circuit can be given a number we can say that a counter produces a sequence of numbers. A commonly used approach is to interpret a circuits state as dual number, so if flip-flop A,B and C are all 0 the counter’s state is 0. if A is 1, B is 0 and C is 1 the counter’s state is 101 = 5 and so on. The most basic counters will simply increment by 1 with every clock pulse, so after state 100 it will go to 101; the next pulse will let it switch to 110 etc. It is possible to design counters with any needed counting sequence. Even though asynchronous sequential circuits are not subject of this course the asynchronous counter is presented here exceptionally to give a slight impression on how

4 bit counter.png

[edit] Two types of counters:

[edit] Ring Counters

[edit] Johnson Counters

This section of the Digital Circuits wikibook is a stub. You can help by expanding this section. If you add something, list yourself as a Contributor.

In other languages