What are bit fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maheshgupta0248
    New Member
    • Oct 2008
    • 14

    What are bit fields

    Im a new bie in C, can anyone tell me what are bit fields.. where it is used..
  • oler1s
    Recognized Expert Contributor
    • Aug 2007
    • 671

    #2
    So what did your book or Google search tell you?

    Comment

    • maheshgupta0248
      New Member
      • Oct 2008
      • 14

      #3
      Originally posted by oler1s
      So what did your book or Google search tell you?
      Sorry for the delayed reply

      I had gone through Denis Ritche, and help from IBM website. But Im not able to understand how it is used in Real Time application

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        Originally posted by maheshgupta0248
        Im not able to understand how it is used in Real Time application
        The advantage of bit fields is that they can pack more information into a given amount of memory.
        The disadvantage of bit fields is that they typically take longer to access than the integer types unless the target processor has bit-resolution assembly instructions.

        Real-Time applications are generally willing to accept increased memory usage for faster execution

        Comment

        Working...