r/factorio•
Tzvet005

Fastest binary adder in Factorio (Carry Lookahead Adder, 4 ticks only)

Design / Blueprint

​

https://preview.redd.it/3bkk4hxw10lb1.png?width=1194&format=png&auto=webp&s=ade99ef1edc18ffc8c3024522f1be125a0735db2

Hello everybody ! About 2 months ago I posted a video featuring my function curve displayer. But now I'm on my way to build a 16-bit RISC CPU from scratch in this wonderful, Turing-complete game !

What you see here is the adder I made for the ALU, it's a CLA (Carry Lookahead Adder, it basically predicts the carry of the nth bit by looking at the inputs of all previous bits and the carry input to speed up calculation and avoid the ripple effect of the RCA (Ripple Carry Adder). It's also the fastest adder, ignoring unrealistic adders that try all possible combinations for the outputs, which would theorically be faster, but cannot be put in practice since adding 64-bit numbers would require hundreds of thousands of gates. It is 16-bit (and therefore handles up to 65535, or from -32768 up to 32767 in signed notation). I made it the fastest possible, as it takes 4 ticks from input to output. In comparison, a RCA would take at least 32 ticks to process the same data (but it would be 20 times smaller).

On this picture, you can see it perform the addition 36646 + 23667 = 60313.

I'll maybe post similar content in the following months, with the blueprints when possible.

BLUEPRINT (on FactorioBin) : https://factoriobin.com/post/Z3_V8iDD

Posted Aug 29, 2023, 7:14 AM UTC

10
Loading comments…