Can someone explain to me this question in C [closed] - boolean-expression

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Been trying to figure out this stuff. This has to do with boolean algebra and is suing the C language. It has some algebra in it. Not sure how this works. Been trying to figure this out for half hour
Simplify the following Boolean expressions.
a. F = A*B*C*D + A*B*C*D + A*B*C*D + A*B*C*D
b. F = A*B*C + A*B*C + A*C*D + A*B*C*D

As in boolean algebra + is OR you can simplify it with:
F = A*B*C*D + A*B*C*D + A*B*C*D + A*B*C*D (A v A) = A
= A*B*C*D + A*B*C*D + A*B*C*D (A v A) = A
= A*B*C*D + A*B*C*D (A v A) = A
= A*B*C*D (A v A) = A
F = A*B*C + A*B*C + A*C*D + A*B*C*D (A v A) = A
= A*B*C + A*C*D + A*B*C*D
= A*B*C + A*C*D
= A*C*(B + D)

Related

Any one can solve this: Simplify the boolean expression Z=A+A'B + A'B'C+ A'B'C'D

Any one can solve this:
Simplify the boolean expression
Z=A+A'B + A'B'C+ A'B'C'D
What will be the final answer of this question.
Z = A + A'B + A'B'C + A'B'C'D <br>
Z = A + A'(B + B'C + B'C'D) (distributivity)
Z = A + A'(B + B'(C + C'D)) (distributivity)
Z = A + A'(B + B'(C(D+1) + C'D)) (null law)
Z = A + A'(B + B'(CD + C + C'D)) (distributivity)
Z = A + A'(B + B'(C + D(C + C'))) (distributivity)
Z = A + A'(B + B'(C + D)) (inverse law)
Z = A + A'(B + C + D) (same 4 steps applied above)
Z = A + B + C + D (same as above)
So, whole expression actually can be solved with this rule:
A + A'B = A + B (absorption law)

How to simply (AB')' or (ABC')'?

Stuck on one aspect of a question for Computer Architecture I: Digital Design, and am not sure how to simplify (ABC')' or even (AB').
Not sure if any axiom or theorem can be applied, or if (ABC')' [or (AB')'] is the most simplified form. Can someone confirm?
You can splat (ABC')' into A' + B' + C; similarly, (AB')' is A' + B (according to De Morgan's laws). These are disjunctive normal form.
To expand upon what Amadan said:
(AB')' + (ABC')'
A' + B + A' + B' + C DeMorgan applie twice
A' + A' + B + B'+ C commutativity of disjunction
A' + B + B' + C x + x = x
A' + 1 + C x + x' = 1
1 + C x + 1 = 1
1 1 + x = 1
Upon reflection this must be the case since B must be either true or false, and each of these values makes one or the other of the original terms true.

Boolean expression F = x'y + xyz':

Using DeMorgan's theorem show that:
a. (A + B)'(A' +B)' = 0
b. A + A'B + A'B' = 1
Boolean expression F = x'y + xyz':
Derive an algebraic expression for the complement F'
Show that F·F' = 0
Show that F + F' = 1
Please Help me
Assuming you know how DeMorgan's law works and you understand the basics of AND, OR, NOT operations:
1.a) (A + B)'(A' + B)' = A'B'(A')'B' = A'B'AB' = A'AB'B' = A'AB' = 0 B' = 0.
I used two facts here that hold for any boolean variable A:
AA' = 0 (when A = 0, A' = 1 and when A = 1, A' = 0 so (AA') has to be 0)
0A = 0 (0 AND anything has to be 0)
1.b) A + A'B + A'B' = A + A'(B + B') = A + A' = 1.
I used the following two facts that hold for any boolean variables A, B and C:
AB + AC = A(B + C) - just like you would do with numeric variables and multiplication and addition. Only here we work with boolean variables and AND (multiplication) and OR (addition) operations.
A + A' = 0 (when A = 0, A' = 0 and when A = 1, A' = 0 so (A + A') has to be 1)
2.a) Let's first derive the complement of F:
F' = (x'y + xyz')' = (x'y)'(xyz')' = (x + y')((xy)' + z) = (x + y')(x' + y' + z) = xx' + xy' + xz + x'y' + y'y' + y'z = 0 + xy' + xz + x'y' + y' + y'z = xy' + xz + y'(x + 1) + y'z = xy' + xz + y' + y'z = xy' + xz + y'(z + 1) = xy' + y' + xz = y'(x + 1) = xz + y'.
There is only one additional fact that I used here, that for any boolean variables A and B following holds:
A + AB = A(B + 1) = A - logically, variable A completely determines the output of such an expression and part AB cannot change the output of entire expression (you can check this one with truth tables if it's not clear, but boolean algebra should be enough to understand). And of course, for any boolean variable A + 1 = A.
2.b) FF' = (x'y + xyz')(xz + y') = x'yxz + x'yy' + xyz'xz + xyz'y'.
x'yxz = (xx')yz = 0xz = 0
xyy'= x0 = 0
xyz'xz = xxy(zz') = xy0 = 0
xyz'y' = xz'(yy') = xz'0 = 0
Therefore, FF' = 0.
2.c) F + F' = x'y + xyz' + xz + y'
This one is not so obvious. Let's start with two middle components and see what we can work out:
xyz' + xz = x(yz' + z) = x(yz' + z(y + y')) = x(yz' + yz + y'z) = x(y(z + z') + y'z) = x(y + y'z) = xy + xy'z.
I used the fact that we can write any boolean variable A in the following way:
A = A(B + B') = AB + AB' as (B + B') evaluates to 1 for any boolean variable B, so initial expression is not changed by AND-ing it together with such an expression.
Plugging this back in F + F' expression yields:
x'y + xy + xy'z + y' = y(x + x') + y'(xz + 1) = y + y' = 1.

(a mod 2*x)-(a mod x) [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to find the possible values of this expression.
(a mod 2*x)-(a mod x)
I suspect they might be 0 or x, but I'm really not sure. I can't seem to be able to write down a proper argument.
You are correct that the possible values are 0 and x, assuming that both a and x are positive. The logic is as follows.
Let a have the form
a = p*x + b
Then it is easy to see that a mod x = b.
For a mod 2*x, if p = 2*r (p is even) then
a = 2*r*x + b = (2*x)*r + b
so that a mod 2*x = b and p = 2*r + 1 (p is odd) then
a = (2*r + 1)*x + b = 2*r*x + x + b = (2*x)*r + x + b
so that a mod 2*x = x + b. Combining these results, the difference is either b - b = 0 (when p is even) or (x + b) - b = x (when p is odd).

Boolean algebra simplifcation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm doing a past paper for my exam on Thursday, and I'm struggling with boolean algebra a bit.
One question asked me to simplify:
[(X + Y).(X + 'Y)]
I can simplify most of it. I got it down to
[X(1 + 'Y + Y)]
The mark scheme says this is equal to [X].
But I don't quite understand why - I guess it's because of the
['Y + Y]
but we're not using the '+' symbol to add them, so why is it like this?
Starting from X * (1 + 'Y + Y), note that 'Y + Y == 1 for any Y because either Y is 1 or else 'Y is, so Y + 'Y is 1 + 0 or 0 + 1, which in both cases equals 1.
That would make the function equivalent to X * (1 + 1), but we also know that 1 + 1 == 1 (true OR true is true) and also X * 1 == X (X AND true is X), so in the end you are left with just X.
Reference: Laws of Boolean algebra, also in a convenient 2-page PDF.
['Y + Y]
X + X' = 1 Now imagine picking one between a value and its opposite.
Since we are referring to Boolean logic, the only options are going to
be 0 or 1. Now see what is the output of the OR operation between 0
and its opposite, i.e. 1. Or see what 1 OR 0 yields. Both yield a 1,
which means that the output of an OR operation between a value and its
negative (opposite), is 1.
http://www.buzzle.com/articles/boolean-algebra-rules.html
In Boolean algebra, If A = 1, A' = 0 and A = true, A' = false. Also every AND operation is (.) and every or operation is (+).
Let me simplify the expression :
(X+Y)(X+'Y)
= XX + XY' + YX + YY'
= X + XY' + YX + 0 // since X.X = X & Y.Y'= 0
= X + XY' + XY // = X(1 + 'Y + Y)
= X + X(Y+Y')
= X + X(1) // Y+Y' = 1
= X + X
= X