i have searched the web and through out the forums but, i couldn't find an exact answer. This is my first question, and please excuse my english. I am doing my CS homework which includes adding some fractional hexadecimal numbers. I know the method i am using is correct, however is there an online calculator for hexadecimal that supports fractiional number?. All the calculators i had found, only supported intergers. I just want to check if my answers are correct.
-
$\begingroup$ Hi; You could try Wolfram alpha wolframalpha.com for example FF.12 base 16 + 456.67 base 16 yields 555.79 base 16 $\endgroup$– bobbymMar 22, 2015 at 9:56
-
$\begingroup$ It's a bit tricky but it'll do. Thanks again. $\endgroup$– user3227275Mar 22, 2015 at 14:58
-
$\begingroup$ Also, math.stackexchange.com/questions/673872/… is an important similar reference. $\endgroup$– nickalhMay 6, 2015 at 10:59
1 Answer
Manual Hexadecimal Arithmetic With Decimal Points Remembering decimals base 10 expand to fractions, $$0.123 = 1/10 + 2/10^2 + 3/10^3.$$ Each hexadecimal digit is $$\frac{d_p}{16^p}.$$ where p is 1 for sixteenths (or tenths in decimal), 2 for 256ths (or hundredths in decimal), etc. For example, the number, $$0.27495 = 2/16 + 7/16^2 + 4/16^3+ 9/16^4 + 5/16^5.$$ If you expanded second number to add, how would they add? Can you generalize and describe how hexadecimals with decimal points add or subtract? What about borrowing in other bases? Proofs or justifications should be short or not terribly complex.
Note 1: Although the question seems obscure from a math perspective, every numeric capable computer implements it to perform fraction or decimal arithmetic.