fixed size integer arithmetic

Paul Leyland paul at leyland.vispa.com
Wed Aug 29 12:16:22 CEST 2007


On Wed, 2007-08-29 at 10:46, Paul Zimmermann wrote:

> Please could you be more specific? What do you expect if the size is fixed to
> one bit, and you compute 1+1?

I think the original spec. was unambiguous on this point.   As I read
it, he's asking for arithmetic in Z/Z_N where N is a fixed power of two.

In the particular case you mention, the arithmetic is over F_2, so:

0+0=0
0+1=1
1+0=1
1+1=0

0*0 = 0*1 = 1*0 = 0
1*1 = 1


Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://gmplib.org/list-archives/gmp-discuss/attachments/20070829/65633734/attachment.bin 


More information about the gmp-discuss mailing list