How to get nth bit (from right) in a binary equivalent of an integer in PHP?

Posted by understack on Stack Overflow See other posts from Stack Overflow or by understack
Published on 2010-04-15T08:23:43Z Indexed on 2010/04/15 8:33 UTC
Read the original article Hit count: 251

Filed under:
|
|

Suppose I want to find 2nd bit in binary equivalent of 13 (binary : 1101). It should return 0.

© Stack Overflow or respective owner

Related posts about php

Related posts about number