2. WHAT IS FLIP – FLOP?
A flip-flop is a basic digital electronic circuit
used for storing one bit of data — either a 0
or a 1.
It's a bistable device, meaning it has two
stable states and can switch between them
based on the input signals.
Flip-flops are the building blocks of
memory, registers, and sequential logic
circuits.
3. Characteristics :
• A flip-flop remembers a binary value like a tiny
memory cell. It changes state only when
triggered by a clock or control signal.
• Unlike combinational logic gates, where the
output depends solely on the current inputs, a
flip-flop's output depends on both current and
previous inputs.
• This unique characteristic allows flip-flops to
"remember" or retain a state indefinitely, making
them essential for storing information.
• Many flip-flop circuits are clocked, meaning their
state changes at a specific rate determined by a
clock signal.
4. RS Flip-Flop
The RS flip-flop, also known as the Set-Reset flip-flop, is one of the
simplest types of flip-flops in digital electronics. It is level-sensitive
and stores one bit of binary information (either 0 or 1).
Basic Working of RS Flip-Flop :
The RS flip-flop has two inputs :
1.
Set (S): When this input is activated, the flip-flop outputs 1.
2.
Reset (R): When this input is activated, the flip-flop outputs 0.
The two outputs are :
3.
Q (Output): Represents the stored bit (either 0 or 1).
4.
Q̅ (Complement of Q): The opposite of Q (if Q is 1, Q̅ is 0, and vice
versa).
The simplest way to make a 1-bit set/reset RS flip-flop is to connect
RS flip-flop using NAND gates
5. RS Flip-Flop Truth Table:
Understanding the States
R S Q Q’
0 0 Last value No change
0 1 1 0(set)
1 0 0 1(Reset)
1 1 Illegal
The behavior of the RS flip-flop can be summarized in the
following truth table:
•S = 0, R = 1:
This combination resets the flip-flop,
setting the output Q to 0 and to
Q
̅ 1.
•S = 1, R = 0:
This combination sets the flip-flop,
setting the output Q to 1 and to
Q
̅ 0.
•S = 1, R = 1:
This is an invalid state for an RS flip-
flop because both the Set and Reset
inputs are active, which leads to
contradictory behavior (setting the
output to both 0 and 1 simultaneously).
This state should be avoided in
practice.
• S = 0, R = 0
The flip-flop remains in its
previous state, meaning if it
was previously 1, it stays 1,
and if it was 0, it stays 0.
6. Gated or Clocked RS Flip-flop
A Gated RS Flip-Flop (also called Clocked RS Flip-Flop) is a version of the RS flip-flop that includes a clock
input, which controls when the flip-flop is allowed to respond to the Set and Reset inputs.
⚙️How It Works
•The flip-flop only changes state when Clock (C) = 1.
•Internally, it uses two NAND gates to combine S & Clock and R & Clock.
•These are then connected to a basic RS flip-flop (also using NAND gates).
Truth table for a clocked RS flip-flop
Clocked SR flip-flop
Clocked RS flip-flop
7. JK Flip-Flop
The JK flip-flop is a modified version of the RS flip-
flop that eliminates the invalid state. In an RS flip-
flop, there is an issue where both the Set (S) and
Reset (R) inputs can be activated at the same time,
which creates an invalid output.
To fix this, in the JK flip-flop, the RS flip-flop's inputs
are replaced with 3-input AND gates. These gates
have an additional input coming from the feedback of
the flip-flop's outputs Q and Q̅.
This setup ensures that both inputs (Set and Reset)
cannot be active simultaneously, preventing the
invalid state. The JK flip-flop can now function
without any issues when both inputs are set to 1, and
it also has the ability to toggle its output.
8. D Flip-flops
A D flip-flop stores a single bit of data (either 0 or 1) and changes its state based on the clock signal.
A D flip-flop only changes its output Q and Q̅ on the positive edge (rising edge) of the clock pulse.
•When D = 1 and a positive-going clock edge (rising edge) occurs, the output Q = 1 and Q̅ = 0.
•When D = 0 and a positive-going clock edge occurs, the output Q = 0 and Q̅ = 1.
On the negative edge (falling edge) of the clock pulse, the D flip-flop does not change its state, meaning it's
inactive during that time.
9. Clock Edge Control:
•Edge-triggered flip-flops work by detecting the sharp edges (positive or negative) of the
clock pulse
Types of Edge-Triggered Flip-Flops:
1.Positive Edge-Triggered: Changes state on the rising edge (positive-going edge) of the
clock.
2.Negative Edge-Triggered: Changes state on the falling edge (negative-going edge) of
the clock.
This ensures that the flip-flop only updates its state at the precise moment of the clock
edge, providing precise control in digital circuits.
10. T Flip-flops (Toggle Flip-flop)
A T flip-flop is just a JK flip-flop where both J and K are connected together and renamed as a single
input T(Toggle).
🔧 How It Works:
• T = 0, then J = 0 and K = 0, so the flip-flop does nothing — the output stays the same.
•If T = 1, then J = 1 and K = 1, so the output toggles (flips from 0 to 1 or 1 to 0) on every clock edge
11. Master–Slave JK Flip-flop
A Master-Slave JK Flip-Flop is made by connecting two flip-flops in a row:
1.The first one is called the Master (a JK flip-flop)
2.The second one is the Slave (usually an RS flip-flop)
Both flip-flops share the same clock, but the slave gets an inverted version of the clock
.
When the clock is HIGH (1):
•The master is active (it takes in input and processes it)
•The slave is inactive (it holds its current state)
When the clock goes LOW (0):
•The master is inactive
•The slave is active, and it copies the master’s output
12. Arithmetic Circuits
Combinational logic circuits are used to build adders and subtractors, which are key parts of the
Arithmetic Circuits in computers.
⚙️Where Are They Used?
In a computer's CPU, there’s a special section called the Arithmetic Logic Unit (ALU).
This is where all the math and logic happens.
💡 What Can the ALU Do?
The ALU can:
•➕ Add
•➖ Subtract
•✖️Multiply
•➗ Divide
•🔁 Shift bits
•🔄 Find complements (opposites)
•🔍 Compare numbers
•🟢 Perform logic operations like:
• AND
• OR
• XOR (exclusive OR)
13. Memory Function or Data Storage
CD-ROMs (Compact Disc Read-Only Memory) and floppy disks are storage devices.
•A CD-ROM can store thousands of pages of information.
•It holds much more data than a floppy disk.
Basic Memory Building Block:
•Flip-flops are the basic memory cells used in digital electronics.
Types of Semiconductor Memory:
1.RAM – Random Access Memory (temporary storage)
2.ROM – Read-Only Memory (permanent, pre-written)
3.PROM – Programmable ROM (can be written once)
4.EPROM – Erasable PROM (can be erased and reprogrammed)
Hard Disk Drives (HDD):
•Currently, the main device used for large-capacity (bulk) storage in computers.
14. Digital Systems
In Digital Systems, flip-flops play a fundamental role as basic memory elements. They are used
to store binary information and are essential for implementing sequential logic circuits — circuits
whose output depends not just on the current inputs but also on the past sequence of inputs .
Role of Flip-Flops in Digital Systems:
1. Data Storage (1-bit Memory Cell)
• Flip-flops hold one bit of data.
• Used in registers, caches, and memory arrays.
2. Registers
• A group of flip-flops (typically 8, 16, 32...) used to store multi-bit binary
values.
• Essential in microprocessors and microcontrollers for temporary data
storage.
15. Conclusion on Flip-Flops
Flip-flops are the fundamental building blocks of sequential digital circuits. They
store one bit of binary data and are used in designing memory units, counters,
registers, and control circuits. With their ability to maintain a stable state until
triggered by a clock signal, flip-flops enable digital systems to remember past
inputs and perform complex tasks over time. Their versatility and importance
make them essential components in modern electronics and digital computing
systems.