Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: NOT Message-ID: <9102211514.AA21725@ucbvax.Berkeley.EDU> Date: 20 Feb 91 22:59:37 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch Bradley Organization: The Internet Lines: 24 > Well, what about the values they (TRUE and FALSE) represent. > -1 and 0 as in FORTH-83? More precisely, TRUE is all bits set, and FALSE is all bits clear. This is indeed -1 and 0 on a 2's-complement machine, but on a ones complement or signed magnitude machine, it would be something else (maybe -0/0 on 1's complement and -maxint/0 on signed magnitude). > What's the current status of NOT? I often found it useful to define > TRUE and FALSE by > > 0 CONSTANT FALSE ( -- ff ) > FALSE NOT CONSTANT TRUE ( -- tf ) > > which works on FIG and Forth-83 Systems. As you are probably aware, it doesn't work on Forth-79 systems. ANS Forth defines the word INVERT to invert all the bits, and does not define the word NOT at all, so an application can define the word NOT to mean either "change the sense of a TRUE/FALSE flag" (as in Forth-79) or "invert each of the bits" (as in Forth-83). Mitch