Quantcast
Channel: User periblepsis - Electrical Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 1773

Answer by periblepsis for Converting this boolean expression to NOR only expression

$
0
0

Well, here's my process:

$$\begin{align*}F&=\overline{W}Y + W\overline{Y}Z + \overline{W}\overline{X}\overline{Z}\\\\&=\overline{\overline{\overline{W}Y + W\overline{Y}Z + \overline{W}\overline{X}\overline{Z}}}\\\\&=\overline{W Y + W \overline{Z} + \overline{W}\overline{Y}Z+X\overline{Y}\overline{Z}}\\\\&=\overline{\overline{\overline{W Y + W \overline{Z}}} + \overline{\overline{\overline{W}\overline{Y}Z+X\overline{Y}\overline{Z}}}}\\\\&=\overline{\overline{\overline{W}+\overline{Y}Z} + \overline{Y+W Z + \overline{X}\overline{Z}}}\\\\&=\overline{\overline{\overline{W}+\overline{Y+\overline{Z}}} + \overline{Y+\overline{\overline{W Z + \overline{X}\overline{Z}}}}}\\\\&=\overline{\overline{\overline{W}+\overline{Y+\overline{Z}}} + \overline{Y+\overline{X \overline{Z}+\overline{W}Z}}}\\\\&=\overline{\overline{\overline{W}+\overline{Y+\overline{Z}}} + \overline{Y+\overline{\overline{\overline{X}+ Z}+\overline{W+\overline{Z}}}}}\end{align*}$$

I've no promise that it's optimized in any way. And it's only for 2-in NORs. But it does follow a process that should work for you.

You seem already familiar with the basic idea. But just getting stuck here and there. Hopefully, the above clears up that log-jam.

Added

I hacked out the following behavioral Python code recently:

def fsimplify(e):    f = distribute(e)                  # distribute products of sums: (a+b)*(a'+c)=aa'+ac+a'b+bc    f = removefalse(e)                 # remove always-false terms: ac+a'b+bc    f = expand(f)                      # expand: abc+ab'c+a'bc+a'bc'+abc+a'bc    f = removeduplicates(f)            # remove duplicates: abc+ab'c+a'bc+a'bc'    return reduce(f)                   # combine: ac+a'bdef fgenerateNOR(e):    f = fsimplify(e)    if f is true: return 1    if f is false: return 0    if termcount(f) = 1:               # termcount counts the number of terms        if onevar(f):                  # onevar determines if a term only has one variable            if inverted(f):            # inverted checks to see if the variable is not'd                return NORINV(f)       # if so, just use a NOR as an inverter            return f                   # otherwise just pass the variable out        return fgenerateNOR(fnegate(f)) # compound term is a product -- recurse to resolve    fL, fR = split(f)                  # split expression into two sums-of-terms    return NOR(fgenerateNOR(fnegate(fL)),fgenerate(fnegate(fR)))

The above is a recursive process that should produce the right results. I may have missed a detail. But it may capture the basic idea.


Viewing all articles
Browse latest Browse all 1773

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>