| Author |
Conversion of negative binary number to decimal number
|
nagajyothi Avusingi
Greenhorn
Joined: May 06, 2004
Posts: 1
|
|
|
if we have a byte value EX: 11111111 where 1 in first digit place shows that its negative number, how to get back the decimal number which will be negative.
|
 |
Stefan Wagner
Ranch Hand
Joined: Jun 02, 2003
Posts: 1923
|
|
You can convert it to an int, and then convert this into a byte: The casting in the second line is needed, to avoid the compilerwarning 'possible loss of precision'.
|
http://home.arcor.de/hirnstrom/bewerbung
|
 |
 |
|
|
subject: Conversion of negative binary number to decimal number
|
|
|