Due to my poor English, I definitely recommend you to watch this video with subtitles.
This video is a demonstration of the ALU built with trains and railway signals.
We can enter 3-bit numbers (there are plans to expand it to 7-bit), and the results, depending on the module, can be 4, 5, 6 and 8-bit.
Besides basic math operations like addition, subtraction, multiplication and division, we can use this ALU to calculate basic logic operations like AND, NAND, OR, NOR, NOT, XOR and NXOR.
Additionally, we can make shifts to the left or right (bits), normal or circular.
The entered numbers are compared in terms of the size of the entered numbers (including the sign of the number).
I do not explain in detail how it is done because such explanations require a lot of time which I do not have at present.
Abbreviations in the title mean:
ALU - Arithmetic Logic Unit
ULU - Universal Logic Unit
MC - Magnitude Comparator
ULS - Universal Logic Shifting Circuit
jewo GRFS currently has 72,853 views spread across 69 videos for OpenTTD. His channel currently has around 13 hours worth of content for OpenTTD, or 22.70% of the total watchable video on jewo GRFS's YouTube channel.