Question: Write a method that converts a hexadecimal digit into a decimal value. Example: Enter a hex digit: F The decimal value for hex digit F
Write a method that converts a hexadecimal digit into a decimal value.
Example:
Enter a hex digit: F
The decimal value for hex digit F is 15
Write a method that converts a hexadecimal number into a decimal number.
Example:
ABCD =>
A*16^3 + B*16^2 + C*16^1+ D*16^0
= ((A*16 + B)*16 + C)*16+D
= ((10*16 + 11)*16 + 12)*16+13 = ?
Test your code, add analysis, design and test to you file as a comment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
