[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doco on bitwise logicals
From: |
Kevin Ryde |
Subject: |
Re: doco on bitwise logicals |
Date: |
Tue, 06 May 2003 09:31:29 +1000 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) |
I wrote:
>
> * scheme-data.texi (Bitwise Operations): ...
Also sneaking in here (in the patch but not stated) is a fix for
lognot to say ones-complement, where it says twos-complement now.
This would be a fix for the 1.6 branch as well as the mainline I
think.
- Scheme Procedure: lognot n
- C Function: scm_lognot (n)
Return the integer which is the ones-complement of the integer
argument, ie. each 0 bit is changed to 1 and each 1 bit to 0.
(number->string (lognot #b10000000) 2)
=> "-10000001"
(number->string (lognot #b0) 2)
=> "-1"