[Tutor] Re: How different is math logic from computer logic?
alan.gauld@bt.com
alan.gauld@bt.com
Tue Dec 10 12:50:03 2002
> Just out of curiosity, did Boole come up with "nand" or did that come
> later?
It came later but I don't know from where or when exactly.
ISTR Boole didn't even use 'and', 'or' and 'not' he used other
more mathematically based names. Certainly he didn't use the
+ and * symbols that Magnus posted, he used the pure math
notation found in formal notations like VDM and Z.
OR = v
AND = ^
Which are somewhat like the set notations for intersection
and union. Negation uses a strange symbol somewhat like: -|
(think about the top corner of a rectangle) and used as
a superscript in front of the thing being negated.
(The symbol is on the key to the left of the digit 1 on my
keypad if that helps...)
> For those unfamiliar with it, the nand operator is functionally
> complete.
As is its twin nor.
> With just nand you can write any logic expression. The
> combination of and, or and not is also functionally complete. (it's
> more natural too, but require 3 operators instead of 1)
This is really only of much significance if you are using
hardware gates to build a solution though! :-)
> If you're really interested in logic or rule based programming, check
> out Prolog. (I've only heard about it but never used it)
I have played with Micro Prolog and another variant on our old VAX.
Never built anything that other people used, but its a fun language.
Alan g.