2
votes
Vote UpVote

Bitwise operations on big integers

The Programming Works – Standard fixed-sized negative integers are stored in two-complement format; for arbitrary-precision big integers the two-complement format means infinite size, so internally it is not used. Still bitwise operation on big integers are implemented as if negative big integer values are stored in two-complement format. As a result bitwise boolean operations (and, or, xor) applied to big integers produce the same results as with standard fixed-sized integers: procedure Test1(I, J: Integer); var BigI, BigJ: BigInteger; begin BigI:= I; BigJ:= J; Assert(BigI and BigJ = I and J); ...
Favorite? Off-Topic? Serg @ 2012-12-03 08:11

Statistics

Visits: 613
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Yogi Yang
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)