Fixing hazards in a logic expression

  • Thread starter Thread starter STEMucator
  • Start date Start date
  • Tags Tags
    Expression Logic
AI Thread Summary
The discussion focuses on identifying and fixing hazards in the logic expression f = (ab + \bar{a}c)(c + \bar{b}) + ab. A static 1 hazard was identified for bc = 11, linked to the term a + \bar{a}. The participant expressed confusion about constructing a K-Map for the expression and whether the term "ab" in the first bracket is necessary, ultimately concluding it is needed for simplification. After careful manipulation using distributivity, the final hazard-free expression was determined to be f = ab + \bar{a}c + bc. The K-Map was drawn to confirm the absence of hazards in the final expression.
STEMucator
Homework Helper
Messages
2,076
Reaction score
140

Homework Statement



Identify and fix all hazards in ##f = (ab + \bar{a}c)(c + \bar{b}) + ab##. Re-check if the final expression obtained is hazard free.

Homework Equations

The Attempt at a Solution



So I used a binary tree and found a static 1 hazard present for ##bc = 11##. The hazard was ##a + \bar{a}##.

To fix this hazard, I need a ##\sum## of ##\Pi## map using ##f##.

I am confused about the term ##(ab + \bar{a}c)(c + \bar{b})##. I don't know how to place it on a K-Map.

I know I can't use the distributive laws because that will introduce dynamic hazards since ##b## and ##\bar{b}## are together.

How would I go about creating the K-Map exactly?
 
Physics news on Phys.org
As you have "+ab" at the end, do you need the "ab" in the first bracket at all?
 
mfb said:
As you have "+ab" at the end, do you need the "ab" in the first bracket at all?

I would think I do need it. I can't just remove it can I? The first term is an AND term, so I don't have a term of the form ##ab + ab##.
 
"((X OR Y) AND Z) OR X" = "(X AND Z) OR (Y AND Z) OR X"
But "(X AND Z) OR X" is just X.

Alternatively, just test all 8 options to verify it.
 
Okay, so I can use distributivity and simplification as long as I'm particularly careful about ##b## and ##\bar{b}##:

$$(ab + \bar{a}c)(c + \bar{b}) + ab$$
$$ab(c + \bar{b}) + \bar{a}c(c + \bar{b}) + ab$$
$$ab(c + \bar{b}) + ab + \bar{a}c(c + \bar{b})$$
$$ab + \bar{a}c(c + \bar{b})$$

It's safe to use distributivity now:

$$ab + \bar{a}cc + \bar{a}c \bar{b}$$
$$ab + \bar{a}c + \bar{a}c \bar{b}$$
$$ab + \bar{a}c$$

Drawing the K-Map:

ab\c
0 1
0 1
1 1
0 0

I see I need a term of the form ##bc## to fill the valley. Hence:

$$f = ab + \bar{a}c + bc$$

This expression is hazard free.
 
Back
Top