Fixing hazards in a logic expression

  • Thread starter Thread starter STEMucator
  • Start date Start date
  • Tags Tags
    Expression Logic
Click For Summary

Discussion Overview

The discussion revolves around identifying and fixing hazards in the logic expression ##f = (ab + \bar{a}c)(c + \bar{b}) + ab##. Participants explore methods for creating a Karnaugh Map (K-Map) and ensuring the final expression is hazard-free, focusing on the implications of using distributive laws and the presence of certain terms.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant identifies a static 1 hazard in the expression when ##bc = 11## and expresses confusion about how to place the expression on a K-Map.
  • Another participant questions the necessity of the term "ab" in the first bracket, suggesting it may be redundant given the "+ab" at the end.
  • A different participant argues that the term is necessary, clarifying that the first term is an AND term and cannot simply be removed.
  • One participant provides a transformation of the expression using distributivity, while emphasizing caution regarding the terms ##b## and ##\bar{b}## to avoid introducing dynamic hazards.
  • Another participant confirms the final expression obtained after simplification is hazard-free and presents a K-Map to illustrate the findings.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of certain terms in the expression and the application of distributive laws. The discussion includes both agreement on the final expression being hazard-free and ongoing uncertainty about the initial terms and their implications.

Contextual Notes

There are unresolved aspects regarding the placement of terms in the K-Map and the implications of removing certain terms from the expression. Participants also highlight the need for careful handling of terms to avoid introducing hazards.

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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
36K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K