Calculator.app sometimes converts results to binary-coded decimal instead of hexadecimal

Originator:chris
Number:rdar://9948360 Date Originated:8/12/2011
Status:Open Resolved:
Product:OS X Product Version:10.7/11A511
Classification:Serious bug Reproducible:Always
 
Summary:
Some operations in the programmer mode of Calculator.app cause the value to be displayed as a binary-coded decimal instead of hexadecimal.

Steps to Reproduce:
0.  Launch Calculator.app and press command-3 to go into programmer mode.
1.  Enter a 1 and then hit the << key 6 times to end up with the value 0x40 (decimal 64).
2.  Press the = key

Expected Results:
I would expect for the value 0x40 to remain 0x40.

Actual Results:
The display changes to 0x64, the binary-coded decimal representation of 0x40 (64).

Similarly, if you shift left 5 to get 0x20 (32) and then hit = the value changes to 0x32.

If you do other operations the result is incorrect.  Enter a 1, shift left 6 to get 0x40 and then add 3.  Instead of 0x43 you get 0xC0.

Regression:
This bug existed in 10.6.8.

Notes:
This may be related to another ticket I filed in 2006 where 1's complement was computed incorrectly.  That radar number is 4665189.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!