in reply to Binary to decimal conversion
// read number function readNumber(){ $num = fread($this->buffer, 8); $r = ""; for($byte = 7 ; $byte >= 0 ; $byte--) { // reverse the bytes $r .= $num[$byte]; } $ret = unpack("dnum",$r); return $ret['num']; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Binary to decimal conversion
by andreas1234567 (Vicar) on Dec 11, 2007 at 09:45 UTC | |
by Anonymous Monk on Dec 11, 2007 at 10:06 UTC |