by nicetryguy · 5y ago · 0 comments
I do 6502 ASM with bit tricks and all and i can tell you straight up that hex is never as intuitive as decimal IMO.
Base eleven sounds like the stuff of nightmares =)
For example we think of 10, 100, 50 as nice round convenient quantities.
CPUs see 16, 256, 2048 as convenient quantities--in hex that's visible: 0x10, 0x100, 0x800.
Say i were to name a random hex value like #$9C right now it would take me a few seconds to convert that to decimal in my head though... 156 took me a few seconds to sort out. I don't have to think about what 156 means in decimal because i just know what it is.
For instance, you say 0x9C... that's just over half (0x80) of 0x100, close to 2/3rds (0xAA). Given in embedded we're often using a byte to represent a quantity, that gives enough feel.
I should practice multiplying hex by hand, I reckon that would assist in getting there.
> It was $62 degrees Fahrenheit yesterday. I can't just go displaying that in a program. Nor is it meaningful to me without a decimal conversion.
It's just as meaningless to me even if you do the conversion to base10 for display... I don't do deg F intuitively and would have to convert to Celsius in my head. It's all about what we are familiar with.