Sir G
I M Tahir & I m new member of go4expert
my assignmet is
C++ code of converting binary number into decimal and hexa no into binary
i need u r help
i shell b very thankfull to u for u r this act of kindness

Sir G
I M Tahir & I m new member of go4expert
my assignmet is
C++ code of converting binary number into decimal and hexa no into binary
i need u r help
i shell b very thankfull to u for u r this act of kindness

I will not code this for you, as it sounds like an assignment, and you need to learn. I will, however, give you a good approach.
A word is made up of 4 hex characters. Each hex character has 4 binary values that represent it.

To convert HEX to DECIMAL:

1) reverse the order of the digits in the hex word (1521 becomes 1251, for example)
2) multiply the current digit by n to the power of 16, where n starts at 0 and ends at 3 (it is incremented with each digit processed)

Here is the step worked out for further detail:

1 * (16^0)
2 * (16^1)
5 * (16^2)
1 * (16^3)

3) add the results of your multiplication together -- you should have the decimal number

Note that I am not directly telling you how to complete this task, as I gave you Hex to Decimal, and you need Hex to Binary and Binary to decimal.