answersLogoWhite

0

sol 1:
return(if(x!=0)&&!(x&(x-1));
sol 2:
return(if(x!=0)&&(x&(~x+)));

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Which Bit wise operator is used to determine whether a particular bit is on or off?

Bitwise OR [|] operator


Write a program in vb to check whether a no is prime or not?

Function isPrime(ByVal n As Integer) As Boolean If n < 2 Then Return False End If Dim sqrtn As Integer = Math.Sqrt(n) + 1 For i As Integer = 2 To sqrtn If (n Mod i) = 0 Then Return False End If Next Return True End Function


Is 8.5 an integer?

No, -8.5 is not an integer. An integer is a number without any fractions.


What is the integer of 6.51 plus 1.35 plus 15.46?

Do the addition, then convert to an integer. The result will depend on whether you want to round to the nearest integer, round up, or round down.


What stament is always trueabout the sum of a negtive integer and positive integer?

The statement is: "Their sum is always an integer." Whether the sum is negative or positive depends on the two original integers.


Is 177 a square number?

If your question is whether or not 177 has a square root which is an integer, then no.


How can I tell whether a number is odd?

it is odd if when you divide it by 2 you do not get a whole integer


How do you know whether a is a multiple of another?

Divide the other into a. If the answer is an integer, a is a multiple of the other.


Is -19 an integer?

Yes, -19 is an integer. An integer is any whole number, whether positive, negative, or zero. In this case, -19 is a negative whole number, making it an integer.


What is a function that determines whether a condition is true or false?

A logical function, such as the IF function.


What are all of the integer numbers?

All of the numbers that are in Positive and Negative sign are Integers , whether they reach 1 million if it has Positive or Negative sign it is considered as Integer .


Are irrational numbers negative integers?

No. Every integer, whether negative or positive, is rational.