find if a number is perfect square

How to find if a number is a perfect square?

I am NOT looking for the solution which says check if sqrt is integer or not
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rog DSQL Developer / Web Development / Business AnalysisCommented:
Could you give us more information?  How about a sample of what you are looking for?  When is this due? ;)
bsarvanikumarAuthor Commented:
for those who need clarification

I don't want this solution

int n;
cin >> n;
if (sqrt (N) == Whole Number)
  cout << "A perfect square"
  cout << "Not a perfect square"
I was hoping more in terms of bit wise operators (>>,<<,&,|) etc

 I actually read the solution in terms of bit wise operators many weeks ago. I could not recall the solution.

This is not due as in for assignment or hw. Hence I alotted only few points. Take your time and hopefully provide a solution i am looking for.

Perhaps then you'd be interested in researching assembly square root solutions and convert them manually?  Here is one for z80 which has a similar feel to x86:
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.


I came across this website which might be closer to what you are looking for.

Please disregard my question if it is irrelevant, but are you sure you saw the biwise solution for N^2?
It is possible that you remember seeing the bitwise solution for checking whether the number is power of 2 - it would be indeed simple in bitwise terms:
  M is 2^N  if and only if  (M & (M-1)) equals zero (assuming N>0).
For N^2 I cannot remember anything simple (if I do, I'll let you know, of course).

there is a very easy to do it using mod... unfortunatly i cant quite remember it but if i do ill tell u

l8rz... suma
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   PAQ - no points refunded (of 50)

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
Question finalized per recommendation.

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.