dimanche 1 mai 2016

2's complement

Hi to all
:( where I'm wrong?

This is the code correct in Basic4ppc that work

Code:
  str = Chr(Main.btw.Complement(serbuff(y+i)) + 256)  
Where btw is Bitwise library

This in B4j, but not work
Code:
  str = Chr(Bit.Not(serbuff(y+i)) + 256)  
I have add 1 to Bit.Not(serbuff(y+i) ?
Thanks

from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/1SNdoTg
via IFTTT

Aucun commentaire:

Enregistrer un commentaire