Yes, Max’s integers are always signed. Moreover, shifting back and forth relies on not-so-safe assumptions about the size of integers (32-bit until max 6.0.x, 64-bit in Max 6.1 64 bits).
To retain the n less significant bits of an integer, you can use bitwise and 2ˆn-1 – in your case [& 7]. For positive numbers, modulo 2ˆn ([% 8]) will give you the same result.
Thanks – that’s actually what I’d been using, but apparently I shouldn’t be doing this stuff at 3am, as for some reason it was striking me as doing the wrong thing – just tested it out (connected it up), works as expected. Thanks!