keeping sign

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sokrys
Forum Newbie
Posts: 1
Joined: Tue Jun 28, 2005 10:10 am

keeping sign

Post by sokrys »

Is it possible to read file with values of signed byte range (-126, 127) - (I used to program in java) - modify them - let's say: $a ^ $b =$c under condition that byte ^ byte = always byte and write the modified values as new file preserving sign ???
I tried to do it, but everytime I have all negative values gone ! so results are distorted.
Post Reply