excersise 2-3, what is the meaning of nand?

76 views
Skip to first unread message

Ma Jin

unread,
Jun 22, 2011, 11:58:11 PM6/22/11
to Erlang Programming
b_not or b_and are just like "not" and "and".

But what is the meaning of nand?

thx

Ehsan Mohajerani

unread,
Jun 23, 2011, 1:54:21 AM6/23/11
to erlang-prog...@googlegroups.com
Hi,

"nand" is like an inverted "and". It gives value of false if and only if both of its operands are true.
 
If we have two variables like A and B then the truth table will be as following : 

               A     B      A and B      A nand B     
              ------------------------------------------------
               0      0           0                1  
               1      0           0                1
               0      1           0                1
               1      1           1                0

HTH
Ehsan,


--
Erlang Programming Website:
http://www.erlangprogramming.org/

Ivan Uemlianin

unread,
Jun 23, 2011, 3:19:47 AM6/23/11
to erlang-prog...@googlegroups.com
"nand" stands for "not and", like the nand gates from the olden days.

nand(a,b) = not(and(a,b))

Best wishes

Ivan


--
============================================================
Ivan A. Uemlianin
Speech Technology Research and Development

iv...@llaisdy.com
www.llaisdy.com
llaisdy.wordpress.com
www.linkedin.com/in/ivanuemlianin

"Froh, froh! Wie seine Sonnen, seine Sonnen fliegen"
(Schiller, Beethoven)
============================================================

Reply all
Reply to author
Forward
0 new messages