Boolean Logic Design - Reduction - boolean-logic

I have the following function to be reduced/simplified.
F(A,B,C,D) = BC + (A + C'D') where ' denotes the complement
Here's my solution:
= BC + (A + C'D')'
= BC + (A + (C+D)
= BC + (A + C + D)
= BC + C + A + D
= C(B + 1) + A + D
= C*1 + A + D
= C + A + D
Is this correct?

As in traditional algebra, if you do something to one side of the equation, you must do it to the other side, including complementing. Here we state the original equation:
F'(A,B,C,D) = BC + (A + (CD)')
Since we have F' instead of F, my intuition tells me to complement both sides, but first I distribute the complement in the term (CD)' to make life easier in the long run:
F' = BC + (A + (C'+ D'))
Now we can complement both sides of the equation:
1: F = '(BC)'(A + (C'+ D')) The OR becomes AND after distributing complement
Now let's distribute the complements inside just to see what we get:
2: F = (B'+ C')(A'(CD))
Now we can just distribute the right term (A'(CD)) over the two terms being OR'ed:
3: F = B' (A'(CD)) + C' (A'(CD))
We see that the right term goes away since we have a CC' and thus we are left with:
4: F = A'B'CD
Hopefully I didn't make a mistake. I know you've found the answer, but others reading this might have a similar question and so I did it out to save duplicate questions from being asked. Good Luck!

Related

How do i simplify f = x'yz + xy'z + xyz'?

I am working on simplifying the expression f = x'yz + xy'z + xyz' + xyz. Actually, it may not be this expression. The question is: simplify the boolean expression for a voting system, the system being: three people vote on multiple candidates, and two or more people should agree(true) on the candidate in order to pass. So I think the answer would be xy + yz + xz, but I can't figure out the process between. Can anyone explain?
From the idempotent/identity law, we have x + x = x, and so xyz + xyz = xyz. Applying this principle, we can rewrite your expression as:
f = x'yz + xy'z + xyz' + xyz
=> f = x'yz + xy'z + xyz' + xyz + xyz + xyz --OR with xyz twice without affecting the value
=> f = x'yz + xyz + xy'z + xyz + xyz' + xyz --Rearrange
=> f = yz (x + x') + xz (y + y') + xy(z' + z) --Group
=> f = yz + xz + xy --Since x+x' = 1
That said, as the diagram clearly shows, you can simply take AND together each pair of inputs, and OR them together to get the same result. By doing this, you ensure that:
If any 2 of the 3 inputs are true, your overall result is true
When all 3 are true, the result is still true
The advantage of expressing it in this way is that you can just focus on each pair of inputs at one time, without worrying about the impact of the third one.
A simple way without involved logical reasoning
Write a truth table. For three inputs, there are 2^3 = 8 rows.
Four rows correspond to the given terms in your sum-of-products expression.
Enter the eight values of your expression into a Karnaugh map:
Group adjacent 1-terms to blocks as shown.
A pair of cells can be merged into a bigger block, if they just differ in one input. This way, the blocks double their cell-count and reduce their input-count by one in every merge step.
Each of the resulting blocks corresponds to one implicant term in the minimized expression.
Drawing the map and finding the blocks can be done automatically using a nice online tool of Marburg University.

Boolean algabra

I'm working on some logic homework and I can't figure out the next step in reducing the number of literals. Any help would be greatly appreciated.
(A + B + C) (A’B’ + C)
A’B’C + AC + BC + C
C(A’B’ + A + B + C)
C((A + B)’ + A + B + C)
I'm pretty sure I use the associative law next, but I don't understand how the not operator is distributed when rearranging.
From the point where you left:
C((A + B)’ + A + B + C)
C(1 + C) ; X' + X = 1 applied to X = A + B
C(1) ; 1 + <anything> = 1
C ; <anything>1 = <anything>

Boolean Algebra with Max terms

I want to simplify the following expression:
F = (A+B+C)(A+B'+C)(A'+B+C)
I have simplified it accordingly.
F = (A+B+C)(A+B'+C)(A'+B+C)
F = (A+C)(A'+B+C)
F = AA' + AB + AC + A'C + BC + C
F = AB + C(A + A' + B + 1) = AB + C
However, the correct answer is (A+C)(B+C).
Where in my "current" proof am I going wrong? I have seen the solution, but I want to know why my current approach is wrong.
Nothing wrong - it's just two different ways of expressing the same thing.
If the goal is minimization I would argue that your solution is "better" since it only references each term once.
Wolfram Alpha is your friend in cases like this.

Explain why x == ~(~x + 1) + 1 (two's complement and back!)

As we all know usually negative numbers in memory represents as two's complement numbers like that
from x to ~x + 1
and to get back we don't do the obvious thing like
~([~x + 1] - 1)
but instead we do
~[~x + 1] + 1
can someone explain why does it always work? I think I can proof it with 1-bit, 2-bit, 3-bit numbers and then use Mathematical induction but it doesn't help me understand how exactly that works.
Thanks!
That's the same thing anyway. That is, ~x + 1 == ~(x - 1). But let's put that aside for now.
f(x) = ~x + 1 is its own inverse. Proof:
~(~x + 1) + 1 =
(definition of subtraction: a - b = ~(~a + b))
x - 1 + 1 =
(you know this step)
x
Also, ~x + 1 == ~(x - 1). Why? Well,
~(x - 1) =
(definition of subtraction: a - b = ~(~a + b))
~(~(~x + 1)) =
(remove double negation)
~x + 1
And that (slightly unusual) definition of subtraction, a - b = ~(~a + b)?
~(~a + b) =
(use definition of two's complement, ~x = -x - 1)
-(~a + b) - 1 =
(move the 1)
-(~a + b + 1) =
(use definition of two's complement, ~x = -x - 1)
-(-a + b) =
(you know this step)
a - b
This is because if you increment ~x (assuming no overflow). Then converting it to back to x, you've incremented relative to ~x, but decremented relative to x. Same thing applies vice versa. Assuming your variable x has a specific value, every time you increment it, relative to ~x you'll notice it decrements.
From a programmer's point of view, this is what you'd essentially witness.
Let short int x = 1 (0x0001)
then ~x = 65534 (0xFFFE)
~x + 1 = 65534 + 1 (0xFFFF)
~(~x+1) = 0 (0x0000)
~(~x+1) + 1 = 0 + 1 (0x0001)

Mathcad 14: "pattern match exception" when solving equation with more unknowns

I'm trying to solve an equation with 5 unknowns in Mathcad 14. My equations look like this:
Given
0 = e
1 = d
0 = c
-1 = 81a + 27b + 9c + 3d + e
0 = 108a + 27b + 6c + d
Find(a,b,c,d,e)
Find(a,b,c,d,e) is marked as red and says "pattern match exception". What is the problem?
In mathcad you need to do something similar to:
c:=0
d:=1
e:=0
a:=1
b:=1
Given
81*a + 27*b + 9*c + 3*d + e = -1
108*a + 27*b + 6*c + d = 0
Find(a,b,c,d,e) = (0,0,0,0,-1)
Now, what I have done here is to define the variables BEFORE the Solve Block (Given...Find), you have to give initial values which you think are close to the solution you require in order for the iteration to succeed.
Tips: To get the equals sign in the Solve Block, use ctrl and '='. If your looking to solve for 5 unknowns then you need 5 equations, the original post looked like you knew 3 of the variables and were looking for a and b, in this case you would do the following:
c:=0
d:=1
e:=0
a:=1
b:=1
Given
81*a + 27*b + 9*c + 3*d + e = -1
108*a + 27*b + 6*c + d = 0
Find(a,b) = (0.111,-0.481)
This has held c, d and e to their original values and iterated to solve for a and b only.
Hope this helps.