Hexadecimal addition

Solved
bolo -  
 electroben -
Hello,

I’d like to understand how to perform a hexadecimal addition

5 C 92
+ 6 A + 106
1 0 (carry)
0 C 6 198

F F 255
+ F F + 255
1 0 (carry)
1 F E 510

do I need to convert to binary to calculate

thank you

7 answers

  1. Marden Posted messages 1075 Status Member 210
     
    As in decimal, addition is performed digit by digit. If the result exceeds "F", we subtract "F" and propagate a carry of "1" to the next digit, toward the left.
    See http://ardenneaparis.free.fr/mesScripts/calBas16.htm
    where the "p+" button allows step-by-step addition.
    (the form below is a converter)
    25
    1. Prince
       
      We subtract 16 and not ("F" which means 15)
      0
    2. Marden
       
      I confirm that it is indeed 16 that must be subtracted, not 15 as hastily announced. More precisely, it is the value "base" that is subtracted, knowing that the script is supposed to perform calculations in bases 2 (binary), 3 (ternary or trinary), 8 (octal), 10 (decimal), and 16 ( hexadecimal).
      0