Menu

#11 Leading zeroes in Hex Mode

open
nobody
None
5
2009-02-05
2009-02-05
J-S Chenard
No

Hi,

I often have to figure out hexadecimal constant representation through the use of bit exponents. For example what is the HEX representation of the 27th bit set to one in a register. Qalculate works very well with the expression (2^27) and the resulting base set in hexadecimal.

It would be great if there was an option to control the final HEX display width and pad the leading digits with zeros. For example, in a 32-bit register, 2^27 would be represented as 0x08000000. Currently, Qalculate would return 0x8000000. In a lot of tools such as hardware simulators, debuggers, leading zeroes are needed when cutting/pasting the result from Qalculate. To stay consistent with the hexadecimal base, the width of the final results could be given in number of hex digits (e.g. 32-bit register => 8 digits) via a dialog box interface or a configuration option.

It may look crazy, but having the option of padding with zeros up to a register width of 512 bits (128 digits) would be useful to people like myself working with digital logic circuits with very large data paths.

Thanks for considering my suggestions and for this great tool.

Jean-Samuel

Discussion


Log in to post a comment.