While trying to make SHL and SHR to function, in order to add some elements to the documentation I noticed that the BITS operator has an issue: it is sending only one value out of two! So that if I send an encoder with a value of 15 to BITS/IN (which converts decimal to binary) I get a binary result of 0111 (7 in decimal). Basically all odd values are ignored at this stage, which I guess should be corrected.
Here is a patch reproducing it: bit_test.scn (256.1 KB)
The BIGNUM on top shows the decimal value, between 0 and 15, modified by ENC0.
The 4 bignums below show the 4 last bit. I added a MUL (2) so you can try it working as it should by modifying this:
013.Y/A -> 014.BITS/IN
into this:
013.Y/A -> 012.MUL/VAL (in case you want an accurate result for any scene you’d built now)
Then again, I was wondering about the SHL and SHR purpose, as they basically consist of multiplying and dividing by multiples of 2. Are they really useful (my only guess is if you want to dynamically change the number of bit to shift, in which case you’d have to use a LIST and a MUL or DIV), or should we just skip them if we need some space for BEES 0.8?