Is it possible to check if a number is in a range with bitwise operations? : <p>Is it possible to only use bitwise operations on to check if a number falls between two numbers? </p>

<p>In Python, you could do something like this.    </p>

<pre><code>if 10000 &lt;= number &lt;= 30000:
    pass
</code></pre>

<p>Ultimately, you could use loops to do any math or comparison operation needed to check the range. I am wondering if there is a more elegant solution to this.  </p>
