Article View: es.comp.os.linux.programacion
Article #9513Re: Como acceder al bit x de un dato
From: Mario Teijeiro Otero
Date: Wed, 19 Jun 2002 13:26
Date: Wed, 19 Jun 2002 13:26
25 lines
1496 bytes
1496 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Angel wrote: > Suponiendo q tenemos un dato de n bytes, com podria acceder al bit x?? > en C o C++. > > ej: > > bool cual_es_el_valor_del_bit(n_bit); > > #define cual_es_el_valor_del_bit(w,b) (w & (1 <<b)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9EIaWMKsc+XeZcdwRAh2oAJ4ldJ0xSKPoQGPwCd/AcM15O5IpiwCeLwmC 9CxotHasWWvWNXXoOWsLuYM= =VbrW -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<mq0qea.f38.ln@cernicalo.escomposlinux.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!89.red-80-59-254.pooles.rima-tde.NET!not-for-mailReferences:
<aekvlb$81hpu$1@ID-148170.news.dfncis.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f86c8,8245fc4b08721416 X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-06-19 11:00:54 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!89.red-80-59-254.pooles.rima-tde.NET!not-for-mail From: Mario Teijeiro Otero <emeteo@escomposlinux.org> Newsgroups: es.comp.os.linux.programacion Subject: Re: Como acceder al bit x de un dato Date: Wed, 19 Jun 2002 15:26:42 +0200 Lines: 25 Message-ID: <mq0qea.f38.ln@cernicalo.escomposlinux.org> References: <aekvlb$81hpu$1@ID-148170.news.dfncis.de> NNTP-Posting-Host: 89.red-80-59-254.pooles.rima-tde.net (80.59.254.89) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1024509653 9353175 80.59.254.89 (16 [119866]) X-Orig-Path: cernicalo.escomposlinux.org!nobody User-Agent: KNode/0.7.1