Page 1 of 1

Who is the new combinator stuff epxlained?

Posted: Tue May 09, 2017 12:54 pm
by DOSorDIE
The combinator now have many new features like &, XOR, ...
But i have as a circuit beginner no idea what they make.
Where i can find information what they make?
A little example would also be nice.

EDIT:
More Info i have found here

Tutorial:Combinator Tutorial:
https://wiki.factorio.com/Tutorial:Combinator_Tutorial

Tutorial:Circuit-network Cookbook:
https://wiki.factorio.com/Tutorial:Circ ... k_Cookbook

But what i am ask is what make the game when he get no 0 or 1 ??? ... 7 as example.
Becausea ALL things i found are only with 1 as highest number.

Also found this:
Gate Description
NOT Inverts the input (HIGH becomes LOW, LOW becomes HIGH)
AND Outputs HIGH if all the inputs are HIGH; otherwise, outputs LOW
OR Outputs HIGH if at least one of the inputs is HIGH; otherwise, outputs LOW
NAND Outputs HIGH if all the inputs are LOW; otherwise, outputs LOW
NOR Outputs HIGH if at least one of the inputs is LOW; otherwise, outputs LOW
XOR Outputs HIGH if one, and only one, of the inputs is HIGH; otherwise, outputs LOW
NXOR Outputs HIGH if one, and only one, of the inputs is LOW; otherwise, outputs LOW

Re: Who is the new combinator stuff epxlained?

Posted: Tue May 09, 2017 7:42 pm
by Serenity
Boolean logic is pretty self-explanatory. Though I think these actually perform bitwise operations. So if you just use them with 0 and 1 they behave like logic gates. But you can also do bit manipulation on larger numbers by the looks of it. Like using XOR to flip bits. And in combination with the left shift operator set and clear bits.

The % operator is also new. That's a modulo division.

Re: Who is the new combinator stuff epxlained?

Posted: Thu May 11, 2017 8:24 am
by The Eriksonn
Dont forget << and >> for right and left bitshift:

a<<b = a*(2^b)

a>>b = a/(2^b)

may cause unexpected results if negative...

Re: Who is the new combinator stuff epxlained?

Posted: Thu May 11, 2017 10:49 am
by Serenity
But what i am ask is what make the game when he get no 0 or 1 ??? ... 7 as example.
Then it's a bitwise operation. Like the difference between & and && in C/C++. Just apply the logic operation to each bit of the number

For example:
1001
AND
0011
=
0001