Assembly Language - Numbers System
Numbers hmmm... What do these numbers means. Well in this blog post I am going to tell you about the numbers.
As we already know computers don't understand our language so neither our numbers like 0,1,2,3,4...
Lets start in this post I am going to cover to number systems.
There are four number systems but only three which are important to us are :-
1. Binary
2. Decimal
3. Octal
4. Hexadecimal
As you can already see from the above picture the,
- Binary Numbering System has base 2
- Decimal Numbering System has base 10
- Octal Numbering System has base 8
- Hexadecimal Numbering System has base 16
Now lets talk about the base:-
Well base in simple language means how many different digit it can represent.
For example,
Binary number has base 2 means it can represent two different digits which are 0 and 1.
likewise decimal has base 10 means it can represent 10 different digits which are 0,1,2,3,4,5,6,7,8,9
As computer only understand only binary language so lets see how to convert different number system into binary number system
Suppose convert decimal 10 to binary:-
Suppose convert hex 1A to binary:-
The computer uses hex number system rather than decimal because the maximum value you can represent with decimal is 255 which require 3 field also conversion is not simple while the maximum value you can represent with hex is FF (FF is equal to decimal 255) which require 2 field and also conversion is simple
For octal you can try it for homework or if you can't then just comment and I will explain it in next post
For Homework try,
Decimal 27 to binary
Hex 2C in binary
Octal 65 in binary
That's it for this blog post I am going to explain bits and bytes in the next post till then keep smiling :)
1. Decimal to Binary:-
Suppose convert decimal 10 to binary:-
2. Hexadecimal to Binary :-
Suppose convert hex 1A to binary:-
The computer uses hex number system rather than decimal because the maximum value you can represent with decimal is 255 which require 3 field also conversion is not simple while the maximum value you can represent with hex is FF (FF is equal to decimal 255) which require 2 field and also conversion is simple
For octal you can try it for homework or if you can't then just comment and I will explain it in next post
For Homework try,
Decimal 27 to binary
Hex 2C in binary
Octal 65 in binary
That's it for this blog post I am going to explain bits and bytes in the next post till then keep smiling :)
Assembly Language - Numbers System
Reviewed by h4kk4
on
March 10, 2020
Rating:
No comments:
Enter your comments here if you need any help: