Bit-manipulation in ISO Prolog

From: Nameless (news.mail_at_chello.no)
Date: 08/16/04


Date: Mon, 16 Aug 2004 21:01:08 +0200

ISO Prolog has five bit-manipulation predicates:

>> (bitwise right shift),
   << (bitwise left shift),
   /\ (bitwise and),
   \/ (bitwise or), and
   \ (bitwise compliment).

So far so good, but how would one perform (rationally and
effectively)

1) bitwise xor, and
2) bitwise not

within the ISO Prolog framework?

TIA.

-- 
Mail sent to this email address is automatically deleted
(unread) on the server. Send replies to the newsgroup.


Relevant Pages

  • Re: Bitwise expression
    ... x << y Left shift ... x & y Bitwise AND ... Computer memory is like a long string of flip-flops that can ... Sometimes it is one or two Bytes, sometimes three nibbles, sometimes ...
    (comp.lang.python)
  • Re: Bitwise expression
    ... x << y Left shift ... x & y Bitwise AND ... Computer memory is like a long string of flip-flops that can ... Sometimes it is one or two Bytes, sometimes three nibbles, sometimes ...
    (comp.lang.python)
  • Re: integer to binary...
    ... bitwise operations... ... Other reasons for wanting an arbitrary integer in binary might be for plain-old-display, especially if it represents bitmap data. ... If you just want to operate on each bit, you can iterate over the number of bits and shift a single bit to its position: ...
    (comp.lang.python)
  • Re: Bitwise Operators: Aplication
    ... the bitwise operators would be greatly appreciated by me. ... The bitwise operators allow you to set, clear, invert, and shift bits in a ... left bitshift, <<, allows you to shift bits left ... right bitshift,>>, allows you to shift bits right ...
    (comp.lang.c)
  • Re: Bitwise expression
    ... x << y Left shift ... x & y Bitwise AND ... def convert_to_binary: ... print 'Bitwise demo: the Collatz Conjecture' ...
    (comp.lang.python)