two's compliment?
From: 187 (bigal187.invalid_at_adexec.com)
Date: 08/30/04
- Next message: Eric Schwartz: "Re: how many days ago is 2003-07-20 ?"
- Previous message: Shmuel (Seymour J.) Metz: "Re: OS/2 port of Perl 5.8 not adding CR to \n"
- Next in thread: Greg Bacon: "Re: two's compliment?"
- Reply: Greg Bacon: "Re: two's compliment?"
- Reply: Chris Mattern: "Re: two's compliment?"
- Reply: Randal L. Schwartz: "Re: two's compliment?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 30 Aug 2004 10:43:29 -0700
I'm hoping someone can clear up this little confusion here regarding
binary not's.
print unpack('H128', pack('N', ~4294966272));
This gives: 000003ff
Why is it on my TI86 I get FFFFFFFF000003FF. This seems more
(Commands: (not 4294966272)->Hex )
Which is correct? It seems more correct to me that the remaining bits be
flipped from the not operation (0 -> 1), but why do c/c++/perl/etc not
do this?
- Next message: Eric Schwartz: "Re: how many days ago is 2003-07-20 ?"
- Previous message: Shmuel (Seymour J.) Metz: "Re: OS/2 port of Perl 5.8 not adding CR to \n"
- Next in thread: Greg Bacon: "Re: two's compliment?"
- Reply: Greg Bacon: "Re: two's compliment?"
- Reply: Chris Mattern: "Re: two's compliment?"
- Reply: Randal L. Schwartz: "Re: two's compliment?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]