Bit masking in C???

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • meghla
    New Member
    • Dec 2009
    • 7

    #1

    Bit masking in C???

    I can not understand how to implement bit masking on a c code?? while working with array it is taking too much time........... ....... so i need help.
    i need some suggestion and sample code of C dealing with bit masking........ ......; its argent......... .... plz help me.
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Take a look at this other recent bit masking thread.

    Comment

    • alexis4
      New Member
      • Dec 2009
      • 113

      #3
      None can "urgently" answer this question. There are maths behind it. Search google for binary logic and examples of bitwise operations. I then suggest to look for "NOT", "AND", "OR" and "XOR" operations and their truth tables. Then search how these are implemented in C (~, &, | and ^ respectively). Make a small demo program (no more than 10 lines) and test these operations. Use windows calculator for help, so that you can easily convert decimal to binary values. See if the values from these operations change according to the operator's truth table and that should be it!

      Comment

      Working...