Page 28 - CodePilot V5.0 C7
P. 28
DECIMAL TO HEXADECIMAL NUMBER SYSTEM
To convert a decimal number to hexadecimal, follow these steps:
Step 1 Divide the given decimal number by 16 and note the remainder.
Step 2 Divide the quotient obtained from the previous step by 16 and note the new remainder.
Step 3 Repeat the steps until the quotient becomes less than 16.
Step 4 Write the remainders in reverse order, starting with the last remainder.
Example 1: Example 2:
Convert (987) to a hexadecimal number. Convert (5386) to a hexadecimal number.
10
10
16 987 16 5386
16 61 11 (B) 16 336 10 (A)
3 13 (D) 16 21 0
1 5
Now, we take the remainders from bottom to
top: 3, D, B. Now, we take the remainders from bottom to
top: 1, 5, 0, A.
Therefore, (987) = (3DB) 16
10
Therefore, (5386) = (150A) 16
10
Ask
AGENT
OrangeAI
Why is the binary number system considered the most fundamental for computers?
Study
BINARY ARITHMETIC OPERATIONS
Binary arithmetic operations are mathematical calculations performed using binary numbers,
which consist of only 0s and 1s. These operations include addition, subtraction, multiplication
and division.
BINARY ADDITION
To add binary numbers, follow these steps:
Step 1 Align the binary numbers you want to add, one below the other.
Step 2 Start from the rightmost digit and add the digits.
Step 3 Write the sum of the digits. If the sum is 1 or 0, write the corresponding value. If the
sum is 2 (i.e., 1 + 1), write 0 and carry over 1 to the next column.
Step 4 Repeat the steps for all columns from right to left.
26
CodePilot (V5.0)-VII

