Shop OBEX P1 Docs P2 Docs Learn Events
REV Instruction — Parallax Forums

REV Instruction

scottascotta Posts: 168
edited 2008-06-21 21:21 in Propeller 1
Do I understand the REV instruction correctly:



Before the REV instruction I have:

value =%11111111_00000000_00000000_00000000


REV value,#0


After the REV instruction I would have:

value = %00000000_00000000_00000000_11111111


Scott

Comments

  • hippyhippy Posts: 1,981
    edited 2008-06-21 16:41
    That's correct. Without checking the manual I recall the number of bits reversed is (32-n) so that reverses all bits.
  • scottascotta Posts: 168
    edited 2008-06-21 21:21
    Thanks Hippy.

    I have to keep writing today, and my board is in the shop.

    Scott
Sign In or Register to comment.