What is an SR Flip Flop in Computer Architecture
Ever puzzled by the term SR Flip Flop in computer architecture? You're not alone. It's a fundamental concept, and understanding it unlocks a world of digital circuits and logic design. So, let's dive right in!
SR Flip Flop, short for Set-Reset Flip Flop, is a flip-flop circuit that has two inputs, Set (S) and Reset (R), and one output. It's a memory element, which means it can store one bit of information - either a 0 or a 1. Intrigued? Let's explore its operation, types, and applications.
SR Flip Flop Operation
The SR Flip Flop can be in one of two states, representing either a 0 (Reset) or a 1 (Set). The inputs, S and R, determine the change of state. When S is 1, and R is 0, the output is 1, and the flip-flop is in the 'Set' state. Conversely, when S is 0, and R is 1, the output is 0, and the flip-flop is in the 'Reset' state. But what happens when S and R are both 1? Or both 0?
SR Flip Flop Types
Two fundamental types of SR Flip Flop are S-R latch and S-R flip-flop. The S-R latch, or SR Latch, is a level-triggered device. This means that the input levels 'remember' their state as long as power is supplied. On the other hand, the SR flip-flop is edge-triggered or pulsed. It samples and stores the input during a specific time, making it more suitable for synchronous logic circuits.
Each type has its advantages and is used in different contexts. SR latches are useful in applications where data needs to persist as long as a condition is met, while SR flip-flops are preferable when precise timing is critical, like in sequential logic circuits.
SR Flip Flop Asynchronously
As mentioned earlier, SR Flip Flops have asynchronous behavior when both inputs are simultaneously high (1). To prevent this unwanted behavior, additional logic is used to make the SR Flip Flop controllable. This gives birth to the Master-Slave Flip Flop, a variation of the SR Flip Flop that operates synchronously, eliminating the ambiguity in input states.
But what if we want to control the SR Flip Flop with a clock? Enter our next topic: synchronous SR Flip Flops.
Synchronous SR Flip Flops
Synchronous SR Flip Flops utilize a clock signal to control the sampling of the inputs. This makes them ideal for use in sequential circuits, where precise timing is crucial. The Master-Slave Flip Flop and T Flip Flop are examples of synchronous SR Flip Flops.
Master-Slave Flip Flop
The Master-Slave Flip Flop overcomes the asynchronous ambiguity by separating the Set and Reset inputs into two stages: Master and Slave. The Master reads the inputs, and the Slave latches the value, allowing the SR Flip Flop to operate synchronously with a clock signal.
T Flip Flop (Toggle Flip Flop)
T Flip Flops, or Toggle Flip Flops, also operate synchronously with a clock. However, they have only one input, T (Toggle). When T is 1, the output toggles between 0 and 1 with each clock cycle, a feature that makes them useful in applications like counter circuits.