PLOGHELP BITWISE Jonathan Laventhol, 5 July 1983 Revised by Kathryn Seifert October 1986 Operators for manipulating numbers as strings of bits ?- X is A \/ B. ?- X is A /\ B. ?- X is \A. ?- X is A >> N. ?- X is A << N. Keywords: bitwise operations, evaluation There are a number of operators for manipulating numbers as strings of bits. Ignore them unless you know what you are doing. Users are referred to the POP-11 file REF * DATA. Be careful with these operations -- if you use them on non-integers then you may get unpredictable results. ?- X is A \/ B. /* bitwise disjunction */ ?- X is A /\ B. /* bitwise conjunction */ ?- X is \A. /* bitwise negation */ ?- X is A >> N. /* logical shift right */ ?- X is A << N. /* logical shift left */ -- RELATED DOCUMENTATION ----------------------------------------------- PLOGHELP * ARITHMETIC Overview of HELP files dealing with operations on numbers. PLOGHELP * IS Evaluating POP-11 and arithmetic expressions which return one result PLOGHELP * SYMBOLS Summary and index of HELP files for symbols used in Prolog PLOGHELP * OPERATORS Operator declarations made when the Prolog system is loaded PLOGHELP * OP How to declare operators REF * DATA In depth discussion of data items in POPLOG