View Full Version : Hex v Dec v Binary
09-30-2008, 08:00 AM
Is there a general rule of thumb as to when to use Hex, Dec or binary numbering with the stamp. I understand the different systems but am at a loss as to when each should be used. Is it a matter of memory, time, or floating point that determines which should be used. I note a lot of sample programs use a combination of all.
09-30-2008, 08:42 AM
To the stamp they are all the same (binary) the only reason to use one over the other is how easy it will be to understand the reason you are using the number. Most will use binary when setting direction or high/low values of a port and hex or decimal depending on the documentation for the part you might be controlling.
09-30-2008, 08:58 AM
So it is only a personal preference to use Hex or Decimal, other than when specified by an external component
09-30-2008, 09:06 AM
Not really, you can use either but if the component says ' send a 6f,fe,cd' do you want to do the math every time?
09-30-2008, 09:09 AM
Thanks again, I get the message - why complicate things when you don't have too