Learn java base conversion supplementary learning

Sour grass 2021-01-14 14:55:45
learn java base conversion supplementary


Hexadecimal conversion :

Basics :

​ The number used in binary is :0/1

​ The number used in octal is :0/1/2/3/4/5/6/7

​ The decimal number is :0/1/2/3/4/5/6/7/8/9

​ The number used in hexadecimal is :0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15

​ -> because 10 The above is not a good indication ,10/11/12/13/14/15 Use letters to indicate a/b/c/d/e/f

​ -> So the hexadecimal number is expressed as :0/1/2/3/4/5/6/7/8/9/a/b/c/d/e/f

  • Binary to decimal
 Take a chestnut : a=100110;
Then the decimal system is (2^0x0)+(2^1x1)+(2^2x1)+...+2^5x1=0+2+4+0+0+32=38
  • Octal to decimal
 Take a chestnut : a=345
Then the decimal system is (8^0x5)+(8^1x4)+(8^2x3)=5+32+64x3=229
  • Hexadecimal to decimal
 Take a chestnut : a=6af
Then the decimal system is (16^0x15)+(16^1x13)+(16^2x6)=15+16x13+16x16x6=1759
  • Convert decimal to hexadecimal or Convert decimal to octal or Convert decimal to binary
 Suppose the decimal number is : asdf/x //x It can be 16 or 8 or 2 It depends on why you convert
asdf/x=?....a;
if(?<x) be The result of the conversion is ?a
if(?>x) be Continue to divide
?/x=??....b;
if(?<x) be The result of the conversion is ??ba
if(?>x) be Continue to divide
??/x=???....c;
if(?<x) be The result of the conversion is ???cba
if(?>x) be Continue to divide
No more examples ; Through the decimal system as a medium , Can achieve four base arbitrary conversion ;

Mengxin Xiaobai , It's possible that some aspects are not right , Welcome to correct ; We're going to be stronger together !

版权声明
本文为[Sour grass]所创,转载请带上原文链接,感谢
https://javamana.com/2021/01/20210114145444453x.html

  1. Redis basic command
  2. Summary of MySQL articles
  3. 2、 Create k8s cluster in 5 seconds
  4. data自定义属性在jQuery中的用法
  5. Linux常见解压缩
  6. Detailed explanation of HBase basic principle
  7. 1、 Why and how to learn k8s
  8. Java advanced (29) -- HashMap set
  9. java中大文件上传
  10. Weblogic 2017-3248 analysis of Java Security
  11. Kubernetes official java client 8: fluent style
  12. Explain the function of thread pool and how to use it in Java
  13. Programming software tutorial video Encyclopedia: C + + / Java / Python / assembly / easy language (with tutorial)
  14. Description of dependency problem after javacv is updated to 1.5. X and how to reduce the size of dependency package
  15. Java reflection & dynamic agent
  16. Building Apache 2.4 + php7 + mysql8 in centos7 environment
  17. Summary of Java multithreading (1)
  18. Oracle AWR report generation
  19. Four magic functions of mybatis, don't step on the pit!
  20. A 16-year-old high school student successfully transplanted Linux to iPhone and posted a detailed guide
  21. Centos7 one click installation of JDK1.8 shell script
  22. Mounting of file system in Linux (centos7)
  23. How does serverless deal with the resource supply demand of k8s in the offline scenario
  24. Detailed explanation of HBase basic principle
  25. Spring security oauth2.0 authentication and authorization 4: distributed system authentication and authorization
  26. Redis performance Part 5 redis buffer
  27. JavaScript this keyword
  28. Summary of Java multithreading (3)
  29. Sentry(v20.12.1) K8S 云原生架构探索, SENTRY FOR JAVASCRIPT 手动捕获事件基本用法
  30. Sentry(v20.12.1) K8S 云原生架构探索, SENTRY FOR JAVASCRIPT 手动捕获事件基本用法
  31. (10) Spring from the beginning to the end
  32. Summary of Java multithreading (2)
  33. Spring source notes! From the introduction to the source code, let you really understand the source code
  34. A stormy sunny day
  35. Zookeeper (curator), the implementation of distributed lock
  36. Show the sky! Tencent T4's core Java Dictionary (framework + principle + Notes + map)
  37. Spring boot project, how to gracefully replace the blank value in the interface parameter with null value?
  38. Spring boot project, how to gracefully replace the blank value in the interface parameter with null value?
  39. docker+mysql集群+读写分离+mycat管理+垂直分库+负载均衡
  40. docker+mysql集群+读写分离+mycat管理+垂直分库+负载均衡
  41. To what extent can I go out to work?
  42. Java 使用拦截器无限转发/重定向无限循环/重定向次数过多报错(StackOverflowError) 解决方案
  43. Implementation of rocketmq message sending based on JMeter
  44. How to choose the ticket grabbing app in the Spring Festival? We have measured
  45. Implementation of rocketmq message sending based on JMeter
  46. My programmer's Road: self study java
  47. My programmer's Road: self study java
  48. All in one, one article talks about the use of virtual machine VirtualBox and Linux
  49. All in one, one article talks about the use of virtual machine VirtualBox and Linux
  50. Java 使用拦截器无限转发/重定向无限循环/重定向次数过多报错(StackOverflowError) 解决方案
  51. [Java training project] Java ID number recognition system
  52. How does serverless deal with the resource supply demand of k8s in the offline scenario
  53. Detailed explanation of HBase basic principle
  54. Explain the function of thread pool and how to use it in Java
  55. Kubernetes official java client 8: fluent style
  56. 010_MySQL
  57. Vibrant special purchases for the Spring Festival tiktok section, hundreds of good things to make the year more rich flavor.
  58. 010_MySQL
  59. Of the 4 million docker images, 51% have high-risk vulnerabilities
  60. Rocketmq CPP client visual studio 2019 compilation