_____________________________________________________________ Assembly Coding Corner [Intel 80x86 Assembler] by Silent Trigger |
Chapter 000
|
Created 25.12.1999
|
Dec and Bin
|
Last modified 07.01.2000
|
_____________________________________________________________ _____________________________________________________________ |
The whole "why-should-i-learn-asm-and-what-are-the-dis/advantages*-shit shall go to hell... This text is intended for those who already know that assembler rule our world, so let's start... oh, and please excuse my bad english... Before we start coding it is necessary that you learn some basics. If you are smart and know the whole shit already, skip it... all newbies listen up... Human beings normally use the decimal (base 10) number system but our machine-fellows prefer the binary (base 2) system which is used to represent the two levels of 'on' and 'off'. Base 10 contains digits 0 - 9, base 2 contains digits 0 and 1. Converting from decimal to binary: ---------------------------------------------- Converting from decimal to binary is pretty easy. Even a lamer like You can do this =) You just have to devide the decimal number by 2 again and again while keeping the remainders in mind. Continue this process until the quotient becomes 0. Then write down the remainders in reverse order to get the binary number. |
![]() |
Example: Convert 242 (base 10) to binary. Solution: You should have figured it out how it works. Converting from binary to decimal: ---------------------------------------------- If you wanna convert binary to decimal you have to know the concept of weight associated with each digit position and because you are a newbie you have no clue what im talking about. To understand it, recall the weight of numbers in the decimal system which is almost the same. ![]() We have almost the same situation in the base 2 system: ![]() If you know the weight of each bit in a binary number you can easily add them together to get the decimal. ![]() Well, that's all for now, see you in the next chapter... Send comments, questions, suggestions, money and horney girls to silent-trigger@digital-rebels.de. |
Shout outs to: |
Russ Da Fuss, System Cowboy, Ice Dragon, Wiztrox, Data Excessor, Maestro, GridLock, Rebel, Omnibuz {LunarRaven}, DASavant and DukeCS |
Love goes to: |
Nancy |
E-Mail: | silent-trigger@digital-rebels.de |
AIM: | Silent Tri |
UIN: | 7947903 |
IRC: | Silent-Trigger |
_____________________________________________________________ _____________________________________________________________ |