Convert Between Decimal, Hex, and Binary (And a Hex Explanation) For Dummies

I hope I put this in the right place. If not, I would like it if you would pm me as to where you moved it.

I wrote this in a FaceBook comment for a friend. I figured it might be a good addition here.

Quick overview of Hex:
Hexadecimal is a numbering system in it's own. It's very different from our own, but very much the same as well.
Our system is base 10, which means that when we count by our current numbers (10 of them):
0 1 2 3 4 5 6 7 8 9
We add 1 to the next place, and then set the previous place to 0.
So when going up from 9, you set the one's place to 0, and add 1 to the ten's place, getting 10. Or if you are going up from 199, then you set the ten's and the one's place to 0, and add 1 to the hundred's place. This gives you: 200

0 1 2 3 4 5 6 7 8 9 A B C D E F
So A is equal to 10, and F is equal to 15. So now, we can go up to the number 15 without having to add another digit to in front. This was important way back in the early years of computers. You know, when people were psyched about the new, top of the line, 5 megabyte hard drives? Well, each character takes up about 1 byte of space, so every measure was taken to preserve as much memory as possible.

Enough of history. So if you're like me, and you really don't feel like memorizing every hexadecimal number up to 1000 or so, then you'll want a uniform, mathematical system that can convert between any of the three numbers: Binary, Hexadecimal, and Decimal. Albeit this takes work(not too much though. :DDD ), it will give you a greater understanding of binary and hexadecimal and how they work. I know when I learned how to do this, it helped me a lot.

Now, take the remainders (R) and write them going from down to up.
So 241 in Binary is:
11110001
Now, notice how you divide by two, and the system is called binary? Emphasis on the "bi", meaning two. Same with Hexadecimal. "dec" means 10, and "hex" means 6, so added together is 16, so you divide by 16 instead.

~Binary to Decimal:
Converting from Binary to Decimal, is a tad bit more difficult, but not too much.
First, you must look at the length of the sequence. We have:

11110001

Ok, so 8 numbers. Not too difficult. How the conversion works is a bit like an algebraic formula, where:

y=2^x

So you take position 0, which is the first in the sequence, and plug it in for x. So:

y=2^0
y=1

Now, do the same for position 1

y=2^1
y=2

Keep going for all positions, until it looks like this:

y=2^0 =1<--Another way to do this, is to multiply each successivey=2^1 =2position by two. So 16*2=32, 32*2=64, and so on.y=2^2 =4y=2^3 =8
y=2^4 =16
y=2^5 =32
y=2^6 =64
y=2^7 =128

Next, you look at which numbers in the sequence(11110001) are zero(going backwards):

^This seems complicated at first, but once you understand, you can do it much faster.

~Hexadecimal to Decimal
It's similar to the binary to decimal, in that it requires an algebraic equation, which is:

z*(16^v)

Now, z is equal to the successively backwards number in the number sequence that makes up our hex number. Confused? Try this:
F5B

B*(16^v)
5*(16^v)
F*(16^v)
v is the step in which you are on (beginning with 0) so that:
B*(16^0) = 11
5*(16^1) = 80
F*(16^2) = 3840

Now add up:

11+80+3840= 3931

~Hexadecimal to Binary
There are two ways. One requires memorization(blech) but is faster, and the other uses math but is slower.

1.
Let's convert F1.
F is equal to 15, which is 1111 in binary.
1 is, well, 0001, in binary.

Code:

*NOTE* It works best if each individual digit is in a group of four
when in binary. So if your digit is not in a group of four, just add
0's at the front until it is.

Now, you simply just put the two together in order
11110001
There, that easy and quick.

2.
If you hate memorization like me, then you will choose this much easier way.
We'll use F1 again. Here, you convert each digit individually instead of as 1 unit. Now, F is equal to 15, which we convert to binary:

15/2 = 7 R: 1
7/2 = 3 R: 1
3/2 = 1 R: 1
1/2 = 0 R: 1

So we have 1111.

1/2= 0 R: 1

So we have 0001 (add the zeros at the front to get it into a grouping of four)

Good compilation, but I just wanted to say that I don't consider the first method you stated of converting from hexadecimal to binary "memorization".

If you understand both bits and nybbles (1 nybble:4 bits = 1:1), then I think it should come naturally fairly easy. 1 bit = 2^1 possibilities, and 4 bits = 1 nybble = 2^4 = 16 possibilities, which is the number of digits that base sixteen "hexadecimal" arithmetic supports.

Given the above, rather than memorizing the first sixteen whole numbers of the base sixteen arithmetic system, it should be pretty easy to quickly derive for yourself what ???? (binary) is in decimal, which tells you the digit in hexadecimal. Like you said, d3(2^3) + d2(2^2) + d1(2^1) + d0(2^0) gives you the conversion, and it doesn't take very long in my experience.

If you agree with what I've said, this should be an easy and efficient method of converting between both from binary to hexadecimal and from hexadecimal to binary. It might be a lot harder for others to learn, so this is more of my opinion than a correction.

What I'm saying, is that this mental math is very easy to do efficiently. The speed of doing this for hex digits will be almost as fast as actually memorizing their binary forms, especially with practice, obviously.

I know it looks extensive at first, but with practice, it should occur naturally to you. Note that binary arithmetic is also known as base two arithmetic, so the base of all of those exponents you're multiplying by is the number two. The power of each exponent is the digit place of the binary format.

Never thought that it would be so simple to convert decimal numbers to Binary Digits. Though i don't have any use for converting decimal to binary numbers but still it is good that i know how it is done.