What is the difference between these two Boolean expressions?

I am checking the truth table on this site about the following expressions:

insert the description of the image here

But each of them results in a different output:

insert the description of the image here

Author: Maniero, 2019-06-07

2 answers

Is a matter of precedence of operations, as it happens in mathematics (multiplication and division always occur before Addition and subtraction unless you have something grouping them, such as the use of parentheses), or in every expression in codes that we write on the computer, I think I can I can speak like that because you already know it.

The picture is clear to those who know the subject well, but the tables that are in the question make it clearer even to those who do not know what is well different.

The point is a logical operator AND ( I already talked about it in code) which says that for the result to be true the two operand must be true, the rest always gives false. The apostrophe denies its operand (NOT), that is, what is true turns false and vice versa. Parentheses group the operation and what is inside must be performed before what is outside, so what is outside will operate with the result of everything that is inside.

Then na first table takes B and O negates, after all the negation operator is close to it. He has priority over the other operator. C is also denied. With the two negated values we proceed to the relationship of E. the first expression has 0 and 0, so both are negated individually, and are 1, then 1 and 1 gives 1. In the second row and others is done the same, but as always at least one of them is 0, the and requires both to be 1 to give 1, so the result is 0.

The second table changes because of parentheses. B is related to C through the operation of E and this obtained result is negated by the operator that is valid for all the resulting value within the parentheses. In the first three rows there is a 0, so the result will be 0 because the E requires both to be 1 to give 1, then giving 0 there is a negation and the final result is 1. In the last row both are 1, then gives 1 and denied the end gives 0.

The tables are inverted relative to the image.

 3
Author: Maniero, 2019-06-07 20:55:59

After reading a few books, I am answering my own question in more detail and emphasizing what is really important and what was the purpose of the question..

insert the description of the image here

Following the true table above it is possible to notice the difference between the logical ports and the most important, which is the "type of dam symbology" of the inputs".

Using these entries as example:

insert the description of the image here

We can observe that the outputs of insert the description of the image here it is different from insert the description of the image here, for the following question:

  • the first boolean expression is barring the entries A and B
  • the second boolean expression is barring the logical port AND outputs from the inputs A and B. Knowing this with the "symbological of this dam" , we must apply the theorem of De Morgan .

Note

In the application of the theorem in the second expression, we can see that, in fact, it is: insert the description of the image here (so much so that this is the same boolean expression has the same output as that of the boolean expression insert the description of the image here).

The same goes for the Boolean expression insert the description of the image here, when applied the theorem cited this expression is equivalent to: insert the description of the image here.

 0
Author: Comunidade, 2020-06-11 14:45:34