Hexadecimal Arithmetic
- Hexadecimal is a base 16 number system.
- To add hexadecimal numbers:
- Add the two hex digits by working with their decimal equivalents.
- If the decimal sum is less than 16 write down the hex equivalent.
- If the decimal sum is 16 or more, subtract 16, write down the hex result and carry 1 to the next-more-significant column.
- Hexadecimal addition can also be accomplished by converting the hexadecimal numbers to binary and adding the binary numbers.
- Subtraction of hexadecimal numbers:
- Subtract the decimal equivalents of the hex digits.
- If a borrow is needed, subtract 1 from the more-significant digit and add a decimal 16 to the digit being borrowed to.
- Write down the hex equivalent of the decimal difference.
- Hexadecimal subtraction can be accomplished by converting the hexadecimal number to binary and then performing binary subtraction.