8.flip flops and registers

19
BCA 5 th Semester Flip Flops and Registers

Transcript of 8.flip flops and registers

Page 1: 8.flip flops and registers

BCA 5 th Semester

Flip Flops and Registers

Page 2: 8.flip flops and registers

FLIP FLOPSDEFINITION: Flip flop is a basic memory element in a digital

computer. It is used to store One bit of information with a 0 or a 1.

TYPES OF FLIP FLOPS:

R S flip flop (Reset & Set).

D flip flop (Delay / Data).

J K flip flop.

T flip flop (Toggle).

Master Slave J K flip flop.

CHARACTERISTICS :

Flip-flop is a bi stable device ,It has only two states 0 and 1.

Flip-flop has two outputs, One output is complement of other.

Page 3: 8.flip flops and registers

RS - FLIP FLOPLogic Symbol :Logic Symbol : Logic Circuit :Logic Circuit :

Truth table :Truth table :

Page 4: 8.flip flops and registers

If both S and R are 0 during transition, the output does not change.

If S= 1 and R= 0, the out put Q is set to 1.

If S= 0 and R=1, the output is cleared or reset to 0.

If both S and R are 1, the output is unpredictable. This condition

makes the RS flip flop difficult to manage and therefore is forbidden in

practice.

Working of RS flip flop

Page 5: 8.flip flops and registers

Logic diagram with NAND gates Logic diagram with NAND gates

D Q(t+1) STATE

0 0 Clear to 0

1 1 Clear to 1

TRUTH TABLE FOR D FLIPFLOP :TRUTH TABLE FOR D FLIPFLOP :

D - FLIP FLOP

D

C

Q

Q’

Logic diagram:Logic diagram:

Page 6: 8.flip flops and registers

The D input goes directly into the S input and the complement of the

D input goes to the R input.

If it is 1, the flip-flop is switched to the set state (unless it was

already set).

If it is 0, the flip-flop switches to the clear state.

Applications:

Registers as storage devices.

Used as a Buffer.

In Digital system.

Working of D – Flip flop:

Page 7: 8.flip flops and registers

JK - FLIP FLOP LOGIC DIAGRAM:LOGIC DIAGRAM: LOGIC DIAGRAM USING NAND GATES:LOGIC DIAGRAM USING NAND GATES:

J K Q(t+1) STATE

0 0 Q(t) No change

0 1 0 reset

1 0 1 set

1 1 Q’(t) complement

TRUTH TABLE:TRUTH TABLE:

Page 8: 8.flip flops and registers

When j and k both are 0, the data inputs have no effect on the outputs.

When j=0 and k=1, the flip flop is reset or cleared to 0.

When j=1 and k=0. the flip flop is set to 1.

When j and k are 1, if the state of flip flop was 0,applying a clock with 1and

flip flop state was 1, it changes to 0.this on off state is TOGGLING.

Racing condition: Toggling between 0 to 1 and 1 to 0 alternatively for one

clock cycle.

APPLICATIONS:

Counters

Frequency Dividers

Working of JK – Flip Flop :

Page 9: 8.flip flops and registers

T - FLIP FLOP LOGIC DIAGRAM:LOGIC DIAGRAM: LOGIC DIAGRAM USING NAND GATES:LOGIC DIAGRAM USING NAND GATES:

TRUTH TABLE:TRUTH TABLE:

T Q(t+1) STATE

0 Q(t) No Change

1 Q’(t) Complement

Page 10: 8.flip flops and registers

The T - flip flop is also known as the TOGGLE - flip flop. The toggle

mode of JK flip flop is used as T - Flip flop.

This Flip flop can be obtained from a JK flip flop when inputs J and K

are connected to provide a single input designated by T.

The T flip-flop is a single input version of the JK flip - flop. The T flip-

flop is obtained from the JK type if both inputs are tied together. The

output of the T flip-flop "toggles" with each clock pulse..

When t=0, (j=0, k=0) the clock transition does not change.

When t=1, (j=1, k=1) the clock transition complements the state.

T - FLIP FLOP

Page 11: 8.flip flops and registers

Master slave jk - FlIP FlOP LOGIC DIAGRAM:LOGIC DIAGRAM:

TIMING RELATIONSHIP:TIMING RELATIONSHIP:

Page 12: 8.flip flops and registers

It is a Combination of 2 flip flops. Where, the first is the Master that

responds to the positive edge of the clock and the second is the slave

which responds to the negative level.

The output changes only during the negative edge transition of the

clock.

Output triggers only for negative edge triggering.

This helps in avoiding the racing condition in JK flip flop where it can

be triggered only once within a clock cycle.

Master/Slave triggering has become obsolete. Newer flip flops use

negative edge triggering.

Master slave jk - FlIP FlOP

Page 13: 8.flip flops and registers

Flip flops have a wide variety of applications. They are:

REGISTERS

FREQUENCY DIVIDERS

DIGITAL COUNTERS

aPPlICatIONs OF FlIP FlOPs:

Page 14: 8.flip flops and registers

reGIsters

Collection of a group of flip flops and logic gates which affect

their transition.

Basic function is to hold information.

It may have combinational gates that perform certain data

processing tasks in addition to flip flops.

It consists of a group of flip flops and gates that effect their

transition.

Page 15: 8.flip flops and registers

A REGISTER capable of shifting binary information in one or both

directions.

Consists of a series of flip flops cascaded together with the output of one

flip flop connected to the input of the other flip flop.

All flip flops receive common clock pulses that initiate the shift from one

stage to the next.

They are generally provided with a Clear or Reset connection so that

they can be "SET" or "RESET" as required.

Controlled with certain clock pulses by inhibiting the clock from the

input of the register if shift is not required.

It is also able to provide extra circuits to control the shift operation

through the D inputs of the flip flops rather than the clock input.

shIFt reGIsters

Page 16: 8.flip flops and registers

Common clock pulse.

Output of one is connected to other.

Serial input determines bit position shifting left.

Shifting information depends on connecting clock to AND gate.

4 bit Shift REGiStERS

Page 17: 8.flip flops and registers

ChaRaCtERiStiCS

Provide necessary input and output terminals for parallel data

transfer.

An input for clock pulses to synchronize all operations.

A control state that leaves the information in the register

unchanged even through clock pulses are applied continuously.

Shift registers are of two types depending upon the direction

of shift. They are:

Unidirectional: Capable of shifting only in one direction

Bidirectional: Capable of shifting in both directions

Page 18: 8.flip flops and registers

appliCationS

Used to interface digital systems.

Can be used as simple delay circuits.

They can be used to convert serial data to parallel data

commonly in microprocessor based system.

It can also be used for multiplication by shifting left and division

by shifting right.

Page 19: 8.flip flops and registers