Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers

1.6k comments

529 users

0 votes
x <-> y1 NAND y2 ;

in this case how to write the truth table value for this entire expression?
in # Study-Organisation (Master) by (290 points)

1 Answer

0 votes

What is the problem? The formula (y1 NAND y2) is syntactic sugar for !(y1 & y2), so that we have to compute the truth table for x <-> !(y1 & y2) which is the following:

xy1y2x <-> !(y1 & y2)
0000
0010
0100
0111
1001
1011
1101
1110

by (166k points)
how to calculate <-> ?

I am aware that y1 nand y2 is -(y1 and y2)
You simply compare the values of !(y1 & y2) with the values of x. If they are the same, the resulting value is 1 (because they are equivalent), otherwise the resulting value is 0 (because both parts are not equivalent). Or you can simply rewrite it as:
a <-> b = a&b | !a&!b = (a->b) & (b->a) = (!a|b) & (!b|a)
All four formulas describe the same Boolean function, which calculates the equivalence of two values a, b.
Imprint | Privacy Policy
...