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
22 days ago
0.18 - 2.0
10.2K
Logistic network Circuit network

g how do the rotate instructions work exactly?

4 years ago

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

4 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

4 years ago
(updated 4 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.