Prove that, if x AND x-1 = 0 then x=2^m (m>=0).
- From: Srinu <sinu.nayak2001@xxxxxxxxx>
- Date: Sun, 21 Oct 2007 11:17:03 -0000
Hi all,
How to prove, if x AND x-1 = 0 then x=2^m (m>=0)?
Here the fact is, if we perform a logical AND operation of the bits of
x and x-1 (x and x-1 are two numbers stored in computer memory) and we
get a value zero, then we can say x is a number that is power of 2.
Srinu.
.
- Prev by Date: Re: Russell paradox solved by infinite multi-layering
- Next by Date: Re: A simple paradox in Godels incompleteness theorem that invalidat
- Previous by thread: CFP: INTELLIGENT SYSTEMS FOR CRISIS AND DISASTER MANAGEMENT
- Next by thread: Re: Prove that, if x AND x-1 = 0 then x=2^m (m>=0).
- Index(es):
Relevant Pages
|