After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628892 - Calculator fail in scientific binary mode with NOT operator
Calculator fail in scientific binary mode with NOT operator
Status: RESOLVED INVALID
Product: gnome-calculator
Classification: Core
Component: general
5.31.x
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-06 14:35 UTC by Pedro Villavicencio
Modified: 2010-09-07 02:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32



Description Pedro Villavicencio 2010-09-06 14:35:31 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/gcalctool/+bug/631402

"Switch to Programming mode, select Binary as base and calculate the following sums. If any of these answers are wrong, report it as a bug in launchpad

   1. NOT 1 = 0
   2. 0 AND 1 = 0
   3. 0 OR 1 = 1

Performing NOT 1 it gives 1111111111111111111111111111111111111111111111111111111111111110 as result.

NOT operator seems to work in some cases:

NOT 1 AND 1 = 0
0 AND NOT 1 = 0

and not in others:

NOT 1 OR 1 = 1111111111111111111111111111111111111111111111111111111111
NOT 0 OR 0 = 1111111111111111111111111111111111111111111111111111111111"
Comment 1 Robert Ancell 2010-09-07 02:42:41 UTC
This is the correct behaviour - the NOT operator flips all the bits in the word - in this case the word size is set to 64 bit in the preferences.