From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18057 invoked by alias); 25 Apr 2002 04:44:05 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 18043 invoked from network); 25 Apr 2002 04:44:03 -0000 Received: from unknown (HELO hotmail.com) (64.4.37.84) by sources.redhat.com with SMTP; 25 Apr 2002 04:44:03 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 24 Apr 2002 21:44:03 -0700 Received: from 164.164.95.121 by pv2fd.pav2.hotmail.msn.com with HTTP; Thu, 25 Apr 2002 04:44:02 GMT X-Originating-IP: [164.164.95.121] From: "Preeti Aira" To: gcc-help@gcc.gnu.org, gcc@gcc.gnu.org Bcc: Subject: Number of 1's in 64 bit number...[don't read if not interested in algos/math...] Date: Wed, 24 Apr 2002 21:55:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 25 Apr 2002 04:44:03.0002 (UTC) FILETIME=[D2E7B9A0:01C1EC13] X-SW-Source: 2002-04/txt/msg01283.txt.bz2 Hello every body.. Can any body give me the algo for finding number of 1's (set bits) in a 64 bit number. Algo with out any loop or recurson. Should be a reasonably efficient and small and giving result in fixed time. have a nice time Pret. _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com