tags:

views:

226

answers:

2

The question reads: consider a 4-input boolean function that is asserted whenever exactly two of its inputs are asserted, construct its truth table, and then other parts for the question.

I don't want an answer i would like to solve this myself, i just want to know the meaning of assert and how to start with the truth table. Any help is appreciated.

+6  A: 

I think that in this context it means true (so you have 4 booleans and you must produce true when exactly 2 are true). Your textbook should make more sense of the issue. Usually you assert that something is true.

Edit. Here's a 3 variable example for Conjunctive normal form. I'm considering the function true whenever two of them are false. Notice how by reading the variables horizontally and then vertically you get the binary representation of numbers.

     1   2    3   R      
L1   0   0    0   0
L2   0   0    1   1
L3   0   1    0   1
L4   0   1    1   0
L5   1   0    0   1
L6   1   0    1   0
L7   1   1    0   0
L8   1   1    1   0

The theory is that you treat each line as a separate equation. If the variable value is 0, you write it as v, and if it is 1 you write it as ~v. You use the logical or (\/) between variables on one line, and logican and (^) between different lines. You only and together lines which are false.

So, considering column 1 - p, column 2 - q and column 3 - r, the first line is p \/ q \/ r and the result is false, so it is added to the final formula, the second one p \/ q \/ ~r but true so not added to the formula etc. You need to and (^) the lines together if and only if the formula for the line is false. So above, you would get the CNF by and-ing together lines L1, L4, L6, L7, L8. Once you have that gigantic formula, you can work on making it smaller.

It's been so long since I've done this I can't really remember the details as to why it is like this but I remember studying the proof at some point.

laura
so whenever two of the inputs are (1) no matter which ones, the output should be 1? that's what i thought but then why wouldn't they say the output is true when two of the inputs are? or is that just me over-thinking the problem?
The textbook and you are saying the same thing but with different words. The word "assert" is found frequently in descriptions of digital electronics: "to request an interrupt, the peripheral asserts the IRQ line. Whenever the IRQ line is asserted, the CPU..." The advantage of assert over true in this context is that assert is a transitive verb, making for terser logic descriptions.
Wayne Conrad
That's true, the result is (1) whenever any two of the inputs are (1). There's a very simple way to solve this, I'll look up my old logic courses and edit the answer with a small example
laura
To supplement this answer, see definition #4 for *assert* here: http://en.wiktionary.org/wiki/assert
Austin Salonen
i will consider it as true as you mentioned, thank you :) an example would be great laura, thank you so much!
I've looked it up in my old courses - this is a textbook example of determining `Conjunctive normal form` - you probably have it in your textbook so I won't edit the answer as it is really simple to go from the truth table to the formula.
laura
thank you so much for your help, i really appreciate it :)
+3  A: 

The other half of the question is the truth table. I'll help start that...

1 2 3 4    output
F F F F    F
F F F T    F
F F T F    F
F F T T    T
F T F F    F
F T F T    T
. . .
Chip Uni
The challenge isn't in the truth table; it's in finding a short way to represent it.
Chip Uni