hexadecimal addition, subtraction, multiplication and division
hexadecimal addition and subtraction:
hexadecimal addition and subtraction is actually very simple. it's easy just to remember that the letters in hexadecimal represent decimal numbers. remember a(10), b(11), c(12), d(13), e(14), f(15).
however, due to inertial thinking, sometimes we often make the mistake of seeing one more digit in the decimal number represented by a letter. for example, we see a as 11, b as 12, etc., so we must remember that a is 10, not 11, and other the same goes for the numerical values represented by letters.
next, let’s officially start talking about hexadecimal addition and subtraction. the hexadecimal addition and subtraction algorithm is the same as the decimal addition and subtraction algorithm. just remember a few points. take 6ae9h+4b7ch as an example. the first the number is 9+c(12)=21. if the result obtained like this is ≥16, 16 must be subtracted from the result, and then the previous number is rounded up by one, so the result is 5, e(14 )+7=21, the leading digit is rounded up, so the result is 22, subtract 16 which is 6, and then the previous number is rounded up by one digit, a(10)+b(11)=21, the front digit is rounded up by one digit, so the result is 22 , subtracting 16 is 6, then the previous number is advanced by one digit 6+4=a(10), the previous number is advanced by one digit so the result is b(11), so 6ae9h+4b7ch=a665h.
the same goes for subtracting hexadecimal numbers, but note that when the number is not enough to subtract, the number that borrows a digit from the previous number is not 10, but 16. for example, if 4-9 is not enough to subtract, borrow a digit from the previous number. not 14-9, but 20-9.