linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bitfields
@ 2004-12-01  4:25 Jagadeesh Bhaskar P
  2004-12-01 19:44 ` Bitfields HIToC
  0 siblings, 1 reply; 3+ messages in thread
From: Jagadeesh Bhaskar P @ 2004-12-01  4:25 UTC (permalink / raw)
  To: Linux C Programming

Hi all,
	What is a bitfield? How is it used in C??

TIA

-- 
With regards,

Jagadeesh Bhaskar P


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: Bitfields
@ 2004-12-01 10:59 Ronaldo Zacarias Afonso
  0 siblings, 0 replies; 3+ messages in thread
From: Ronaldo Zacarias Afonso @ 2004-12-01 10:59 UTC (permalink / raw)
  To: linux-c-programming

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 990 bytes --]

  Hi Jagadeesh, 

  "bit field" is a way that let you define a varible to be less than a byte 
in size. For example: 3 bits. 
  It is used as structs. 

struct nibble { 
     unsigned int n0: 4; 
     unsigned int n1: 4; 
     unsigned int n2: 4; 
     unsigned int n3: 4; 
}; 

  In this way you have declared four variables, each with a size of four 
bits. 





>Hi all, 
> What is a bitfield? How is it used in C?? 
> 
>TIA 
> 
>-- 
>With regards, 
> 
>Jagadeesh Bhaskar P 
> 
>- 
>To unsubscribe from this list: send the line "unsubscribe 
>linux-c-programming" in 
>the body of a message to majordomo@vger.kernel.org 
>More majordomo info at http://vger.kernel.org/majordomo-info.html 
> 
>---------- 

_________________________________________________________________________________
Quer mais velocidade?
Só com o acesso Aditivado iG, a velocidade que você quer na hora que você precisa.
Clique aqui: http://www.acessoaditivado.ig.com.br


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-01 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-01  4:25 Bitfields Jagadeesh Bhaskar P
2004-12-01 19:44 ` Bitfields HIToC
  -- strict thread matches above, loose matches on Subject: below --
2004-12-01 10:59 Bitfields Ronaldo Zacarias Afonso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).