mdej has asked for the wisdom of the Perl Monks concerning the following question:
Hi Perl Guru's
I am stuck with the following: I have a large Hex string (32 Characters) which I want to bitwise AND with a large Integer. I am using the function 'hex' to convert the Hex string to an Integer. However since the number is so large Perl gives an error 'Integer overflow in hexadecimal number'. I am already using the bignum library.
Does somebody know how I can get the Integer from the large Hex number or perhaps an easier way to bitwise two large numbers?
Thanks
I am stuck with the following: I have a large Hex string (32 Characters) which I want to bitwise AND with a large Integer. I am using the function 'hex' to convert the Hex string to an Integer. However since the number is so large Perl gives an error 'Integer overflow in hexadecimal number'. I am already using the bignum library.
Does somebody know how I can get the Integer from the large Hex number or perhaps an easier way to bitwise two large numbers?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Bitwise AND with large numbers
by BrowserUk (Patriarch) on Apr 12, 2012 at 19:46 UTC | |
Re: Bitwise AND with large numbers
by davido (Cardinal) on Apr 12, 2012 at 18:46 UTC | |
Re: Bitwise AND with large numbers
by Eliya (Vicar) on Apr 12, 2012 at 17:50 UTC | |
by mdej (Initiate) on Apr 16, 2012 at 16:56 UTC | |
by Eliya (Vicar) on Apr 16, 2012 at 17:12 UTC | |
by mdej (Initiate) on Apr 20, 2012 at 08:20 UTC | |
Re: Bitwise AND with large numbers
by JavaFan (Canon) on Apr 12, 2012 at 18:23 UTC |
Back to
Seekers of Perl Wisdom