Conversion binary to decimal, Decimal to binary , octal to binary, hexadecimal to binary, binary to hex , decimal to hex ................ All conversion .
2. Decimal
The Decimal numeral system has ten as
its base .
It is numerical base most widely used by
modern civilizations.
Base 10
Consists of digits 0 to 9
Example:
decimal:1 5 0 100 -250 5567
Shovo
3. Binary
Binary uses only 2 digits which are 0
and 1 and is also called base 2.
Consists of digits 0 and 1
Example: (1001)2
Shovo
4. Octal
Octal uses 8 digits which are
0,1,2,3,4,5,6,7 .
It is also called base 8.
The First digit must be 0.
Example: 2758
Shovo
5. Hexadecimal
The word hexadecimal is made up of
2 parts which are hex(6) and
decimal(10).
Hexadecimal is sometimes called hex
or base 16.
To get 16 digits we have to use
letters of the alphabet and those 16
are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
Example: 7F16
Shovo
11. Binary to Decimal
Now binary to decimal
From right to left every digit will be
counted.
Every digit should be multiply with
2.because binary base is 2.
And It’s power will be started from
zero & in per digit it(power) will
increase 1 rapidly right to left
rapidly.
Akmol
12. Binary to Decimal
The answer of multiply of every digit
will be added to each other.
These we can get our desired
decimal number.
Akmol
15. Conversation of Octal
There is no method to covert decimal
to direct octal.
1st the number should convert in
binary and then we can convert it in
octal.
But when we can direct covert the
octal number to decimal.
Tarek
16. Binary to octal
To be converted in octal , from right
to left we should count 3 digits of
that binary number as a set.
Suppose the binary number is
• (1010001)2
Example Figure is
1 010 001
Tarek
17. Binary to octal
1 010 001
Here two digits less.
In this cage we count “0” before that
number to fill the set.
Means 001
here we take two zero to fill the set .
Tarek
18. Binary to octal
Here in example , we have 3 sets. Now
every digit of a set should multiple with
two. Because binary base is two.
Now power of “two” should set serially
which starts from zero.. And then 1 , then
two…
At last we should calculate the result of
the sets and calculate addition of the
sets .
the answers should place side by side
from right to left to create a number.
Tarek
19. Example
001 010 001
001
0*2^2 +0*2^1+1*2^0
=0+0+1
=1
010
0*2^3 +1*2^1+0*2^0
=0+2+0
=2
001
001
0*2^2 +0*2^1+1*2^0
=0+0+1
=1
if we set all this numbers side by side , we got 121
Tarek
20. Octal to Binary
To convert octal to binary,wecount every
digit of octal from right to left anddivided
by binary base.
Binary base is 2 and octal base is
8.so2^3=8
So ,every digit of octal number maximum
value of 3 digit in binary format. if it less
then 3 digit fill with 0 before that digits.
Then arrange binaryvalue of every digit
from right to left. If that digit have use
less 0 beforewe cut them and get desire
number.
21. Octal to Binary
here , (121)
8
Now 2 1 2 2 2 1
0-1 1-0 0-1
0-1
Found 1 01 2 010 1 01
here two digit less
So , 1 001 2 010 1 001
Now arrange the binary right to left & found.
(121) 0010100001
8
(121) 10100001
8
22. Octal to decimal
Count every digit and multiply with octal
base ( 8) with each.
now we should insert the base power
from right to left
Then calculate the answer and also
calculate the additional answer,
This answer is our desired decimal
number.
tarek
24. Conversation of Hexadecimal
How to convert decimal to hexadecimal ?&
How to return hexadecimal to decimal ?
Pradipta
25. Conversation of Hexadecimal
The formula of Number conversation of octal &
hexadecimal is very close.
For convert directly decimal to hexadecimal,
there is no method.
1st we should convert the decimal number to
binary, then binary to hexadecimal.
But same as octal it also directly convert
hexadecimal to decimal.
Pradipta
26. Decimal to Hexadecimal
Suppose the decimal number is= 81 &
it’s binary is (1010001)2
To be converted into hexadecimal, from right to
left we should count 4 digits of that binary
number as a set.
Example Figure is
101 0001
Pradipta
27. Binary to Hexadecimal
101 0001
Here one digits less.
In this cage we count “0” before that
number to fill the set.
Means 0101
here we take one zero to fill the set .
Pradipta
28. Binary to Hexadecimal
Here in example , we have 2 sets. Now every
digit of a set should multiple with two. Because
binary base is two.
Now power of “two” should increase rapidly count
from zero. At last we should calculate the result
of the sets and calculate addition of the sets .
the answers should place side by side from right
to left to create a number.
Pradipta
29. Binary to Hexadecimal
Now (1010001)2
0001
3 2 1 0
=0x2+0x2+0x2+1x2
=0+0+0+1
=1
0101
3 2 1 0
=0x2+1x2+0x2+1x2
=0+4+0+1
=5
arrange the number right to left…..get 51
Now ,we get the hexadecimal- (51)16
pradipta
30. Hexadecimal to binary
To convert hexadecimal to binary, we
count every digit of hexadecimal from right
to left and divided by binary base.
Binary base is 2 and hexadecimal base is
16.so 2^4=16
So ,every digit of hexadecimal number
maximum value of 4 digit in binary format.
if it less then 4 digit fill with 0 before that
digits.
Then arrange binary value of every digit
from right to left. If that digits have
useless 0 before we cut them and get
desire number.
31. Hexadecimal to binary
here , (51)
16
Now 2 5 2 1
2 2-1 0-1
1-0
Found 5 101 1 01
here some digit less
So , 5 0101 1 0001
Now arrange the binary right to left & found.
(51) 010100001
16
(121) 10100001
16
32. Hexadecimal to
octal
It is not possible,
1st hexadecimal
number convert
into binary then
octal.
Octal to Hexadecimal
It is not possible,
1st octal number
convert into binary
then hexadecimal.
33. Hexadecimal to Decimal
Now ,
Count every digit and multiply with
hexadecimal base (16) with each &
increase power from right to left
Then calculate the multiply and also add
the answer.
This answer is our desired decimal
number.
Pradipta