Flip Flops
Flip Flops
LATCHES:
A latch is a simple memory element that holds a binary value (0 or 1). It is level-sensitive,
meaning it continuously responds to its inputs when the control signal is active (either high or
low).
Operation: A latch changes its output as long as the control signal is active (not edge-
triggered). It can be either active-high or active-low, depending on when it allows input
changes.
Types:
SR (Set-Reset) Latch:
o Inputs: S (Set), R (Reset)
o Set: If S = 1 and R = 0, output (Q) becomes 1.
o Reset: If S = 0 and R = 1, output (Q) becomes 0.
o Hold: When S = 0 and R = 0, it holds its current state.
o Invalid: When S = 1 and R = 1, this state is invalid.
D (Data) Latch:
o Input: D (Data), En (Enable)
o When Enable is active, output follows the D input.
o If Enable is inactive, the output holds the previous value.
Usage: Latches are simpler and faster than flip-flops but are asynchronous, meaning they
don’t rely on a clock signal, making timing control more challenging. They are used where
data must be latched quickly, like in memory buffers.
Flip Flop
A flip-flop is a sequential digital circuit with two stable states, designed to store a single bit of binary
data. It serves as the basic building block for all memory devices. In digital electronics, flip-flops are
essential building blocks that form the backbone of various circuits, enabling devices to store and
process data in binary form. Whether in memory units or timing circuits, flip-flops play an important
role in controlling data flow, which is fundamental to computer operations.
A flip-flop is more sophisticated than a latch and is edge-triggered, meaning it only changes
its state based on a specific clock signal transition (edge). It is used in synchronous circuits,
where data changes only on clock pulses, providing precise control.
Operation: A flip-flop responds only to the clock edge (either rising or falling edge),
not to the clock level, making it more controlled than a latch.
Edge-Triggered Flip-Flops:
Flip-flops are edge-triggered devices. This means they only respond to changes in input at a
specific transition of the clock signal—either the rising edge (low to high) or the falling edge
(high to low).
Rising Edge: When the clock signal changes from 0 to 1 (low to high).
Falling Edge: When the clock signal changes from 1 to 0 (high to low).
Edge-triggering means that the flip-flop samples the inputs (D, J, K, or T) only at the
moment of the clock transition, making the circuit synchronous and well-timed.
Use Simple memory element for fast operations Precise control of data storage
Latches are simple memory devices that are level-sensitive and change state as long as their
control signal is active.
Flip-Flops are more controlled and change state only on specific clock edges, making them
suitable for synchronous systems.
Edge-triggered flip-flops react only on a rising or falling clock edge, providing more precise
timing in digital circuits.
Flip-flops operate by reacting to either the rising or falling edge of a clock pulse,
and they are a significant part of digital electronics for storing information over
time. This helps in designing systems where specific sequences of data are
required.
Types of Flip-Flops
A flip-flop is a basic digital memory circuit that can store one bit of data, either 0
or 1. It is widely used in computers and digital systems to store state information.
Let’s break it down into simple parts.
Key Concepts:
There are several types of flip-flops, each designed for different operational
purposes. Here is a detailed explanation of the most common types:
o SR Flip-Flop
o JK Flip-Flop
o D Flip-Flop
o T Flip-Flop
SR Flip-Flop
The SR flip flop in digital electronics is the simplest type. It has two inputs, Set (S)
and Reset (R), and two outputs, Q and Q'. This type of flip-flop sets the output to 1
when the S input is triggered and resets it to 0 when the R input is activated.
However, there is a limitation when both inputs are 1, leading to an undefined
state.
Inputs Outputs
S = 0, R = 0 No change
S = 0, R = 1 Q = 0, Q’ = 1( RESET)
S = 1, R = 0 Q = 1, Q’ = 0 (SET)
S = 1, R = 1 Invalid State
Figure- Logic Circuit of SR Flip Flop
Inputs Outputs
J = 0, K = 0 No change
J = 0, K = 1 Reset (Q = 0)
J = 1, K = 0 Set (Q = 1)
J = 1, K = 1 Toggle (complement of previous state)
In a D flip-flop, the output changes only during the positive or negative clock
transitions, while any input changes at other times do not affect the output.
D flip-flops are commonly used in shift registers and counters. The output state
depends on the active clock transition, with the output (Q) mirroring the input and
changing solely during the clock's active transition.
Figure- Logic Circuit of D Flip-Flop
The D flip flop in digital electronics, also known as the data or delay flip-flop,
ensures that the output follows the input with every clock pulse. It has a single
data input, which simplifies the design and is widely used in registers and memory
units.
Inputs Outputs
D=0 Q=0
D=1 Q=1
The T flip flop in digital electronics toggles the output state with every clock pulse
when the input T is high. It is often used in counters and other timing applications.
Inputs Outputs
T=0 No change (previous value same as Output)
T=1 Toggle ( Previous value is complemented as
output)
Figure- Circuit Diagram of T Flip-Flop
INTEGRATED CIRCUITS
Analog Design
Digital Design
Mixed Design
Digital Design
The digital design approach is used to create integrated circuits (ICs), which
are utilised as computer memories (such as RAM and ROM) and
microprocessors. With this approach to design, the circuit density and
overall efficiency are both maximised. The ICs created with this technique
operate with binary input data like 0 and 1. The process for designing digital
integrated circuits is depicted in the diagram below.
Analog Design
IC chip is created by using the analogue design process when:
Definition:
An alphanumeric code is a type of binary code that is designed to represent
not only numbers but also alphabetic characters (letters) and special
symbols (e.g., punctuation marks, spaces). These codes are extensively used
in computers, digital devices, and communication systems for data
representation and processing.
Description:
o ASCII is a 7-bit code (can represent 128 unique characters).
o Extended ASCII (8-bit) expands this to 256 characters.
Example:
o Character 'A' → Binary: 1000001 (Decimal 65).
o Character 'a' → Binary: 1100001 (Decimal 97).
o Digit '1' → Binary: 0110001 (Decimal 49).
2. Unicode
Description:
o A universal encoding standard that supports a vast range of
characters and symbols across multiple languages and scripts.
o Uses 16 bits (or more) to represent characters, enabling over a
million unique codes.
Example:
o Character 'A' → Unicode: U+0041.
o Character '🙂' (smiley) → Unicode: U+1F642.
3. EBCDIC (Extended Binary Coded Decimal Interchange Code)
Description:
o An 8-bit code primarily used on IBM mainframe and midrange
systems.
o Example:
Character 'A' → Binary: 11000001 (Decimal 193).
Error detection codes identify whether an error has occurred during data
transmission. These codes cannot correct errors, but they ensure that
errors are flagged for further action.
1. Parity Bits:
o A single bit is added to the data to make the number of 1s either
even (even parity) or odd (odd parity).
o Example:
Data: 1010
Even Parity: Add 0 → 10100
Odd Parity: Add 1 → 10101.
2. Checksum:
o Data blocks are divided into smaller units, summed up, and a
checksum is appended.
o At the receiver's end, the checksum is recalculated and
compared.
o Example:
Data: [200, 300, 500]
Sum: 200 + 300 + 500 = 1000
Checksum: 1000.
3. Cyclic Redundancy Check (CRC):
o Data is treated as a binary polynomial and divided by a
predetermined polynomial (divisor).
o The remainder is appended as the CRC code.
o Example:
Data: 1101011011
Divisor: 10011
CRC Remainder: 1110.
Error correction codes not only detect errors but also allow the receiver to
correct errors without retransmission. Error correcting codes not only
detect errors, but also correct them. This is used normally in Satellite
communication, where turn-around delay is very high as is the probability
of data getting corrupt. ECC (Error correcting codes) are used also in
memories, networking, Hard disk, CDROM, DVD etc.
1. Hamming Code:
o Adds redundancy bits (parity bits) at specific positions in the
data.
o Can detect and correct single-bit errors.
o Example:
Data: 1010
Redundant Bits: Added at positions 2^0, 2^1, 2^2, ... to
satisfy parity checks.
Encoded Data: 011010.
2. Reed-Solomon Code:
o A block-based error correction code that works on symbols (e.g.,
bytes) rather than bits.
o Widely used in CDs, DVDs, and QR codes.
3. BCH Code (Bose–Chaudhuri–Hocquenghem):
o Capable of correcting multiple-bit errors.
o Frequently used in satellite communications and storage
systems.
4. Convolutional Codes:
o Data is encoded in streams using shift registers.
o Decoding uses algorithms like the Viterbi algorithm to correct
errors.
o Widely used in wireless communication.
Redundancy
Low (few extra bits). High (more bits for correction).
Overhead
1. Data Communication:
o Ensures reliable data transfer in networks, satellites, and
wireless systems.
o CRC is used in Ethernet and Wi-Fi.
2. Storage Devices:
o Error correction in CDs, DVDs, SSDs, and hard drives using
Reed-Solomon or BCH codes.
3. Barcodes and QR Codes:
o Use error correction to recover data even if the code is partially
damaged.
4. Space Communication:
o NASA uses advanced error correction codes to ensure data
integrity from deep space probes.
5. Mobile Networks:
o Convolutional codes and turbo codes are used in 4G/5G
communication.