From: Ronaldo Zacarias Afonso <r_zaca@ig.com.br>
To: linux-c-programming@vger.kernel.org
Subject: Re: Bitfields
Date: Wed, 1 Dec 2004 08:59:25 -0200 [thread overview]
Message-ID: <20041201_105925_044724.r_zaca@ig.com.br> (raw)
[-- 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
next reply other threads:[~2004-12-01 10:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-01 10:59 Ronaldo Zacarias Afonso [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-12-01 4:25 Bitfields Jagadeesh Bhaskar P
2004-12-01 19:44 ` Bitfields HIToC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041201_105925_044724.r_zaca@ig.com.br \
--to=r_zaca@ig.com.br \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).