Static Hazards in Digital Logic
Last Updated :
24 Mar, 2023
A hazard, if exists, in a digital circuit causes a temporary fluctuation in the output of the circuit. In other words, a hazard in a digital circuit is a temporary disturbance in the ideal operation of the circuit which if given some time, gets resolved itself. These disturbances or fluctuations occur when different paths from the input to output have different delays and due to this fact, changes in input variables do not change the output instantly but do appear at the output after a small delay caused by the circuit-building elements, i.e., logic gates. There are three different kinds of hazards found in digital circuits
IN OTHER WORDS,
Consider a logic circuit that is expected to give a logic -1 output momentarily becomes logic-0, because of finite propagation delays of various gates this unwanted switching transient is called HAZARDS.
- Static hazard
- Dynamic hazard
- Functional hazard
We will discuss only static hazards here to understand them completely. Formally, a static hazard takes place when the change in input causes the output to change momentarily before stabilizing to its correct value. Based on what is the correct value, there are two types of static hazards, as shown below in the image:
- Static-1 Hazard: Static-1 Hazards occur in SOP (SUM-OF-PRODUCT) circuit.
- If the output is currently at logic state 1 and after the input changes its state, the output momentarily changes to 0 before settling on 1, then it is a Static-1 hazard.
- In response to an input change & for some combination of PROPAGATION DELAY a logic circuit may go to zero (0) when it should remain constant at one (1) this transient is called a STATIC-1 Hazards as shown in the figure below.
- Static-0 Hazard: Static-0 Hazards occur in the POS (PRODUCT-OF-SUM) circuit.
- If the output is currently at logic state 0 and after the input changes its state, the output momentarily changes to 1 before settling on 0, then it is a Static-0 hazard.
- In response to an input change & for some combination of PROPAGATION DELAY a logic circuit may go to one (1) when it should remain constant at zero (0) this transient is called a STATIC-1 Hazards as shown in the figure below.
Detection of Static hazards using K-map:
Let us consider static-1 hazard first.
To detect a static-1 hazard for a digital circuit following steps are used:
- Step-1: Write down the output of the digital circuit, say Y.
- Step-2: Draw the K-map for this function Y and note all adjacents 1’s.
- Step-3: If there exists any pair of cells with 1’s which do not occur to be in the same group ( i.e. prime implicant), it indicates the presence of a static-1 hazard. Each such pair is a static-1 hazard.
Let’s have an example: Example – Consider the circuit shown below.
We have output, say F, as:
Lets draw the K-map for this
Boolean function as follows:
The pair of 1’s encircled as green is not part of the grouping/pairing provided by the output of this Boolean function. This will cause a static-1 hazard in this circuit. Removal of static-1 hazard: Once detected, a static-1 hazard can be easily removed by introducing some more terms (logic gates) to the function (circuit). The most common idea is to add the missing group in the existing Boolean function, as adding this term would not affect the function by any means but it will remove the hazard. Since in the above example the pair of 1’s encircled with blue color causes the static-1 hazard, we just add this as a prime implicant to the existing function as follows:
Note that there is no difference in the number of minterms of this function. The reason is that the static-1 hazards are based on how we group 1’s (or 0’s for static-0 hazard) for a given set of 1’s in the K-map. Thus it does not make any difference in the number of 1’s in the K-map. The circuit would look as shown below with the change made for the removal of the static-1 hazard.
Similarly, for Static-0 Hazards, we need to consider 0’s instead of 1’s, and if any adjacent 0’s in K-map are not grouped into the same group that may cause a static-0 hazard. The method to detect and resolve the static-0 hazard is completely the same as the one we followed for the static-1 hazard except that instead of SOP, POS will be used as we are dealing with 0’s in this case.
Similar Reads
Full Subtractor in Digital Logic
A full subtractor is a combinational circuit that performs subtraction of two bits, one is minuend and other is subtrahend, taking into account borrow of the previous adjacent lower minuend bit. This circuit has three inputs and two outputs. The three inputs A, B and Bin, denote the minuend, subtrah
3 min read
Half Adder and Half Subtractor using NAND NOR gates
Introduction : A Half Adder is a digital circuit that adds two single-bit binary numbers and outputs the sum and carry. It can be implemented using either NAND gates or with NOR gates. When using NAND gates : The sum output is given by A XOR B. The carry output is given by the A AND B. â âWâhen NOR
5 min read
Encoders and Decoders in Digital Logic
Binary code of N digits can be used to store 2N distinct elements of coded information. This is what encoders and decoders are used for. Encoders convert 2N lines of input into a code of N bits and Decoders decode the N bits into 2N lines. 1. Encoders - An encoder is a combinational circuit that con
4 min read
Encoder in Digital Logic
An encoder is a digital circuit that converts a set of binary inputs into a unique binary code. The binary code represents the position of the input and is used to identify the specific input that is active. Encoders are commonly used in digital systems to convert a parallel set of inputs into a ser
7 min read
Binary Decoder in Digital Logic
A binary decoder is a digital circuit that converts a binary code into a set of outputs. The binary code represents the position of the desired output and is used to select the specific output that is active. Binary decoders are the inverse of encoders and are commonly used in digital systems to con
7 min read
Combinational circuits using Decoder
Combinational circuits utilizing decoders are basic parts in a computerized plan, assuming a significant part in making an interpretation of parallel data into noteworthy results. Decoders are combinational rationale gadgets that convert twofold information signals into an extraordinary arrangement
8 min read
Multiplexers in Digital Logic
In this article we will go through the multiplexer, we will first define what is a multiplexer then we will go through its types which are 2x1 and 4x1, then we will go through the Implementation of the 2x1 mux and higher mux with lower order mux, At last we will conclude our article with some applic
10 min read
Carry Look-Ahead Adder
The adder produce carry propagation delay while performing other arithmetic operations like multiplication and divisions as it uses several additions or subtraction steps. This is a major problem for the adder and hence improving the speed of addition will improve the speed of all other arithmetic o
5 min read
Parallel Adder and Parallel Subtractor
Adding and Subtracting numbers is very simple in digital electronics. To do this for quickly and efficiently, Most of the for binary numbers (numbers made of 1 and 0), we use circuits like the Parallel Adder and Parallel Subtractor. These types of circuits can handle more than one bit at a time, mak
6 min read
BCD Adder in Digital Logic
BCD stands for binary coded decimal. It is used to perform the addition of BCD numbers. A BCD digit can have any of ten possible four-bit representations. Suppose, we have two 4-bit numbers A and B. The value of A and B can vary from 0(0000 in binary) to 9(1001 in binary) because we are considering
8 min read