BigInt and xor

matovitch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 24 10:35:12 PDT 2015


On Tuesday, 24 March 2015 at 17:28:50 UTC, Dennis Ritchie wrote:
> On Tuesday, 24 March 2015 at 16:35:04 UTC, Ivan Kazmenko wrote:
>> What exactly is not working?
>
> Everything works. I'm just a little forgotten properties of the 
> operation xor.
>
> I just wanted to xor 1 each digit in the number of type BigInt, 
> while I would like to store each number in the binary 
> representation of the array BigInt.
>

xor it with -1 instead of 1. (-1 is store as 0xfff..f with the 
classic modular arithmetic)


More information about the Digitalmars-d-learn mailing list