Re: Bitwise OR and AND without bitwise operators....



Is this correct? Bit k, of n would be

m = n/k, m-((m/2)*2)

So could I do this

int testValue = 41;
for(int nBit = 0; nBit < numberOfBits; nBit++) {
m = testValue/nBit;
int bitSet = m-((m/2)*2)
}

CD

.