Divide by 3
Will these serial inputs ever stop?
While going through your Grandma's old store, you come across an interesting machine which takes an
input x and gives an output whenever the number formed within the machine is divisible by 3. Being
intrigued with the machine, you start tinkering with it and realise that the machine serially takes
the input x and concatenates it to the least significant bit (LSB) position of the currently seen
inputs to form the new number.
Loading the interactive workspace...