Angelo Messina Active Member Licensed User Longtime User Jan 18, 2018 #1 Salve ho la necessità di convertire i bit di una variabile x ( gli 0 diventano 1 e viceversa ) esiste una istruzione B4A che lo fa? come in java int CRC_L = ~(BccLo) & 0xFF; int CRC_H = ~(BccHi) & 0xFF;
Salve ho la necessità di convertire i bit di una variabile x ( gli 0 diventano 1 e viceversa ) esiste una istruzione B4A che lo fa? come in java int CRC_L = ~(BccLo) & 0xFF; int CRC_H = ~(BccHi) & 0xFF;
Erel B4X founder Staff member Licensed User Longtime User Jan 18, 2018 #2 This is the English section of this forum. You can post in the Spanish forum. B4X: Dim CRC_L as int = Bit.And(Bit.Not(BccLO), 0xFF) Upvote 0
This is the English section of this forum. You can post in the Spanish forum. B4X: Dim CRC_L as int = Bit.And(Bit.Not(BccLO), 0xFF)
LucaMs Expert Licensed User Longtime User Jan 18, 2018 #3 Erel said: You can post in the Spanish forum. Click to expand... Italian Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 18, 2018 #4 Oops. 'istruzione' does look like an Italian word. Upvote 0
S sorex Expert Licensed User Longtime User Jan 18, 2018 #5 you probably want this B4X: CRC_L = bit.and(BccLo,255) CRC_H = bit.and(BccHi,255) Upvote 0
Star-Dust Expert Licensed User Longtime User Jan 19, 2018 #6 Try also B4X: ByteLow = 255-ByteLow ByteHi = 255-ByteHi '16 bit Num=65535-Num Upvote 0