Mtngranek / Member

Forum Posts Following Followers
403 24 23

Fun with Assembly!

So I decided that the next logical step for me, being the complete wack job that I am, is to learn Assembly language. Why on earth would anybody in their right mind want to learn Assembly language? (one of the books I have actually has that as the first sentence of the introduction) I have decided that this is a new goal of mine, as I would one day like to program NES games, and Assembly is what they used to do it. 6502 Assembly to be exact, but the exact processor isn't of any consequence.

So the first thing I am learning is how to convert binary to decimal...now that's excitement!

110101 is a number in binary. You could use the scientific calculator in windows to convert it in a snap, or you could use this formula.

110101

1X2^0 + 0X2^1 + 1X2^2 + 0X2^3 + 1X2^4 + 1X2^5

1 + 0 + 4 + 0 + 16 + 32 = 53

110101 in binary = 53 in decimal

(you always work the number in binary backwards and multiply by 2. The exponents start at 0 and go up from there.)

That is how you convert binary to decimal. It's not very hard once you get the hang of it.I know...I have absolutely no life!

"How do you kill that which has no life?" Where is this quote from? Answer right, and I'll show you how to convert hex to bin.