This is a blog post about Windows Calculator.  No, seriously!  Why a blog post about Windows Calculator?  Well:

  1. it gives me a chance to do a little computer history, which I love
  2. I want to talk about a must-have feature that Microsoft gives us in the latest versions of the Windows Calculator; I don’t think many people even know about it, since it is poorly marketed to users

Skeptical?  Don’t worry—read on, it will be worthwhile!

The Windows Calculator (CALC.EXE) has always been with us.  The following screenshots (taken from my PC with the magic of virtual machines) provide a graphical history of Calculator from Windows 3.1 (1990) to today.

As you’ll see, things were pretty much unchanged from Windows 3.1 until Windows 7.  The user could switch between a Standard mode and a Scientific mode.

Windows 3.1 and Windows NT 3.51

image

image

Windows 95 and Windows NT 4

std

sci

Windows 98

image

image

Windows 2000

image

image

Windows XP

image

image

Windows Vista

image

image

Windows 7

Everything changes for Windows 7.  The Calculator in Windows 7 introduced two new modes:  Programmer, which is the subject of this blog post, and Statistics.  There are also special modes for unit conversion and date calculation.  Here is how you select the mode:

image

The new Programmer mode (to be expounded upon below) looks like this in Windows 7:

image

Windows 8

image

image

Windows 10 (Redstone 2, v1703)

image

Now let’s experiment with the new Programmer mode.  Again, this mode of the calculator is available from Windows 7 onward with only minor differences.  Below, I’ve input my system’s “BIOS Characteristics” value from the SMBIOS Type 0 table, also known as the BIOS Information table.

image

You can see that I’ve selected hexadecimal format (F5 keyboard shortcut) and entered the value.  Calculator tells me the value in all four popular bases, even up to 64-bits!  I have typical bit manipulation tools available to me, like Lsh, Rsh, Or, And, Xor, and Not.

image

In this image, notice I’ve clicked the bit manipulation toggle (highlighted by green circle).  Each bit in the number that is turned on is illuminated as “1”, making it very easy to match up bit fields to their definition in a specification, like in this case SMBIOS.

image

A neat feature here is I can click on a 1 or a 0 and toggle that bit.  The value is updated in real time.  In this example I clicked bit 20 to turn it from 1 to 0, and my number adjusted itself accordingly.

The previous screen shots used QWORD, but the Calculator can also restrict the display to BYTE, WORD, and DWORD.  Example of selecting the BYTE display mode:

image

Conclusion

Windows Calculator is a free and surprisingly useful tool for software engineers, especially firmware engineers who are used to toggling bits or trying to decipher long bit patterns as defined by industry specs.  Do you use a different programmer’s calculator?  Leave a comment below and let me know!

Post a Comment

Be sure to select an account profile (e.g. Google, OpenID, etc.) before typing your comment!