locked
how to get bit value..?? RRS feed

  • Question


  • in specific 8 bit register. how to get a value of 5th bit or any specific bit value.
    how to check it is 0 or 1 ??
    and how to change only specific bit value..??
    Thursday, September 27, 2007 5:33 AM

All replies


  • try masking with bit value..

    like for 5th bit finding...
    multiply register value with 00010000=0x10

    if u get o/p 0 then 5th bit is 0.
    if u get o/p 0x10 then 5th bit is 1.
    Thursday, September 27, 2007 10:56 AM