Bits in integer-Wert

Daniel Feist <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
Hi Leute,
angenommen, wir hätten einen Integerwert, beispielsweise 'int i = 36;'
und wollen herausfinden, welche binären Bits gesetzt sind. 
Die Zahl 5 beispielsweise, sieht binär so aus: 0000000000000101 - also 
sind 2 Bits gesetzt. Kann mir da jemand weiterhelfen?

Vielen Dank schonmal im vorraus!


-- 
Daniel Feist <[email protected]>

-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.