0
Hello
Conducting some studies on PHP I came across bitwise and until then all its operations has not been anything difficult, just the one of the right shift
An exmeplo I took and I still don’t understand was this:
print(4>>6); //onde o resultado final é igual a zero
And looking at a book I realized the following calculation for this expression:
4/2^6
2^6 = 2*2*2*2*2*2=64
64/4 = 0,06
That in the case would be equal to zero, which is the result that php returns me, although I think it should give 16. Could someone explain this logic to me?
The language is different, but the functioning is the same
– Bacco