LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ouadji

Be able to view the minus sign for negative non-decimal formatted numbers

Status: New

 

be able to choice the "minus sign" for the negative non-decimal numbers

 

            i'm only talking about the way that an indicator can display a number.

 

                                                  like this,

 

                     demo.png

 

minus.png

15 Comments
RavensFan
Knight of NI

So are you asking for a mixture of a negative sign which applies to decimal formatted numbers with hexadecimal characters?  I have never, ever seen a hexadecimal number written that way before.

K C
Trusted Enthusiast

That was my first thing that crossed my mind 'I have never seen negative hexadecimal numbers'

If the number is related to hardware it is impossible (I think) If it is just a number I think it will be very confusing to have negative hexadecimal numbers.

ouadji
Trusted Enthusiast

no, nothing to do with the hardware.

of course ! obviously ... the minus sign makes no sense for hardware.

It's Just a representation format more understandable (more readable) to humans.


sorry for my bad english, I'm doing my best.

RavensFan
Knight of NI

But is it more understandable or readable to humans if no one has ever seen it used that way before?  I'd say know.  Please show me some reference where there was as "negative" hexadecimal number used like that before.  Would it even be possible to show certain numbers that have some ambiguous meaning?  Suppose you have a signed 8-bit integer.  Someone would try to show something has - FF.   What would that possibly mean?

crossrulz
Knight of NI

<Someone would try to show something has - FF.   What would that possibly mean?

-1*-1 = 1

 

Here's my main point against the idea.  Every time I want to see hexidecimal display, it is because I want to know what the bits are.  When I care about what the value actually means, I use decimal display.  So a minus sign makes absolutely no sense when looking at the bits.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
ouadji
Trusted Enthusiast

@ crossrulz :

"So a minus sign makes absolutely no sense when looking at the bits."
no problem, I agree with you  ... but i'm not looking at the bits, i only talking about a different format to display a negative number

 

crossrulz
Knight of NI

And where have you actually had a need to show a negative hexidecimal number?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
ouadji
Trusted Enthusiast

I personally have never had this kind of need >>  here, on the french forum

AristosQueue (NI)
NI Employee (retired)

ouadi is right insofar as hex math is a real thing, and it makes total sense to do arithmetic in hex. Programmers never work in it. Mathematicians do. Hex floating point also makes sense... "A3.56EeE" is a perfectly valid number (you have to be very careful about your case to differentiate a value "E" from the symbol for "exponent", but it works). It doesn't exist in any programming environment I've ever seen.

 

So, ouadi's request is not unreasonable. But it would affect such a small slice of LV users that I don't thnk it would ever be something NI would work on.

 

You could relatively easily create your own XControl that does this, both for control and indicator. Just use a string control and "If value is negative, append negative sign, then append the absolute value of the integer as hex." Use the Mantissa And Exponent primitive if you want to do similar work for floating point values. (I'm not sure about the manipulation of fixed-point numbers, but I think the APIs exist.)

Darin.K
Trusted Enthusiast

Python does this, the sign and the radix are separate entities as they mathematically should be.  I do not think you need an option, signed integers should simply show the sign and unsigned ones not.