fCPU


Factorio Customizable Processing Unit. Allow to write any logic on low level machine code. The fCPU acts like a programmable microcontroller with a vector coprocessor that supports many useful instructions.

Content
3 months ago
0.18 - 1.1
8.51K
Logistic network Circuit network

g how do the rotate instructions work exactly?

3 years ago

What's the difference between rotating left and right? And how does it select the axis around which to rotate it?

3 years ago

Rotation seems to constrain the register to a 32(31) bit value

Rotating left is equiv to shifting the bits left and wrapping around the remaining bits

0000 0000 0000 0000 0000 0000 0000 0001 = 1
1000 0000 0000 0000 0000 0000 0000 0000 = 2,147,483,648 (note it doesn't modify the sign bit)

rotating right shifts 1 to 2 billion
rotating left would make 1 equal to 2

hopefully that answers your question, feel free to jump in the discord if you need more info.

https://discord.gg/DNZeM5Fc

3 years ago
(updated 3 years ago)

This instructions is similar to x86 asm:
fCPU bsr = x86 shr
fCPU bsl = x86 shl
fCPU brr = x86 ror
fCPU brl = x86 rol

This thread has been locked.