Hexadecimal
Addition
Here
are the steps to calculate the addition of hexadecimal:
Step
1: Add
one column at a time.
Step 2: Convert the number into decimal and then
add the number.
Step 3: If the sum of the numbers is greater than
1510, subtract
the result from 16 and then carry 1 to the next column.
Step 3: If the sum of the numbers is less than 1510, convert the number into the hexadecimal.
Here are the examples of hexadecimal addition:
AC5A9+ED694
a. Add the hexadecimal
E D 6 9 4
a. Add one column at a time
b. Convert to decimal and then add (9 + 4 = 13)
c. Decimal 13
is hexadecimal D
A C 5 A 9
E D 6 9 4
D
a. Add next column
b. Convert to decimal and then add (10 + 9 = 19)
c. Subtract the result from 16 (19 –
16 = 3
carry a 1)
1
A C 5 A 9
E D 6 9 4
3 D
a. Add next column
b. Convert to decimal and then add (1 + 5
+ 6 = 12)
c. Decimal 12 is hexadecimal C
1
A C 5 A 9
E D 6 9 4
C 3 D
a. Add next column
b. Convert to decimal & add (12 + 13 = 25)
c. Subtract the result from 16 (25 – 16 = 9 carry a 1)
1
A C 5 A 9
E D 6 9 4
5 C 3 D
a. Add next column
b. Convert and add (1 + 10 + 14 = 25)
c. Subtract the result from 16 (25 – 16 = 9 carry a 1)
1
A C 5 A 9
E D 6 9 4
9
9 C 3 D
a. Add next column
b. Convert and add (1 + 0 + 0 = 1)
1
A C 5 A 9
E D 6 9 4
1 9
9 C 3 D
Hexadecimal
Subtraction
Here
are the steps to calculate the subtraction of hexadecimal:
Step 1: Convert the number into binary
Step 2: Take the 2’s complement of the binary
number and change it to hexadecimal number.
Step 3: Both numbers are adding together to get the
result.
Here are the examples of hexadecimal subtraction:
8416-2A16
a. Convert the hexadecimal
(2A16) into binary number
2A16 = 001010102
a. Take 2’s complement of the binary
b. Change to hexadecimal
0101010 => 11010101
+ 1
11010110 = D610
a. Add both number together to get the result
b. Add (13+8=21)
c. Subtract the result from 16 (21-16=5)
8 4
+ D 6
5 A
Post by Lam Mun Hoo B031310223
Post by Lam Mun Hoo B031310223
No comments:
Post a Comment