Windows 7 Calculator Programmer Mode shows -1 when all bits are on when Dec and Byte or Word or DWord or QWord are selected. i.e. a byte value of FF in Dec shows -1 instead of 255

Anonymous
2009-10-11T17:59:41+00:00

Calculator Programmer mode calculation issue

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2009-10-12T04:55:11+00:00

    It seems a "bit" hit and miss to me, sometimes it seems to give the correct answer and at other times I get the -1 result.  I assume it is my fault and my own operating error.  It would be nice if it was consistently wrong or consistently correct.

    Maybe it is a "bug"?

    How to report a bug to microsoft?

    http://www.google.com/search?q=report+a+bug+to+microsoft&rls=com.microsoft:en-au&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

    Incident Reports for Technical Support from Microsoft

    http://ampalliance.org/blogs/microsoft/archive/2007/08/28/Incident-Reports-for-Technical-Support-from-Microsoft.aspx

    Microsoft Product Support Reports

    http://www.microsoft.com/downloads/details.aspx?familyid=CEBF3C7C-7CA5-408F-88B7-F9C79B7306C0&displaylang=en

    Maybe also you can settle on some alternative solution for your calculations.

    http://www.google.com/search?hl=en&rls=com.microsoft%3Aen-au&q=hex+to+decimal&aq=0&oq=hex+to+&aqi=g10

    I can see that this is causing you concerns from your earlier post here, which also has no replies.

    Windows 7 Calculator issue in Programmer Mode

    http://social.msdn.microsoft.com/Forums/en-US/isvwindowserrors/thread/1cc66cc9-e82c-4fcc-8e70-28b8f7c2ef41

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2009-10-12T00:34:51+00:00

    http://input.microsoft.com


    Rating posts helps other usersMark L. Ferguson MS-MVP

    0 comments No comments
  2. Anonymous
    2009-11-18T22:28:57+00:00

    Just thought I would clear this up for anyone who stumbles here in the future slightly puzzled, its not an error

    Programmer mode is made for converting into binary that computers can use (pretty obvious).

    But there is no "negative" in binary, so how is it reperesented?

    The highest bit is basically a sign bit, if that is set the number will be negative.

    Windows7 calculator uses the most widely used negative binary representation: Two's Compliment

    http://en.wikipedia.org/wiki/Two%27s_complement

    This is why you can set the word length, so you can get negatives accurate whatever wordsize you are programming with 8,16,32 or 64 bit. If you don't want negatives just use the max word length and keep highest bit 0

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2009-11-19T04:36:23+00:00

    Thanks for the feedback and thinking of us in the Forum.

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2010-01-12T19:19:20+00:00

    In my opinion the following is true:

    255 as a Byte(8 Bits (-127 to 127 Signed OR 0 to 255 Unsigned) which in all programming languages I have come across is represented as 11111111 OR FF in HEX?

    OR

    65535 Unsigned Word (16 Bits (-32767 to 32767 Signed OR 0 to 65535 Unsigned) which in all programming languages I have come across is represented as 1111111111111111 OR FFFF in HEX?

    -32767 as a Signed Word is represented as 1000000000000001 OR 8001 in HEX

    -10 as a Signed Word is represented as 1111111111110110 OR FFF6 in HEX

    Anyone who still has WinXP can easily cross reference this by converting either of these Decimal numbers to Binary in the calculator.

    An Obvious difference in Windows 7 is that the calculator seams to run in signed mode only. This only suits some of the programmers in the world; adding a Signed/ Unsigned option would provide for all programmers and remove the confusion especially as it is different to that of Windows XP.

    Please don’t get me wrong this feature is a great one but it must me right to be useable.

    As the .Net framework is supposed to be Microsoft’s core Programming Platform would it not be nice if the Windows 7 Calculator worked on the same grounds?

    The follwing link is an example of a Byte's maximum value.

    http://msdn.microsoft.com/en-us/library/system.byte.maxvalue(VS.71).aspx

    0 comments No comments