GNOME Bugzilla – Bug 628892
Calculator fail in scientific binary mode with NOT operator
Last modified: 2010-09-07 02:42:41 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"
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.