You are on page 1of 6

CHIRANJEEVI.G. UDNOOR VTU: 3PD09EC403 Q NO.

8 : SEQUENTIAL LOGIC INTRODUCTION We now introduce a new type of circuit that is constructed from devices that remember their previous inputs. The logic circuits with combinational elements whose outputs are functions of their inputs only. Given a knowledge of a combinational circuits inputs and its Boolean function, we can always calculate the state of its outputs. The output of a sequential circuit depends not only on its current inputs, but also on its previous inputs. Even if we know a sequential circuits Boolean equations, we cant determine its output state without knowing its past history (i.e. its previous internal states).The basic building blocks of sequential circuits are the flip-flop, bistable, and latch just as the basic building block of the combinational circuit is the gate. Its not our intention to deal with sequential circuits at anything other than an introductory level, as their full treatment forms an entire branch of digital engineering. Sequential circuits cant be omitted from introductory texts on computer hardware because they are needed to implement registers, counters, and shifters, all of which are fundamental to the operation of the central processing unit.

Figure 8.1 : The sequential circuit.

P8.1

Figure 8.1 describes the conceptual organization of a sequential circuit. An input is applied to a combinational circuit using AND, OR, and NOT gates to generate an output that is fed to a memory circuit that holds the value of the output. The information held in this memory is Called the internal state of the circuit. The sequential circuit uses its previous output together With its current input to generate the next output. This statement contains a very important Implicit concept, the idea of a next state. Sequential circuits have a clock input, which triggers the transition from the current state to the next state. The counter is a good example of a Sequential machine because it stores the current count that is updated to become the next Count. We ourselves are state machines because our future behavior depends on our past. WHAT IS SEQUENTIAL LOGIC? Sequential logic elements perform as many different functions as combinational logic elements; however, they do carry out certain well-defined functions, which have been given names. Latch: A latch is a 1-bit memory element .You can capture a single bit in a latch at one instant And then use it later; for example, when adding numbers you can capture the carry-out in a latch and use it as a carry-in in the next calculation. Register: The register is just m latches in a row and is able to store an m-bit word; that is, the Register is a device that stores one memory word. A computers memory is just a very large Array of registers. Shift register: A shift register is a special-purpose register that can move the bits of the word it Holds left or right; for example the 8-bit word 00101001 can be shifted left to give 01010010. Counter: A counter is another special-purpose register that holds an m-bit word. However, When a counter is triggered (i.e. clocked) its contents increase by 1; for example, if a counter Holding the binary equivalent of 42 is clocked, it will hold the value 43. Counters can count up Or down, by 1 or any other number, or they can count through any arbitrary sequence. State machines: A state machine is a digital system that moves from one state to another Each time it is triggered. You can regard a washing machine controller as a state machine That steps though all the processes involved in washing. Ultimately, the computer itself is a nothing more than a state machine controlled by a program and its data. P8.2

Figure 8.2 : The sequential components.

One of the most basic sequential circuits is the flip-flop. A flip-flop stores a single bit. The Simplest type of flip-flop is the D flip-flop. It has two inputs: D and clock. When clock is 1, the value of D is stored in the flip-flop, and that value appears at an output Q. When Clock is 0, the value of D is ignored; the output Q maintains its value. Another type of Flip-flop is the SR flip-flop, which has three inputs: S, R and clock. When clock is 0, the Previously stored bit is maintained and appears at output Q. When clock is 1, the inputs S And R is examined. If S is 1, a 1 is stored. If R is 1, a 0 is stored. If both are 0, theres no Change. If both are 1, behavior is undefined. Thus, S stands for set and R for reset. Another flipflop type is a JK flip-flop, which is the same as an SR flip-flop except that when both J and K are 1, the stored bit toggles from 1 to 0 or 0 to 1. To prevent unexpected behavior from signal glitches, flip-flops are typically designed to be edge triggered, meaning they only pay attention to their non-clock inputs when the clock is rising from 0 to 1, or alternatively when the clock is falling from 1 to 0. Just as we used more abstract combinational components to implement complex combinational systems, we also use more abstract sequential components for complex P8.3

Sequential systems. Figure 8.2 illustrates several sequential components, which we now describe. A register stores n bits from its n-bit data input I, with those stored bits appearing at its output O. A register usually has at least two control inputs, clock and load. For a Rising-edge-triggered register, the inputs I are only stored when load is 1 and clock is Rising from 0 to 1. The clock input is usually drawn as a small triangle, as shown in the Figure. Another common register control input is clear, which resets all bits to 0, Regardless of the value of I. Because all n bits of the register can be stored in parallel, we Often refer to this type of register as a parallel-load register, to distinguish it from a shift Register, which we now describe. A shift register stores n bits, but these bits cannot be stored in parallel. Instead, they Must be shifted into the register serially, meaning one bit per clock edge. A shift register has a one-bit data input I, and at least two control inputs clock and shift. When clock is rising and shift is 1, the value of I is stored in the nth bit, while the nth bit is stored in the n-1th bit, and likewise, until the second bit is stored in the first bit. The first bit is typically shifted out, meaning it appears over an output Q. A counter is a register that can also increment (add binary 1) to its stored binary value. In its simplest form, a counter has a clear input, which resets all stored bits to 0, and a count input, which enables incrementing on the clock edge. A counter often also has a parallel load data input and associated control signal. A common counter feature is both up and down counting (incrementing and decrementing), requiring an additional control input to indicate the count direction. The control inputs discussed above can be either synchronous or asynchronous. A synchronous inputs value only has an effect during a clock edge. An asynchronous inputs value affects the circuit independent of the clock. Typically, clear control lines are asynchronous. Sequential logic design can be achieved using a straightforward technique, whose steps are illustrated in Figure 8.2. We will implement this state diagram using a register to store the current state, and combinational logic to generate the output values and the next state. We assign each state with a unique binary value, and we then create a truth table for the combinational logic

P8.4 The inputs for the combinational logic are the state bits coming from the state register, and the external inputs, so we list all combinations of these inputs on the left side of the table. The outputs for the combinational logic are the state bits to be loaded into the register on the next clock edge (the next state), and the external output values, so we list desired values of these outputs for each input combination on the right side of the table. Because we used a state diagram for which outputs were a function of the current state only, and not of the inputs, we list an external output value only for each possible state, ignoring the external input values. Now that we have a truth table, we proceed with combinational logic design as described earlier, by generating minimized output equations, and then drawing the combinational logic circuit.

P8.5

You might also like