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.
And the last and the most complicated one is Hexadecimal. Since it is base 16 then we'll have to use 16 digits. But we only have ten numbers. So how could it be 16? The answer is simple, we'll use the first six alphabet. So the digits will be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F . Usually in assembly code we form it in two digits form. For example, 01,0F,2F, AF, FF. But like Decimal, we can remove the zero if it's placed in the front. 01 = 1. We can use the same way to convert it to decimal, but we must count A as 10, B as 11, etc. Just try to convert FF to decimal. F means 15, so FF = (15 X 1611) + (15 X 160) = 255. And that is the limit for two digits hexadecimals.
This is the end of the first section. In the next section we'll discuss more on this numeral system and move into the machine ( It's microprocessor ).
Next section will come as soon as this writing is published.
If this guide confused you don't hesitate to contact me.
Published by Spygon
University Student View profile
- What's in a Number?Why does the media emphasize the age of an actor at his death? What is the relevance of age? What does it mean in our lives? What is in an age,a year,a number?
- What Does Your VIN Number Mean?Every car has a VIN or Vehicle Identification Number. However, few car owners are able to sort through the digits and actually figure out what that number means. This article details that process and explains what a V...
- Programming Assembly Language - Part 2
- Gaining Weight - the Nutrition (Part I)
- What You Need to Know Before Choosing or Switching Medicare Part D Programs
- Taylor Hicks Tour Experience Part 5
- The Best Heritage Sites of Eastern Ireland Part II
- Four Part Series on How to Play the Guitar - Tuning/Guitar Basics
- Best Part of the News is Those Wacky Headlines



