Shop OBEX P1 Docs P2 Docs Learn Events
Third Bit — Parallax Forums

Third Bit

LightfootLightfoot Posts: 228
edited 2007-06-25 01:54 in General Discussion
Is there a way I can evaluate a state for one bit in a byte.

Numerial = 55 '00110111 binary (lsb is first).

The third bit is high in this case and the code should return a 1.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • JonnyMacJonnyMac Posts: 9,215
    edited 2007-06-25 01:54
    In SX/B:

    IF someByte.2 = 1 THEN Do_Something
    



    In assembly:

    JB someByte.2, Do_Something
    

    Post Edited (JonnyMac) : 6/25/2007 2:14:42 AM GMT
Sign In or Register to comment.