[MUSIC] This lesson, and the following ones, deal with particular sequential circuits, that are basic building blocks for larger circuits namely, registers, the today subject, counters and memory blocks. Here is an example of n-bit register consisting of n flip-flips whose all synchronization inputs are connected to an external signal LOAD. You can see here that all the synchronization inputs are connected to the same LOAD signal. All their reset inputs [BLANK_AUDIO] are connected to the same external RESET signal; the set inputs are not used. It has n DATA inputs IN(n-1), IN(n-2), and so on, And n data outputs OUT(n-1), OUT(n-2), and so on. And these are two examples of symbols. Some registers have also an NOT(OE) (Output Enable) control signal. It allows to directly connect the register to a BUS as the 3-state buffers are included within the register. Observe that in this case the active value of the Output Enable control signal is the low value 0; for this reason the signal is called NOT(OE) instead of OE. Shift registers are another type of register. As in the case of simple parallel registers, they store n-bit data but, furthermore, they can shift the stored data one bit to the right, or to the left, it depends, at each clock pulse. They have several applications. For example, they can be used to multiply by 2 or to divide by 2 a number. An example: consider this number, this 7-bit vector. To multiply the represented number by 2, what we can do is just to shift all bits one position to the left and to add a more significant bit equal to 0. If we want to divide the same number by 2, what we can do is to shift all bits one position to the right and to add a more significant bit equal to zero. So, this is the first application of shift registers: to multiply by 2 or to divide by 2. Here is [BLANK_AUDIO] an example of shift register that can shift one bit to the right its contents at each clock pulse. Observe that the output of the first flip-flop is connected to the input of the next one; the output of the second one to the input of the third one, and so on, so that at each clock pulse the content of the register is shifted one bit to the right and, furthermore, a new more significant bit is inputted to the register. [BLANK_AUDIO] Here you can see two examples of symbols used for that (for representing this register). Actually, there are several types of shift registers, several types according, for example, to the shift direction. We can define register that shift to the right or to the left, with or without serial input. We can also define bidirectional registers or cyclic shift registers, either to the right or to the left or bidirectional. Cyclic means that if the the current content is X(3), X(2), X(1), X(0), in the case of a 4-bit register, if we shift to the right, then the result is X(3), X(2), X(1), and X(0) is inputted on the left side of the register. In the case of a cyclic shift to the left, then the new contents are X(2), X(1), X(0), X(3); X(3) is inputted to the right side of the stored vector. Here is an example of 5-bit bidirectional shift register. If the control signal L/R is equal to 0, then at each clock pulse the register contents are shifted to the left; observe that the input to the first flip-flop, when the control signal is 0, comes from the output of the second one; the input to the second flip-flop comes from the output of the third one, and so on. So that it's a shift to the left. Conversely, if the signal is equal to 1, then you can see that the input to the first flip-flop is the external serial input, the input to the second flip-flop is the output of the first one, and so on. There are also several types of shift registers according to the way the data are inputted to the register; they can be inputted either in parallel or serially. In this example, when the control signal L/S (that means Load/Shift), when the signal is equal to 0, then input number n-2 is inputted to the second flip-flop, input number n-3 is input to the third flip-flop, and so on. And input number n-1 is always inputted to the first flip-flop. When this control signal is equal to 1, then the output of flip-flop number 1 is inputted to flip-flop number 2, the output of flip-flop number 2 inputted to flip-flop number 3, and so on. So that when L/S is equal to 1, a shift to the right is performed. Thus, with L/S equal to 0, n bits are inputted in parallel, and with L/S equal to 1, one bit (this one) is inputted and one bit is outputted through the serial output. Observe that the external data are stored, when L/S is equal 0, on a positive edge of the synchronization CK. That means that this is a flip-flop with synchronous load. Sometimes, there are other control signals. For example, some shift registers have a PL control signal: when active, for example equal to 1, input bits number n-1, n-2, and so on down to input 0 will be loaded within the register, but independently of the synchronization signal. In this case, the PL input controls an asynchronous load. [BLANK_AUDIO] Another example of control signal is CE (clock enable): when it is active the clock signal is enabled, and when non-active, the clock signal is disabled and, in particular, there is no shift. Another example that we have already seen in the case of simple registers is the OE (output enable) signal. When active (in this case when equal to 0) all output buffers are enabled and when equal to 1 all outputs are in high impedance. [BLANK_AUDIO] Here is the symbol of a right shift register with either synchronous load, if the load signal is called L/S, or asynchronous load if the load signal is called PL. For example, in the case of a register with a synchronous load, PL is used to store a new value, independently of the clock signal, while CE (clock enable) is used to shift to the right. In the case of a register with synchronous load, in which case the name of the signal is L/S, then this signal L/S is used to either store a new value or to shift to the right, with the condition (in both cases) that the clock is enabled. So, in the case of synchronous load, we use L/S, and CE must be used to enable the clock. In the case of asynchronous load, PL is used to load a new value within the register, and CE is used to shift the contents of the register (in this case) to the right. Let us see some typical applications of shift registers. We have already seen that they can be used to implement multiplications and divisions by 2. Another application, in the field of signal transmission, is the conversion from parallel to serial and from serial to parallel. Assume that a circuit, this one, generates n-bit data that must be transmitted to another circuit, this one, using for that a 1-bit transmission channel. Then, we can store the n-bit data within a shift register, this register, and then serially shift out the n bits from the register. The n bits are serially transmitted in n clock cycles. Then, on the receiver side, the n bits are serially shifted within this register, and once all are stored within the register, they can be read in parallel by the destination system. A third example of application is sequence recognition. Consider a circuit that receives a sequence of 1's and 0's. It stores the latest received bits and will generate an output equal to 1 every time the four latest received bits are 1, 0, 0, 1 because in this first flip-flop we use the normal output; in this one, the inverted output; the same here, and finally, in the last one, the normal output. Here is another example: it is a 3-bit sequence recognizer consisting of three 1-bit recognizers working in parallel. It generates an output equal to 1 every time the four latest received 3-bit vectors are 0, 0, 1; 0, 0, 0; 0, 1, 0; and 1, 1, 0. In decimal, 1 0 2 6. Summary of this lesson. We have described the working of parallel registers that are used to store n-bit data and are fundamental computer components. We have also described the working of different types of shift registers, and we have given several examples of application.