ch1. bottom of page 8, top of 9

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ch1. bottom of page 8, top of 9

dmac0505
I hope this is an acceptable place to ask this question. When reading the text on the pages listed in the title in the section titled 'Boolean Expressions' I am having trouble understanding how the boolean function used to specify the truth table is f(x,y,z) = (x + y) * /z. I understand that since y = 1, x + y would be 1. But since the value of z = 0 in the truth table, I don't understand how the 2nd part of the expression would be /0 (not 0)?
Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

cadet1620
Administrator
Here's the step-by-step solution for that row.
Given x=0
y=1
z=0
f=(x OR y) AND NOT z
Solution
f=(0 OR 1) AND (NOT 0)Substitute givens.
f=1 AND 1Simplify.
f=1Simplify.
Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

dmac0505
Thanks. I'm not understanding how given x = 0, y = 1, and z = 0 that that can be represented as f = (x OR y) AND NOT z.
Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

cadet1620
Administrator
Ok.

This paragraph is saying that a truth table is not the only way to specify a Boolean function; that a Boolean arithmetic expression can also represent the function.

Line 3 by itself does not establish this fact. That's what the next sentence is trying to say; that all 8 of the lines must evaluate to a match to prove that the expression is an equivalent definition.

This is basically the equivalent of saying that a multiplication table can also be represented the expression x*y.

The table would more clearly show the equivalence if it had been two tables:

Table 1a: Truth table definition of f(x, y, z)
x y z || f(x, y, z)
------||-----------
0 0 0 ||      0
...   ||
1 0 1 ||      1
...
Then present a table showing the equivalence of (x OR y) AND NOT z to f(x, y, z)
Table 1b: Boolean expression definition of f(x, y, z)
x y z || f(x, y, z) || (x+y)~z
------||------------||---------
0 0 0 ||      0     ||    0
...   ||            ||
1 0 1 ||      1     ||    1
...

Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

dmac0505
Thanks, I'm not sure if I asked my question clearly. So I understand that for the example there are 3 inputs - X, Y, and Z and one possible output for each possible combination of inputs. I will try to draw a table to hopefully make my question clearer

x     y     z     o(output)
----------------
0     0     0     ?
0     0     1     ?
0     1     0     ?
0     1     1     ?
1     0     0     ?
1     0     1     ?
1     1     0     ?
1     1     1     ?

I have two parts to the question and I'll ask the first then address then next part after. So, my first question is, how does one go about finding the output value for each row? I mean how does one know whether to AND x,y,z together, or OR x,y,z together or some combination of AND and OR? If the answer is, 'well that's where you plug in the values from the given boolean expression' - I can see that - but where did that boolean expression come from? Sorry this is all new to me and I'm feeling like I'm a little slow in picking this up :)
Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

cadet1620
Administrator
Basically, truth tables can be generated in two ways.

The most obvious way is to already know the function. Then you just plug in the input values for each row and evaluate the result.

The second way is build a truth table from a list of requirements. For instance "I need my widget controller to work this way when the input sensors are in these states".

What the book is trying to do is first say that a truth table can come from an arbitrary source.
Second, that a truth table can be generated from a function.  The book is confusing because it doesn't say anything about where the function came from or why it's being compared to the truth table.

In fact, one way to prove that two functions are equivalent is to generate their truth tables and see if they are identical.


The next section, canonical representation, is a way to derive a function that matches an arbitrary truth table. There is another technique that can help you find a simplified function for an arbitrary truth table called "Karnaugh Maps". You should be able to find info about them by searching in the forum and on the net.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: ch1. bottom of page 8, top of 9

dmac0505
Thanks for clarifying that the function was assumed to be given to us. I was feeling like such a dummy trying to figure out logically where it came from :) Also, knowing that a truth table is generated from either an already existing function or from a list of requirements really helps to clear things up. Thanks.