1 of 27

Digital System�Lecture - 08

2 of 27

Register

  • A Register is a collection of flip flops.
  • A flip flop is used to store single bit digital data.
  • For storing a large number of bits, the storage capacity is increased by grouping more than one flip flops.
  • If we want to store an n-bit word, we have to use an n-bit register containing n number of flip flops.

2

3 of 27

Register operations

  • Fetch:
    • To take the instructions given by the users.
    • To fetch the instruction stored into the main memory.
  • Decode: The decode operation is used to interpret the instructions. In decode, the operation performed on the instructions is identified by the CPU. In simple words, the decode operation is used to decode the instructions.
  • Execute: The execution operation is used to store the result produced by the CPU into the memory. After storing this result, it is displayed on the user screen.

3

4 of 27

Types of Registers

  • There are various types of registers which are as follows:

4

5 of 27

Shift Register

  • A group of flip flops which is used to store multiple bits of data and the data is moved from one flip flop to another is known as Shift Register.
  • A Shift Register can shift the bits either to the left or to the right.
  • A Shift Register, which shifts the bit to the left, is known as "Shift left register", and it shifts the bit to the right, known as "Right left register".

5

6 of 27

Serial IN Serial OUT Register

  • In "Serial Input Serial Output", the data is shifted "IN" or "OUT" serially. In SISO, a single bit is shifted at a time in either right or left direction under clock control.

6

7 of 27

Serial IN Serial OUT Register

  • Initially, all the flip-flops are set in "reset" condition i.e. Y3 = Y2 = Y1 = Y0 = 0. If we pass the binary number 1111, the LSB bit of the number is applied first to the Din bit. The D3 input of the third flip flop, i.e., FF-3, is directly connected to the serial data input D3. The output Y3 is passed to the data input d2 of the next flip flop. This process remains the same for the remaining flip flops. The block diagram of the "Serial IN Serial OUT" is given below.

7

8 of 27

Serial IN Serial OUT Register Operation

  • When the clock signal application is disabled, the outputs Y3 Y2 Y1 Y0 = 0000. The LSB bit of the number is passed to the data input Din, i.e., D3. We will apply the clock, and this time the value of D3 is 1. The first flip flop, i.e., FF-3, is set, and the word is stored in the register at the first falling edge of the clock. Now, the stored word is 1000.

8

9 of 27

Serial IN Serial OUT Register Operation

  • The next bit of the binary number, i.e., 1, is passed to the data input D2. The second flip flop, i.e., FF-2, is set, and the word is stored when the next negative edge of the clock hits. The stored word is changed to 1100.

9

10 of 27

Serial IN Serial OUT Register Operation

  • The next bit of the binary number, i.e., 1, is passed to the data input D1, and the clock is applied. The third flip flop, i.e., FF-1, is set, and the word is stored when the negative edge of the clock hits again. The stored word is changed to 1110.

10

11 of 27

Serial IN Serial OUT Register Operation

  • Similarly, the last bit of the binary number, i.e., 1, is passed to the data input D0, and the clock is applied. The last flip flop, i.e., FF-0, is set, and the word is stored when the clock's negative edge arrives. The stored word is changed to 1111.

11

12 of 27

Serial IN Serial OUT Register Truth Table

12

13 of 27

Serial IN Serial OUT Register Waveforms

13

14 of 27

Ripple Counter

  • Ripple counter is a special type of Asynchronous counter in which the clock pulse ripples through the circuit. The n-MOD ripple counter forms by combining n number of flip-flops. The n-MOD ripple counter can count 2n states, and then the counter resets to its initial value.

14

15 of 27

Ripple Counter

  • Features of the Ripple Counter:
    • Different types of flip flops with different clock pulse are used.
    • It is an example of an asynchronous counter.
    • The flip flops are used in toggle mode.
    • The external clock pulse is applied to only one flip flop. The output of this flip flop is treated as a clock pulse for the next flip flop.
    • In counting sequence, the flip flop in which external clock pulse is passed, act as LSB

15

16 of 27

Binary Ripple Counter

  • Features of the Ripple Counter:
    • Different types of flip flops with different clock pulse are used.
    • It is an example of an asynchronous counter.
    • The flip flops are used in toggle mode.
    • The external clock pulse is applied to only one flip flop. The output of this flip flop is treated as a clock pulse for the next flip flop.
    • In counting sequence, the flip flop in which external clock pulse is passed, act as LSB

16

17 of 27

Binary Ripple Counter

  • A Binary counter is a 2-Mod counter which counts up to 2-bit state values, i.e., 22 = 4 values. The flip flops having similar conditions for toggling like T and JK are used to construct the Ripple counter. Below is a circuit diagram of a binary ripple counter.

  • In the circuit design of the binary ripple counter, two JK flip flops are used. The high voltage signal is passed to the inputs of both flip flops. This high voltage input maintains the flip flops at a state 1. In JK flip flops, the negative triggered clock pulse use.

17

18 of 27

Binary Ripple Counter

  • The outputs Q0 and Q1 are the LSB and MSB bits, respectively. The truth table of JK flip flop helps us to understand the functioning of the counter.

18

19 of 27

Binary Ripple Counter

  • The state of the output Q0 change when the negative clock edge passes to the flip flop. Initially, all the flip flops are set to 0. These flip flop changes their states when the passed clock goes from 1 to 0. The JK flip flop toggles when the inputs of the flip flops are one, and then the flip flop changes its state from 0 to 1. For all the clock pulse, the process remains the same.

19

20 of 27

Binary Ripple Counter

  • The output of the first flip flop passes to the second flip flop as a clock pulse. From the above timing diagram, it is clear that the state of the second flip flop is changed when the output Q0 goes transition from 1 to 0. The outputs Q0 and Q1 treat as LSB and MSB. The counter counts the values 00, 01, 10, 11. After counting these values, the counter resets itself and starts counting again from 00, 01, 10, and 1. The count values until the clock pulses are passed to J0K0 flip flop.

20

21 of 27

Ring Counter

  • A ring counter is a special type of application of the Serial IN Serial OUT Shift register. The only difference between the shift register and the ring counter is that the last flip flop outcome is taken as the output in the shift register. But in the ring counter, this outcome is passed to the first flip flop as an input. All of the remaining things in the ring counter are the same as the shift register.
  • In the Ring counter

No. of states in Ring counter = No. of flip-flop used

21

22 of 27

Ring Counter block diagram

  • Below is the block diagram of the 4-bit ring counter. Here, we use 4 D flip flops. The same clock pulse is passed to the clock input of all the flip flops as a synchronous counter. The Overriding input(ORI) is used to design this circuit.
  • The Overriding input is used as clear and pre-set.

22

23 of 27

Ring Counter block diagram

  • The output is 1 when the pre-set set to 0. The output is 0 when the clear set to 0. Both PR and CLR always work in value 0 because they are active low signals.

PR = 0, Q = 1

CLR = 0, Q = 0

  • These two values(always fixed) are independent with the input D and the Clock pulse (CLK).

23

24 of 27

Ring Counter Working

  • The ORI input is passed to the PR input of the first flip flop, i.e., FF-0, and it is also passed to the clear input of the remaining three flip flops, i.e., FF-1, FF-2, and FF-3. The pre-set input set to 0 for the first flip flop. So, the output of the first flip flop is one, and the outputs of the remaining flip flops are 0. The output of the first flip flop is used to form the ring in the ring counter and referred to as Pre-set 1.

24

25 of 27

Ring Counter Working

  • In the table, the highlighted 1's are pre-set 1.
  • The Pre-set 1 is generated when
  • ORI input set to low, and that time the Clk doesn't care.
  • When the ORI input set to high, and the low clock pulse signal is passed as the negative clock edge triggered.
  • A ring forms when the pre-set 1 is shifted to the next flip-flop at each clock pulse.

25

26 of 27

Ring Counter Working

  • So, 4-bit counter, 4 states are possible which are as follows:

1 0 0 0

0 1 0 0

0 0 1 0

0 0 0 1

26

27 of 27

Thanks!

Any questions?

You can find me at:

  • minhazularefin21@gmail.com

27