how can i convert decimal to hex or another basis without use dec2hex ?
Mostra commenti meno recenti
I need to make a function about convert basis to another (decimal to oktal or another) but i dont know the prinsip , i hope some one give me tips for that
Risposta accettata
Più risposte (1)
MathReallyWorks
il 26 Mag 2017
2 voti
Hello Mohammad Imam Malik,
I guess you are asking for the principle behind these conversions.
Read this:
Steps:(Decimal to hex)
1. Divide the decimal number by 16. Treat the division as an integer division.
2. Write down the remainder (in hexadecimal).
3. Divide the result again by 16. Treat the division as an integer division.
4. Repeat step 2 and 3 until result is 0.
5. The hex value is the digit sequence of the remainders from the last to first.
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!