Bitwise shr right

Create issue
Issue #844 resolved
Former user created an issue

W10 fully updated, v 0.12

Hi,

As installed, F6, binary output. Calculate 1/100. This give expected result. = 0b0.0000001010001111011 I wish now to "move the decimal point" six places to the right. shr(ans;6) gives compile error.

Comments (5)

  1. Tey'

    We should probably add a note in the manual indicating that bitwise functions only work on integers.

    As a workaround, shr/shl does the same as dividing/multiplying by a power of 2, so you can move the decimal point that way (ans * 2**6). And as @heldercorreia indicated, you should have used shl for what you want (but it only works on integers anyway).

  2. Log in to comment