i was reading 28 days and it showed how to convert hexidecimal and binary to decimal and i was wondering what exactly is the process for the following:

1)Decimal to hex?

and

2)Decimal to binary?
This is an easier process than it looks. You basically look for the highest power of the base that is lower than the decimal number. Consider the decimal number 28910. If you want to convert this to hexadecimal, look for the highest power of the base that is lower than 28910. This is the 2nd power, 162, or 256. Since it's the second, it will be the third digit (sort of how C++ handles arrays. First digit is to the 0 power, etc.). So you have 100 16, and 289-256 leaves you with 3310. Now 161 goes into 33 two times, so that gives you 12016, and 33-32 is 110. 160 goes into 1 once, so that leaves you with the final number: 28910 = 12116. You can do a simliar process to convert from base 10 to any other base.
Good Idea Excellent explanation.
thanks for that.
lafferjm wrote:
thanks for that.
Got it now? Anything more need to be qualified or clarified?
im all set for now.
  
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement