#5 Slide Set 11
#5 Slide Set 11
Design
Lecture Set 11
Assignment 2
• Explain how parity bits are used for error detection.
• Can we use them for error correction?
• What is the difference between even parity and odd parity?
• What is the number of error-bits that can be detected using parity
bits?
• Which gate is used to generate even parity bits?
• Draw a truth table and schematic for generating an even parity bit for
a FOUR-bit (4-bit) message.
• Note:
• Maximum six handwritten pages
• Clearly write your name and roll number on the first page
• Must be stapled properly before submission
• Viva will be conducted to mark the assignment
3 of 26
Assignment 2
• Submission and viva
• BSCS 3A: Monday, 30th December 2024
• BSCS 3B: Thursday, 2nd January 2025
• BSSE 3A: Thursday, 2nd January 2025
• BSSE 3B: Tuesday, 31st December 2024
4 of 26
Sequential Circuits
• Can store the results of previous inputs
• Output depends on
• Present inputs and
• The state of the storage elements
• Have feedback
• Have memory elements
8 of 26
Sequential Circuits
• A time sequence of
• Inputs
• Outputs
• Internal states
9 of 26
Sequential Circuits
• Two Types based on Timing:
1. Asynchronous Circuits:
• No separate clock signal
• Behavior of depends upon the input signals at any instant of time
and the order in which the inputs change
• Instability problem makes their design difficult
2. Synchronous Circuits:
• Generally, use a separate clock signal
• Behavior can be defined from the knowledge of its signals at
discrete instants of time, based on clock pulses
• Simpler to design
10 of 26
Latches
• Level-Triggered: Latches change their output state
based on the level of their input signals
• Asynchronous: Latches don't require a clock signal
• Sensitive to Input Changes: Latches are constantly
monitoring their inputs and will update their output
whenever there is a change.
• Less Robust: More chances of errors
14 of 26
Flip-Flops
• Flip-flops use latches as their building blocks
• Use clock signals
• Edge-Triggered: Change output state based on the edge
of a clock signal.
• Synchronous: Need a clock signal to synchronize their
operation
• Less Sensitive to Input Changes: Flip-flops only sample
their inputs at the specific clock edge
• More Robust: Less chance of errors
15 of 26
RS Latch
• Aka SR Latch
• Direct-coupled / Unclocked RS flip-flop
• A circuit with
• two cross-coupled NOR gates or
• two cross-coupled NAND
• Two inputs labeled
• S for set and
• R for reset.
16 of 26
RS Latch
RS Flip-Flop
• Clocked RS Latch
• Consists of
• A simple RS Latch
• With two additional AND gates
• For combining S and R with clock signal
• Works when the clock signal is high
19 of 26
RS Flip-Flop
JK Flip Flop
• A refined form of RS flip-flop
• J = Set
• K = Reset (Clear)
• Klear
• When J = K = 1
• Inverts the output
• Thus, solving the problem of undefined state
21 of 26
JK Flip Flop
22 of 26
D Flip Flop
• Single-input version of RS flip-flop
• Has a single input called D
• For data
• D goes to S
• Complement of D goes to R
• An extra inverter needed
• Usually built using NAND gates
23 of 26
D Flip Flop
24 of 26
T Flip Flop
• A single-input version of the JK flip-flop
• Toggles the output when the input T = 1
• Obtained if J and K inputs of a simple JK flip-flop are tied
together
25 of 26
T Flip Flop
26 of 26