| | |
Number System:Conversion from binary to decimal
![]() |
Ok,
For the conversion of binary to decimal, check it out:
Let’s say we have to convert –
1010.1010
We solve this kind of problems into two parts as follows:
(<LHS> . <RHS>)
1. First take the left hand side no. of the radix point( . ) which is 1010
to convert it into its equivalent decimal the method is as follows:
1 0 1 0
1*(2^3)+0*(2^2)+1*(2^1)+0*(2^0)=10
i.e. >start from the right-most digit (0 here);
>move from right to left;
>multiply each digit with (2^(position of digit from right-1));
>The sum of all these(10 here) as shown above will give u the decimal equivalent of the
LHS part of radix.
2. Now the important & difficult one;
The Right hand part of radix of the given binary no.
This is 1010 again.Since right-most 0 is of no significance, this can be ommitted
out.
1 0 1
1*(2^-1)+0*(2^-2)+1*(2^-3)=.625 or
[1/(2^1)]+[0/(2^2)]+[1/(2^3)]=.625
i.e.
>we have to move from left to right now.
>multiply each digit with (2^-(position of the digit form radix on left))
or
Divide each digit with (2^position of the digit from radix on left)
>Sum up all these, as above(.625 here) to get the decimal equivalent RHS part of no.
The last step is simple:
Just put the two results obtained in step1. & step2. together with the radix ( . )
to get the required result
Here, it would be=10.625
Thus,
Binary equivalent of 1010.1010 is =10.625
Enjoy,
For the conversion of binary to decimal, check it out:
Let’s say we have to convert –
1010.1010
We solve this kind of problems into two parts as follows:
(<LHS> . <RHS>)
1. First take the left hand side no. of the radix point( . ) which is 1010
to convert it into its equivalent decimal the method is as follows:
1 0 1 0
1*(2^3)+0*(2^2)+1*(2^1)+0*(2^0)=10
i.e. >start from the right-most digit (0 here);
>move from right to left;
>multiply each digit with (2^(position of digit from right-1));
>The sum of all these(10 here) as shown above will give u the decimal equivalent of the
LHS part of radix.
2. Now the important & difficult one;
The Right hand part of radix of the given binary no.
This is 1010 again.Since right-most 0 is of no significance, this can be ommitted
out.
1 0 1
1*(2^-1)+0*(2^-2)+1*(2^-3)=.625 or
[1/(2^1)]+[0/(2^2)]+[1/(2^3)]=.625
i.e.
>we have to move from left to right now.
>multiply each digit with (2^-(position of the digit form radix on left))
or
Divide each digit with (2^position of the digit from radix on left)
>Sum up all these, as above(.625 here) to get the decimal equivalent RHS part of no.
The last step is simple:
Just put the two results obtained in step1. & step2. together with the radix ( . )
to get the required result
Here, it would be=10.625
Thus,
Binary equivalent of 1010.1010 is =10.625
Enjoy,
![]() |
Similar Threads
- binary to decimal in c++ code (C++)
- How do I Take in Hexidecimal input out put binary, decimal, and octal (Java)
- i need code for binary to decimal (it should be written in 'C') (C)
Other Threads in the C Forum
- Previous Thread: CSV file
- Next Thread: Binary Fraction conversion question
| Thread Tools | Search this Thread |
* adobe api array arrays binarysearch calculate centimeter char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux hacking hardware highest homework i/o ide inches incrementoperators intmain() iso km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation pattern pdf performance pointer posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming stack standard strchr string suggestions test unix urboc user variable voidmain() whythiscodecausesegmentationfault win32api windows.h





