-
Notifications
You must be signed in to change notification settings - Fork 2
Shifter
The Shifter can be used to increase or decrease the numerical values of the signal input from the back. The Shifter has a left-shift mode and a right-shift mode. In left-shift mode, a signal's value is effectively doubled (0b00_0010 (2)
is shifted to 0b00_0100 (4)
), and in right-shift mode, a signal's value is effectively halved (0b00_0010 (2)
is shifted to 0b00_0001 (1)
). If a bit is shifted off of the scale, like shifting 0b11_1111 (63)
either direction, the extra bit will be output to the side which the Shifter is moving towards. If you shift 0b11_1111 (63)
to the left, it would turn into 0b11_1110 (62)
with the left side ejecting 0b00_0001 (1)
, and if you shift 0b11_1111 (63)
to the right, it would turn into 0b01_1111 (31)
with the right side ejecting 0b00_0001 (1)
.