Programming Assembly Language - Part 1

By Spygon, published Dec 21, 2007
Published Content: 18  Total Views: 3,767  Favorited By: 0 CPs
Rating: 3.8 of 5
This "low level programming language" doesn't mean it is inferior to the "high level programming language". It does mean that this language is more abstract and harder to be understood by the programmers themselves. There are two types of low level programming language. They are the first generation which is called "machine code" and the second generation which is called "assembly language". In this article I'll write a simple tutorial series about the assembly language.

Chapter One
Types of Numeral System


In assembly language we will have to know about four numeral systems.
- The first one is Binary Numeral System (base 2). This one is commonly used in machine code.
- The second one is Decimal (base 10). Most people must know this type. It is usually used in our life.
- The third one is Octal (base 8)
- And the last one which is the most common type used in assembly language is Hexadecimal (base 16).

But what are they?
Here's a little explanation.

Actually all data or program in a computer is first translated to binary. Although it is decimal, octal or even hexadecimal, they will always be translated to binary to be processed. If in decimal we use ten numbers, from 0 up to 9, in binary we only use 0's and 1's. Because it is base two, we can convert it into decimal by multiplying its "x" number with 2x (counted form left, starting from 0) For example we have this number (1101) in binary. And by using that method we can convert it into decimal -- 1101 = (1 X 23) + (1 X 22) + (0 X 21) + (1 X 20) = 26.

Next is the decimal. I don't think I have to explain much about decimal since we usually use it in our daily life.

Now here comes Octal. It is base eight numeral system. In decimal we use ten numbers, in binary we use two numbers then in octal we use eight numbers, from 0 up to 7. The same method, applied to convert it into decimal, multiply its "x" number with 8x (counted form left, counted from 0). For example, 12 in octal means 10 in decimal. Just try to count it with that method.

Comments
Type in Your Comments Below - (1000 characters left)
Your name:

Submit your own content on this or any topic. Get started »
Most Commented On