A proper binary calculator?

Thread Starter

ApacheKid

Joined Jan 12, 2015
1,617
I've been using the Windows calculator which has a "programmer" mode but it sucks.

For example, it suppresses leading zeros, cannot be set to a particular bit length and so on. Is there any kind online programmer calculator that can support these features?

I'd like to enter say 003F4C and have that tell the calculator that I'm dealing with a three byte number and that all results should be displayed as a three byte number and any leading zeros should be displayed.

Look:

1707754276197.png

I entered 00402D04 32 bits, but look at that binary representation, it is not 32 bits and trying to mentally line up the bits with real bit positions is very taxing, particularly if I'm starting from the left, the MSB.

The use the bitwise NOT operation, and here's how it looks:

1707754489273.png

It has immediately started to treat the value as 64 bits.
 

Attachments

Last edited:

Jerry-Hat-Trick

Joined Aug 31, 2022
552
How about constructing your own using an Excel spreadsheet? How you enter the data and how you get the result you are looking for may be a combination of formulae and macros. The built in HEX2BIN (and similar) formulae, along with the LEFT, RIGHT and MID string as well at LEN formulae may be all you need.
 

Thread Starter

ApacheKid

Joined Jan 12, 2015
1,617
How about constructing your own using an Excel spreadsheet? How you enter the data and how you get the result you are looking for may be a combination of formulae and macros. The built in HEX2BIN (and similar) formulae, along with the LEFT, RIGHT and MID string as well at LEN formulae may be all you need.
I respect Excel a great deal but I'm a total novice, the sophistication of that tool is immense and I'm too lazy to learn it!

I'd find it easier actually to write a an app for Windows that does it, but again I'm far too lazy!

I found this though and it isn't bad.
 

WBahn

Joined Mar 31, 2012
30,076
If you want to use 32-bit words (DWORDS), then don't tell the calculator that you want to use 64-bit words (QWORD).


1707761887542.png

As for having it read your mind to determine how many bits to use, that's asking for its own set of headaches. People are going to be very inconsistent with the data they enter, so which moment in time is the app supposed to choose as the moment with the user's actions actually match what they really wanted?

Although there are a number of features I would like to see in the Windows Calculator, and I find some of the features it does have cumbersome to the point of impracticality to use, I have found the Programmer mode to be very useful on countless occasions. For a mode that only a tiny, tiny fraction of Windows users even know exists, in an App that is free, I don't feel I have much of a right to expect more.
 

Thread Starter

ApacheKid

Joined Jan 12, 2015
1,617
If you want to use 32-bit words (DWORDS), then don't tell the calculator that you want to use 64-bit words (QWORD).


View attachment 315077

As for having it read your mind to determine how many bits to use, that's asking for its own set of headaches. People are going to be very inconsistent with the data they enter, so which moment in time is the app supposed to choose as the moment with the user's actions actually match what they really wanted?

Although there are a number of features I would like to see in the Windows Calculator, and I find some of the features it does have cumbersome to the point of impracticality to use, I have found the Programmer mode to be very useful on countless occasions. For a mode that only a tiny, tiny fraction of Windows users even know exists, in an App that is free, I don't feel I have much of a right to expect more.
Man, I never noticed that damned "DWORD" had no idea it was clickable! all I need now is to suppress leading zero suppression!
 

MrAl

Joined Jun 17, 2014
11,494
Man, I never noticed that damned "DWORD" had no idea it was clickable! all I need now is to suppress leading zero suppression!

You mean all you need now is to turn ABCD into 0000 ABCD ?
If that is true, why would you actually need that?
 
Top