[Tutor] Re: How different is math logic from computer logic?

Magnus Lycka magnus@thinkware.se
Tue Dec 10 17:53:25 2002


At 00:35 2002-12-10 -0500, Derrick 'dman' Hudson wrote:
>Just out of curiosity, did Boole come up with "nand" or did that come
>later?

NAND isn't really a logic operator on it's own. "O = I1 NAND I2" is
nothing else but "O = NOT (I1 AND I2)". NAND and NOR are more common
in electronic devices for practical reasons, but that has little to do
with logic or programming. (Unless you have some bizarre drive to only
use multiples of four "and" or "or" statements in your code.) I'll
refrain from discussing electronic design right now...

I'm not sure who came up with what in logic, but if I allow myself to
mention one interesting piece of boolean algebra, it has to be de Morgan's
Theorem. I guess that was discovered by someone called de Morgan...

NOT (A AND B) = (NOT A) OR (NOT B)

or if you prefer

NOT (A OR B) = (NOT A) AND (NOT B)


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se