0

I have the following equation:

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}} + \overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}}$

I'm trying to solve it in four ways:

1) From the outmost NOT to the innermost NOTs

2) From the outmost NOT to the innermost NOTs (with brackets)

3) From the innermost NOT to the outmost NOT

4) From the innermost NOT to the outmost NOT (with brackets)

Cases 2, 3 and 4 result in $0$, however, case 1 results in $x_{2}$:

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}} + \overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}}$

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}}} . \overline{\overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}}$

$y = \overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}} . \overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}$

$y = \overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1} . x_{3}.\overline{x_{1}+x_{2}} + x_{2}$

$y = \overline{x_{1}} + \overline{\overline{x_{2}}} .x_{2}.x_{1} . x_{3}.\overline{x_{1}}.\overline{x_{2}} + x_{2}$

$y = x_{2} + x_{2}$

$y = x_{2}$

I can't seem to figure out why is this difference as I am not sure about the precedence. The result, in fact, should be 0. All I could find about my problem was about the precedence NOT > AND > XOR, but nothing on the NOT precedence when there's a nested expression like above. I am pretty much a beginner so any help will be greatly appreciated.

arnaudoff
  • 103
  • I have not read anything on boolean algebra, but judging from my programming experience (in the past anyway), the correct way is from the innermost to the outmost, probably with brackets too (If I got what you meant with brackets usage right). – Hasan Saad May 14 '15 at 13:37
  • In the secon row you should have deleted all the outermost overli nes. – zoli May 14 '15 at 14:27
  • @zoli, afaik De Morgan's theorem states that $\overline{A + B} = \overline{A}.\overline{B}$ – arnaudoff May 14 '15 at 14:55
  • True. I say that $\overline{\overline{x}}=x$ – zoli May 14 '15 at 15:44

2 Answers2

0

From:

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}}} . \overline{\overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}}$

it doesn't follow that:

$y = \overline{\overline{x_{1} + \overline{x_{2}}} .x_{2}.x_{1}} . \overline{x_{3}.\overline{x_{1}+x_{2}} + x_{2}}$

but rather:

$y = (\overline{ x_{1} + \overline{x_{2} }} . x_{2}.x_{1} ) . (x_{3}.\overline{x_{1}+x_{2}} + x_{2} )$

By the way, from a mathematical standpoint, the question of precedence of the operators plays no significant role, as it's a mere convention for the reader; as long as the convention is well understood, there's no such a thing as a standard precedence of Not over And etc. From the reading of your question it's clear that the overline has precedence over the other operators, but this is circumstantial.

Tarc
  • 509
0

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} • x_{2} • x_{1}} + \overline{x_{3}•\overline{x_{1}+x_{2}} + x_{2}}}$

Take DeMorgan's:

$y = \overline{\overline{\overline{x_{1} + \overline{x_{2}}} • x_{2} • x_{1}}} • \overline{ \overline{x_{3}•\overline{x_{1}+x_{2}} + x_{2}}}$

$\overline{\overline{X}} = X$, so:

$y = \overline{x_{1} + \overline{x_{2}}} • x_{2} • x_{1} • x_{3}•\overline{x_{1}+x_{2}} + x_{2}$

Take DeMorgan's

$y = \overline{x_{1}} • {x_{2}} • x_{2} • x_{1} • x_{3}•\overline{x_{1}} • \overline{x_{2}} + x_{2}$

$\overline{X} • X = 0$, so:

$y = 0 + x_{2}$

$X + 0 = X$, which means I do not get $0$.

$y = x_{2}$

So the processing of not, in this case, is NOT a precedence thing. All the ANDs apply over the OR.

If you see $a = x • y + z$, if it was math, you'd take multiplication over addition. But $(x • y) + z ≠ x • (y + z)$. Without brackets AND and OR have equal precedence. It's probably, NOT, NAND or NOR, AND or OR.