Combinational logic design question, what does it mean for input to be asserted
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开发者_如何学JAVA want to know the meaning of assert and how to start with the truth table. Any help is appreciated.
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.
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
. . .
精彩评论