What are the rules to be followed for adding two hexadecimal numbers?
Basic concepts of Hexadecimal:
- Hexadecimal is base 16.
- There are 16 digits in counting (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)
- When you reach 16, you carry a “1” over to the next column
- The number after F (decimal 15) is 10 in hex (or 16 in decimal)
Steps to add two hexadecimal numbers:
1. Add one column at a time.
2. Convert to decimal and add the numbers.
3(a). If the result of step two is 16 or larger subtract the result from 16 and carry 1 to the next column.
(b). If the result of step two is less than 16, convert the number to hexadecimal.