<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZeroKnight</id>
	<title>Official Factorio Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.factorio.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZeroKnight"/>
	<link rel="alternate" type="text/html" href="https://wiki.factorio.com/Special:Contributions/ZeroKnight"/>
	<updated>2026-04-23T09:22:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Power_production&amp;diff=176574</id>
		<title>Power production</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Power_production&amp;diff=176574"/>
		<updated>2019-10-12T07:15:40Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Added link to Steam page, as there weren&amp;#039;t any at all.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
Electricity has to be produced before it can be transferred to consumers over the [[electric system]]. There are multiple methods to produce electricity:&lt;br /&gt;
&lt;br /&gt;
== Steam engine power ==&lt;br /&gt;
Each [[steam engine]] needs 0.5 [[boiler]]s when running at full capacity. One [[offshore pump]] can supply 20 boilers and 40 steam engines.&lt;br /&gt;
&lt;br /&gt;
The above ratio can be calculated from information available in-game: One boiler consumes 1.8MW of fuel and produces energy stored in [[steam]] at 100% efficiency. One steam engine consumes 900kW of energy stored in steam, so each boiler can supply 2 steam engines: &amp;lt;code&amp;gt;1.8MW ÷ 0.9MW = 2&amp;lt;/code&amp;gt;. One steam engine consumes 30 steam per second, and one offshore pump produces 1200 water per second, so each offshore pump produces enough water to supply 40 steam engines: &amp;lt;code&amp;gt;1200 unit/s ÷ 30 units/s = 40&amp;lt;/code&amp;gt;. The number of boilers can be derived from the number of steam engines: &amp;lt;code&amp;gt;40 ÷ 2 = 20&amp;lt;/code&amp;gt;. This produces the 1:20:40 ratio.&lt;br /&gt;
&lt;br /&gt;
[[File:SteamSetupExample.png|center|600px|thumb|A possible setup]]&lt;br /&gt;
&lt;br /&gt;
== Solar panels and accumulators ==&lt;br /&gt;
&lt;br /&gt;
=== Optimal ratio ===&lt;br /&gt;
&lt;br /&gt;
The optimal ratio is 0.84 (21:25) [[accumulator]]s per [[solar panel]], and 23.8 solar panels per megawatt required by your factory (this ratio accounts for solar panels needed to charge the accumulators). This means that you need 1.428 MW of production (of solar panels) and 100MJ of storage to provide 1 MW of power over one day-night cycle.&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;close enough&amp;quot; ratio is 20:24:1 accumulators to solar panels to megawatts required (for example, a factory requiring 10 MW can be approximately entirely powered, day and night, by 200 accumulators and 240 solar panels - this approximation differs from optimal only in that it calls for 20 extra solar panels, which is negligible but remember that the difference between the &amp;quot;close enough&amp;quot; ratio and the optimal ratio increases as you add more solar panels). &lt;br /&gt;
&lt;br /&gt;
This is taken from [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=5594 Accumulator / Solar Panel Ratio] (which calculates this in an impressive mathematical way!) and [https://forums.factorio.com/viewtopic.php?p=143317#p143317 another post in that thread] (which calculates the solar panel to megawatt ratio in a different way).&lt;br /&gt;
[[File:9x9_accumulator_solar_panel_example.jpg|300px|thumb|top|A small 9x9 setup demonstrating the 20:24 &amp;quot;close enough&amp;quot; ratio above.]]&lt;br /&gt;
=== Calculations ===&lt;br /&gt;
&lt;br /&gt;
The optimal ratio of accumulators per solar panel relies on many values in the game. These include the power generation of a solar panel, the energy storage of an accumulator, the length of a [[day]], and the length of a night. There are also times between day and night called dusk and dawn which complicate the calculations. In vanilla factorio, without mods which change any of these values, the optimal ratio will be the same. This ratio is&lt;br /&gt;
&amp;lt;pre&amp;gt;Accumulators / Solar_panels =&lt;br /&gt;
    (day + dawn) × (night + dawn × (day + dawn) / game_day) / game_day&lt;br /&gt;
    × Solar_power / Accumulator_energy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which, given the default time lengths of: day = 12500/60 s; dawn or dusk = 5000/60 s; night = 2500/60 s, and the default: Solar_power = 60 kW; Accumulator_energy = 5 MJ = 5000 kJ, gives the optimal ratio of 0.84 accumulators per solar panel. If the player uses mods which change the power generation of solar panels, or the energy storage of accumulators, but &amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; the length of days, a simplified version of this equation can be used.&lt;br /&gt;
&amp;lt;pre&amp;gt;Accumulators / Solar_panels = 70 s × Solar_power / Accumulator_energy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation could also be used to remember the vanilla optimal ratio given its simplicity. If the only effect the mod has on the game is it changes the total length of one day, without changing the ratio of dusk : day : dawn : night, then the equation can be simplified as&lt;br /&gt;
&amp;lt;pre&amp;gt;Accumulators / Solar_panels = 0.002016 /s × game_day &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where game_day is the number of seconds in the game day which is 25000/60 s by default.&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=5168 Perfectly optimal solar network (Factorio forums)]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=5394 Solar ratios (Factorio forums)]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=5&amp;amp;t=7619 1 solar panel produces 42KW after factoring in the night (Factorio forums)]&lt;br /&gt;
&lt;br /&gt;
== Nuclear power ==&lt;br /&gt;
:&#039;&#039;See also: [[Tutorial:Nuclear power]]&#039;&#039;&lt;br /&gt;
In general, nuclear power is produced by the following production chain: [[Uranium ore]] is mined and [[Uranium processing|processed]] to [[uranium-235]] and [[uranium-238]], then [[uranium fuel cell]]s are created from the two. These fuel cells are then burned in a [[nuclear reactor]] to create heat. The heat can be used to convert [[water]] to [[steam]] using a [[heat exchanger]] and the steam can be consumed by [[steam turbine]]s to produce power.&lt;br /&gt;
&lt;br /&gt;
A reactor without neighbor bonus needs 4 heat exchangers so that all its heat gets consumed. For each 100% neighbor bonus, the reactor needs 4 more heat exchangers.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Ideal Ratio !! Simple Ratio !! Building&lt;br /&gt;
|-&lt;br /&gt;
| 25 || 1 ||{{imagelink|Offshore pump}}&lt;br /&gt;
|-&lt;br /&gt;
| 291 || 12 || {{imagelink|Heat exchanger}}&lt;br /&gt;
|-&lt;br /&gt;
| 500 || 20 || {{imagelink|Steam turbine}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Ensuring enough energy is produced ==&lt;br /&gt;
&lt;br /&gt;
Try this checklist before you completely revamp your power source. You may also use this to rectify [[Glossary#B|brownouts/blackouts]].&lt;br /&gt;
&lt;br /&gt;
* Did you connect the steam engine to the [[electric system]]? If not, a small yellow triangle will flash. To fix, Add some [[Small electric pole|power poles]] near the steam engines that go to machines needing that power. Any power pole will work.&lt;br /&gt;
* Is steam able to reach all steam engines?&lt;br /&gt;
* Do your pipes have water? Look at the windows in the pipes, hover over the pipes! Place some pipes or a tank at the end to see if there is really water coming through. If not, ensure all [[pipe]]s or [[Pipe to ground|underground pipes]] are connected together.&lt;br /&gt;
* Is the factory producing enough fuel (coal, solid fuel, uranium fuel cells)?&lt;br /&gt;
* Are there enough steam generators (boilers, heat exchangers)?&lt;br /&gt;
* Are there enough steam engines/turbines?&lt;br /&gt;
&lt;br /&gt;
See also the [[Tutorial:Applied_power_math|applied power math tutorial]] to answer the question &#039;&#039;how much coal do I need?&#039;&#039;&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176487</id>
		<title>Tutorial:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176487"/>
		<updated>2019-10-06T06:46:16Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Reduced over-use of bold, slight wording change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an &#039;&#039;&#039;advanced&#039;&#039;&#039; tutorial. Beginners should refer to the [[Tutorial:Circuit network cookbook]] for examples and the [[Circuit network]] page for an overview over the circuit network. This tutorial assumes a basic understanding of circuits and covers more advanced topics like SR latches, memory cells and clocks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Combinator logic is achieved by cross-connecting outputs to inputs in such a way to achieve the desired logic. While advanced logic requires a multitude of combinators, some very useful basic logic can be achieved using only a handful of combinators. Combinator logic works because Factorio only updates at &#039;&#039;&#039;60 times per second&#039;&#039;&#039;, such that combinators analyze their logic in a step, and then sum and/or decide the resulting output values on the next step.&lt;br /&gt;
&lt;br /&gt;
When logic values are computed by combinators, the outputs are not recognized by the circuit network until the following step. So when a [[decider combinator]] is used to detect a certain input condition, it&#039;s output value will not take effect on the circuit network until the next step. &#039;&#039;&#039;This behavior is important to remember and can result in sequencing errors and significant delays when multiple combinators are connected in series.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Circuit wires act like a wire bus in electronics; it carries information in the connected wires, meaning that if there are similar signals on a wire it will add them automatically. If the signal is different, it will be carried in that wire as well, but as a different signal.&lt;br /&gt;
&lt;br /&gt;
When cross-connecting combinators, it is good practice to use the unused color to cross-connect, this will split the input and output networks and prevent unwanted inputs from accidentally connecting to a larger circuit network. Combinators will sum the red and green inputs prior to calculation, so either color can be used when wiring the output back to the input. In in most cases howver, it is more useful to use the opposing color of the wire so that it will not interfere with the resulting output and input.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
&lt;br /&gt;
[[File:Virtual Signals dialog box.png|thumb|right|Virtual Signals available for use in the circuit network]]&lt;br /&gt;
&lt;br /&gt;
In addition to the standard item signals, Factorio&#039;s circuit network also includes a set of signals that do not represent any particular game item. Instead, these virtual signals serve as user-definable channels for the circuit network; they hold whatever meaning the user wants them to. There are currently 48 virtual signals that can be sent over the circuit network:&lt;br /&gt;
&lt;br /&gt;
* The 36 alphanumeric characters (A-Z, 0-9)&lt;br /&gt;
* Nine colors: red, green, blue, yellow, magenta, cyan, white, grey, and black&lt;br /&gt;
* Three icons: a check mark, an informational letter &#039;i&#039;, and a small, white dot&lt;br /&gt;
&lt;br /&gt;
=== Logic signals ===&lt;br /&gt;
&lt;br /&gt;
There are three additional virtual signals known as &#039;&#039;logic signals&#039;&#039;. Unlike other signals, they cannot be sent over the circuit network; instead, they apply additional logic to combinators that modify their behavior. Specifically, these logic symbols act as wildcards, which are special signals that represent &#039;&#039;&#039;zero or more&#039;&#039;&#039; arbitrary signals instead of representing a single discrete signal.  Factorio&#039;s circuit network implements three types of wildcards.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything wildcard&amp;lt;/span&amp;gt; [[File:everything_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Everything&#039;&#039; wildcard is used with decider combinators. Its exact behavior depends on whether it is used as an input or an output:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039;: Returns true if &#039;&#039;all&#039;&#039; input signals pass the condition, or if there are &#039;&#039;no&#039;&#039; input signals, otherwise it returns false.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039;: Returns &#039;&#039;all&#039;&#039; non-zero input signals.&lt;br /&gt;
&lt;br /&gt;
When used as an input, the &#039;&#039;everything&#039;&#039; wildcard can be thought of as a logical AND, or a [[:Wikipedia:universal quantification|universal quantifier]]. When used as an output, it acts as an &#039;echo&#039; or &#039;dump&#039; of input signals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Can be used as an output as long as the input is not an &#039;&#039;each&#039;&#039; wildcard.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything wildcard&amp;lt;/span&amp;gt; [[File:anything_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Anything&#039;&#039; wildcard is also used with decider combinators, but only as an input.&lt;br /&gt;
&lt;br /&gt;
Given &#039;&#039;&#039;at least one&#039;&#039;&#039; input signal, it returns true if &#039;&#039;any&#039;&#039; input signal passes the condition. If no signal passes the condition, or there are no input signals, then it returns false. From this behavior, the &#039;&#039;anything&#039;&#039; wildcard can be thought of as a logical OR, or an [[:Wikipedia:existential quantification|existential quantifier]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each wildcard&amp;lt;/span&amp;gt; [[File:each_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is used with both decider combinators and [[arithmetic combinator]]s, and behaves somewhat uniquely compared to the previous two. Generally speaking, it performs a combinator action on each signal &#039;&#039;&#039;individually&#039;&#039;&#039;, with the exact action depending on how it is used, and the type of combinator it is used in. It can be used as an input, and it can be used as an output, but &#039;&#039;only when it is used as input as well&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In a &#039;&#039;&#039;decider combinator&#039;&#039;&#039;, when used as an input, the &#039;&#039;each&#039;&#039; wildcard individually compares each input signal against the combinator condition, returning each signal that passes the condition. The manner that the &#039;&#039;each&#039;&#039; wildcard returns signals when used as input depends on whether or not it is also used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: Sums each input signal that passed the condition, and depending on output settings returns either a count of the passed signals or a summation of their values as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Returns each signal that passed the condition, their values depending on the output settings.&lt;br /&gt;
&lt;br /&gt;
In an &#039;&#039;&#039;arithmetic combinator&#039;&#039;&#039;, the designated arithmetic operation is applied individually to each input signal, and similar to the decider combinator, the signal that is returned depends on whether or not the &#039;&#039;each&#039;&#039; wildcard is used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: The result of each operation on the input signals is summed and returned as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Each input signal is returned with the result of the specified operation applied to it.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is therefore notably more complex than the other two wildcards, but offers a good deal of power in exchange for its complexity.&lt;br /&gt;
&lt;br /&gt;
== Input insulator &amp;amp; gate ==&lt;br /&gt;
An arithmetic combinator set to (In: Each + 0, Out: Each) can be used to swap wire colors and as an insulator to prevent downstream logic from backfeeding into the circuit network&#039;s inputs.&lt;br /&gt;
&lt;br /&gt;
A decider combinator set to (Out: Everything, Input-&amp;gt; Output) will also function as an insulator as long as the set logic condition is true. This can also selectively pass or &#039;gate&#039; inputs only when desired. This could be used to sequentially poll remote train stations for their chest contents, and include only desired stations.&lt;br /&gt;
&lt;br /&gt;
== Set/Reset latching switch ==&lt;br /&gt;
You want something to SET a trigger at some quantity, but then STAY on until that quantity hits some other value, the RESET value. You&#039;ll need one decider combinator and one arithmetic combinator. Two decider combinators and a [[constant combinator]] can also be used for more complex multi-channel conditions.&lt;br /&gt;
&lt;br /&gt;
Setup the first decider combinator to the desired set conditional and to output a 1. Then connect the output to the input of an arithmetic combinator, and configure it to multiply by the bias value, the difference between the set and reset values, and wire the arithmetic output to the input of the decider. The arithmetic output channel MUST be set the same as the decider&#039;s input channel. That&#039;s it! Whenever your set conditional is reached, the decider will output a &#039;1&#039;, and the bias of the arithmetic combinator will be applied. This will &#039;hold&#039; the output true until the value goes back below the reset point.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a more specific example, I want the pump to run when petrol reach 2000, and turn off when reach 200: &lt;br /&gt;
* Tank -&amp;gt; in decider&lt;br /&gt;
* out decider -&amp;gt; in arithmetic&lt;br /&gt;
* out arithmetic -&amp;gt; in decider&lt;br /&gt;
* green wire from in decider, to pump&lt;br /&gt;
&lt;br /&gt;
Pump has the same condition as the decider (Petrol &amp;gt; 2000)&lt;br /&gt;
&lt;br /&gt;
* Decider: Petrol &amp;gt; 2000&lt;br /&gt;
* out: A = 1&lt;br /&gt;
* Arithmetic: A × 1800 (2000 - 200)&lt;br /&gt;
* out: petrol&lt;br /&gt;
[[File:Factorio combinator switch.png|620px]]&lt;br /&gt;
&lt;br /&gt;
Backup steam power example with detailed configuration and explanation can be found here:&amp;lt;br /&amp;gt;[[Tutorial:Circuit network cookbook#SR_latch_-_single_decider_version|Tutorial:Circuit-network_Cookbook#SR latch - single decider version]]&lt;br /&gt;
&lt;br /&gt;
== Smart train loading ==&lt;br /&gt;
This solves the problem of loading logistics into chests, which tend to be unequal and is slower in the rate of loading logistics into the cargo of trains.&lt;br /&gt;
&lt;br /&gt;
To setup the design, you require an Arithmetic Combinator, as well as Red and Green wires. &#039;&#039;&#039;Wire all the chests used, to the input of the Arithmetic Combinator&#039;&#039;&#039;. &#039;&#039;&#039;Then write (Logistics Item / -Amount of chests) and as the output as the Logistics Item in the Arithmetic Combinator&#039;&#039;&#039;, this will average the amount of items within the chests. Lastly, &#039;&#039;&#039;wire all the inserters used to the output of the Arithmetic Combinator and have the other color of the wire be wired to the adjacent chest&#039;&#039;&#039;. &#039;&#039;&#039;Have the inserters enabled when Logistics Item &amp;lt; 1&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A more visual representation as well as questions about the design can be found in a reddit post: [https://www.reddit.com/r/factorio/comments/4e03g2/madzuris_smart_loading_train_station_guide/ MadZuri&#039;s smart loading train station].&lt;br /&gt;
&lt;br /&gt;
Explanation of why this works:&lt;br /&gt;
It compares the average amount of total items within the chests and the chest adjacent to the inserter so that it activates when the average number of items is higher than the amount within the chest.&lt;br /&gt;
The reason for why the division denominator is negative is because if the items in the chests are 0, it basically makes it so that it adds 1 to the equation.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
How to store a constant value for later use, either for a basic counter or for more advanced logic. A decider combinator wired output tied to input and configured greater than zero (for positive values), input -&amp;gt; output will &#039;hold&#039; a value, as long as all other inputs on the network are zero.&lt;br /&gt;
&lt;br /&gt;
Any non-zero input condition will create a basic clock; incrementing the stored value by the sum of all connected input values every cycle. A single pulse of an input will cause a single increment by the pulsed value. Reset to zero occurs whenever the set condition is no longer met, or if a negative pulse equal to the input occurs.&lt;br /&gt;
&lt;br /&gt;
== Basic clocks ==&lt;br /&gt;
[[File:Timer.png|thumb|right|377px|A basic clock. 30 ticks is the ceiling for Signal 1; which is continuously added.]]&lt;br /&gt;
Clocks are constructed by having the output of a combinator tied back to its own input, such that every cycle advances its own count. Either the arithmetic combinator or the decider combinator can be used.&lt;br /&gt;
&lt;br /&gt;
An arithmetic combinator tied to itself is fun to watch and will happily run-away, but requires additional control logic to reset.&lt;br /&gt;
&lt;br /&gt;
A self-resetting clock requires just a single decider combinator with output wired to input and configured with Less Than (&amp;lt;) and Input -&amp;gt; Output. When a constant combinator is then connected to the input, every cycle it will count up by the value of the Constant Combinator until the set conditional value is reached, then output a zero which will be summed with the constant combinator, and reset the process.&lt;br /&gt;
&lt;br /&gt;
The clock sequence will not include zero, will begin at the value set by the constant combinator, and will include whatever value eventually causes the conditional to be false. An arithmetic combinator can modify the clock sequence but remember its outputs will occur one cycle later than the clock cycle values.&lt;br /&gt;
&lt;br /&gt;
A clock that only counts once can be built using the following setup:&lt;br /&gt;
&lt;br /&gt;
[[File:Onetime_Clock.png|thumb|none|360px|One-time clock. Runs until T=Z+1. Reset via R&amp;gt;0.]]&lt;br /&gt;
&lt;br /&gt;
== Pulse generators ==&lt;br /&gt;
&lt;br /&gt;
Connecting an additional (=) decider combinator to the output of a basic clock will create a pulse generator, and will pulse a single output every time the clock cycles through the set condition. Any output value can be used, either directly from the clock sequence (input-&amp;gt;output), a 1, or some value on a separate logic channel on the circuit network, such as set by a constant combinator. or by the circuit network.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PulseGen.png|500px]]&lt;br /&gt;
*&#039;&#039;The value 1 can be written as any positive integer, so long as it is within the cap or ceiling of your timer.&#039;&#039;&lt;br /&gt;
*&#039;&#039;As an example from the above timer, this light will pulse every 1st tick after the timer reaches 30 ticks, making it pulse 1/30th of a second, as Factorio updates at 60 times per second.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Counter ==&lt;br /&gt;
A counter is used to count the number of input events, and output the sum of that count. Any pulsing input into a decider combinator configured input -&amp;gt; output and wired between output and input will create a counter, but this input must be zero at all other times or else the combinator will run away like a clock. A pulse generator is normally used to accomplish this. Combining several gating decider isolators set with sequential conditionals, a clock, and a pulse generator to the input of a counter will allow remote polling and counting of each isolator&#039;s contents.&lt;br /&gt;
&lt;br /&gt;
== Logic gates ==&lt;br /&gt;
&lt;br /&gt;
Some logic gates will only function with boolean values, where the inputs are either 0 or 1.&lt;br /&gt;
Other logic gates will work with other values as well, e.g. 2.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Built In&#039;&#039;&#039;===&lt;br /&gt;
The arithmetic combinator has built in OR, XOR and AND operators.&lt;br /&gt;
These operate bitwise, i.e. they perform the operation on each bit in the number in a binary format and return the result.&lt;br /&gt;
&lt;br /&gt;
An example for the bitwise AND operator:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 4  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 3  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 30  || 10&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 40  || 8&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
If your inputs only consist of boolean values (1 or 0) the arithmetic combinator&#039;s operators can be used as logic gates.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Unary NOT&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOT.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary OR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:OR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOR.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XOR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 1!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note: This only works for boolean inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:AND.png|530px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The arithmetic combinator example provided works for non-boolean values, and will return non-boolean values when given them as input, but only if both values are non 0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The decider combinator example provided only works for boolean values. It can be modified to have any number of inputs by changing the &amp;quot;1&amp;quot; shown to 1 less than the number of inputs, or the &amp;quot;2&amp;quot; shown to the number of inputs, as demonstrated below for a Ternary AND.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Ternary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:TrinaryAND.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Input 3!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NAND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values. It can be modified to have any number of inputs by changing the &amp;quot;2&amp;quot; shown to the number of inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XNOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Memory cells ==&lt;br /&gt;
&lt;br /&gt;
=== Simple latch ===&lt;br /&gt;
&lt;br /&gt;
When looping the combinator to itself, use a different color of wire from your main inputs or outputs. &lt;br /&gt;
&lt;br /&gt;
[[File:SimpleLatchv2.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Output 1!!Input 1!!Input 2!! Output 1 (t+1)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 0 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&#039;&#039;Output 1 is the green wire loop seen in the picture, it carries the value to latch.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input 1 is Set, while Input 2 is Reset.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positive cell ===&lt;br /&gt;
&lt;br /&gt;
Cell for storing a positive value, with reset support:&lt;br /&gt;
&lt;br /&gt;
[[File:AdvancedMemoryCell.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Connect the desired value as signal 3 on the right side to set the memory cell and connect a negative value as signal 3 to reset the cell.  *Please note the arithmetic combinator&#039;s output should be facing the opposite direction of the decider combinators.&lt;br /&gt;
&lt;br /&gt;
This particular cell design does not work properly on a one-tick burst of input. Input must be held for at least 2 ticks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address Enable Switch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positives and negatives cell ===&lt;br /&gt;
&lt;br /&gt;
This cell can store negatives or positives. Reset is done on a dedicated line. Additionally, a 1-tick burst is handled properly. [https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=60330&amp;amp;p=362377#p362377 Forum post].&lt;br /&gt;
&lt;br /&gt;
* The output M (memory) is the last non-zero input I (Input).&lt;br /&gt;
* A non zero R (reset) signal sets the output to zero.&lt;br /&gt;
* 1-tick bursts of R or I are handled properly.&lt;br /&gt;
* Negatives are handled properly.&lt;br /&gt;
&lt;br /&gt;
[[File:Memory_cell_with_negatives.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=14556 Combinators 101 (Tutorial)]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Talk:Circuit_network&amp;diff=176486</id>
		<title>Talk:Circuit network</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Talk:Circuit_network&amp;diff=176486"/>
		<updated>2019-10-06T06:23:22Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: /* Virtual signals image */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== First Image on Page ==&lt;br /&gt;
&lt;br /&gt;
The first image on the page  of the &amp;lt;q&amp;gt;interior of a circuit cable&amp;lt;/q&amp;gt; seems, well, unhelpful at best. I&#039;m relatively new to wikis, so I&#039;m not sure that I should change it, but wouldn&#039;t this wiki benefit from something more... relevant? This page could also lead to confusion for new players who are lead to believe that one can somehow access the &amp;quot;interior&amp;quot; or a circuit cable in game. Anyone agree? --[[User:DreamConspiracy|DreamConspiracy]] ([[User talk:DreamConspiracy|talk]]) 13:18, 7 March 2019 (UTC)&lt;br /&gt;
: Agreed, changed. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 19:44, 7 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Separate column for item icon in devices section ==&lt;br /&gt;
&lt;br /&gt;
In the sections on devices, the icon and item name share the same column. On my screen this results in one line with the icon and one part of the name, and then on the next line underneath the icon the remainder of the name. (Only for long names of course) I think it&#039;s better to make the item name continue with the same indent as the start of the name. So either a separate column, or something fancy with floating images that don&#039;t break text flow. [[User:TheWombatGuru|TheWombatGuru]] ([[User talk:TheWombatGuru|talk]]) 19:57, 7 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Virtual signals image ==&lt;br /&gt;
&lt;br /&gt;
Hi, I recently added [[:File:Virtual Signals dialog box.png]] for use in [[Tutorial:Combinator tutorial#Virtual signals]]. I figured it would be useful on this page as well, though I&#039;m not sure if it&#039;s size and position are the best. Is it okay as-is, or is there a better way to lay out the two images? --[[User:ZeroKnight|ZeroKnight]] ([[User talk:ZeroKnight|talk]]) 06:23, 6 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=176485</id>
		<title>Circuit network</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Circuit_network&amp;diff=176485"/>
		<updated>2019-10-06T06:13:21Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Add image showing all virtual signals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&#039;&#039;&#039;Circuit networks&#039;&#039;&#039; are built using [[Red wire|red]] or [[green wire]], and enable the control of receivers, based upon information broadcast onto the network by connected senders.  Most senders are storage devices, and broadcast their information onto a specific channel, based on the item or liquid the storage device contains.  Each circuit network contains a channel for every kind of item, as well as 48 extra [[#Virtual signals|virtual signals]] which act as user-definable channels. &#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;, &#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039; and &#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039; are also available wildcards.&lt;br /&gt;
&lt;br /&gt;
[[File:shared_circuit_network.png|thumb|600px|right|Two circuit networks shared over one electric pole.]] &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
=== Send information ===&lt;br /&gt;
Senders broadcast the amount of items or fluids they contain or other data definable by the player. Each amount is broadcast as a numeric value on a &#039;channel&#039; corresponding to the item.  For example, a Storage Tank containing 1000 Crude Oil will broadcast 1000 on the Crude Oil channel.&lt;br /&gt;
&lt;br /&gt;
The channels are separated from each other, so each network can simultaneously carry a number for each item and fluid in the game, and for each of the extra user-defined channels (digits 0-9, letters A-Z, and 9 different colors). All unused channels have the value zero.&lt;br /&gt;
&lt;br /&gt;
Multiple broadcasts of the same item or fluid are additive: If there are two connected Storage Tanks with 1000 Crude Oil each, the value of the Crude Oil channel within the network will be 2000.&lt;br /&gt;
&lt;br /&gt;
All wires of the same color which are connected together by junctions form a network, i.e. they will pass their signals to each other.  For example, if two red wires are connected to the same combinator input, each wire receives the content from the other.  This can result in feedback if care is not taken; see Feedback (under [[#Combinators|arithmetic combinator]], below) for discussion.&lt;br /&gt;
&lt;br /&gt;
Numbers are in the signed 32 bit integer range, i.e. from -2147483648 to 2147483647 inclusive, and are encoded in [https://en.wikipedia.org/wiki/Two%27s_complement two&#039;s complement representation]. The numbers wrap around on overflow, so e.g. 2147483647 + 10 becomes -2147483639.&lt;br /&gt;
&lt;br /&gt;
=== Control devices ===&lt;br /&gt;
Receivers can use broadcast information, in most cases to enable/disable the device. They can either compare results between different channels, or compare a channel to a specific value.&lt;br /&gt;
&lt;br /&gt;
Receiving devices sum all signals from each wire connected to them, even red and green wires. For example, if an inserter is connected to a red wire carrying a signal for 20 iron plates, a green wire with 10 copper plates and another green wire with 5 iron plates, the input signal set for that receiver will be 25 iron plates and 10 copper plates.&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
Each device that is able to be connected to a circuit network has a [[File:Circuit network panel.png]] icon located in the top right corner of its info pane. Clicking this icon will display the available circuit network options for that device (note: a red or green wire must be connected, otherwise the message &amp;quot;not connected&amp;quot; will display instead). Clicking the [[File:Logistic network panel.png]] icon next to it, the device can be connected to a logistic network if in range of one, which also allows conditions to be set.&lt;br /&gt;
&lt;br /&gt;
Conditions can be set for both circuit (signals of red and green wires are summed) and logistic network, which will together act as a logical AND.&lt;br /&gt;
&lt;br /&gt;
The following devices can be connected to a circuit network:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable mw-collapsible&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Device !! Possible output signals !! Possible control options&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Transport belt|Transport belts}} || Transport belts can send their content to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item enters the belt.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the items are on the belt.&lt;br /&gt;
|| Transport belts can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Inserter|Inserters}} || All inserters can send their held items to the circuit network.&lt;br /&gt;
*&#039;&#039;Pulse mode&#039;&#039;: The signal is sent for only 1 tick when the item is picked up.&lt;br /&gt;
*&#039;&#039;Hold mode&#039;&#039;: The signal is sent continuously as long as the inserter is holding the item. &lt;br /&gt;
|| All inserters can be enabled on a condition. The inserter stack size can also be overridden from a control signal (configurable).&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Filter inserter}} || Same as above. || The filter inserters can additionally set their filters from the circuit network.&lt;br /&gt;
|-&lt;br /&gt;
| {{Imagelink|Wooden chest|Chests}} || All chests can send their contents to the circuit network. Logistic chests additionally send their contents to the [[logistic network]]. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Requester chest}} || Same as above. || Its requested items can be set by the circuit network.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Storage tank}} || The storage tank can send its fluid content to the circuit network. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Gate}} || Gates can send a signal to the circuit network. || Gates can be opened on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Rail signal}} || Rail signals can send their state to the circuit network. || Rail signals can be set to red on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Train stop}} || Train stations can send the contents of a stopped train to the circuit network as well as read a unique train identifier code. || Train stations can send the contents of the circuit network to the train to use it for wait conditions, as well as enable/disable the stop itself.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Accumulator}} || It can send its charge level in percent to the circuit network. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Roboport}} || It can send its logistic network contents or its robot statistics to the circuit network. The signals used for robot statistics are configurable. ||&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Burner mining drill}} || It can send the expected resources, either from the drill itself or from the whole ore patch the drill is on. || It can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Electric mining drill}} || It can send the expected resources, either from the drill itself or from the whole ore patch the drill is on. || It can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Pumpjack}} || It can output the current oil mining rate. || It can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Power switch}} || || Power switches can connect power networks on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Programmable speaker}} || || Shows alerts and plays sounds based on circuit network signals. It can be used to make simple tunes.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Lamp}} || || The lamp can be enabled on a condition. If it receives color signals, it can set the given color.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Offshore pump}} || || The offshore pump can be enabled on a condition.&lt;br /&gt;
|-&lt;br /&gt;
| {{imagelink|Pump}} || || The pump can be enabled on a condition.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Physical network structure ==&lt;br /&gt;
A circuit network consists only of those devices connected together with the same color wire. Wire can be strung directly from device to device, or across any intervening power poles. Wire length is limited by its previous connection.&lt;br /&gt;
&lt;br /&gt;
Note that each connected set of wires forms a separate network.  For example, it&#039;s entirely possible to have four red-wire networks and three green-wire networks. If red and green wires happen to touch the same power pole or device, the red and green networks will remain separate and will not link up. However, two red cables or two green cables will link if they touch. Use different colored cables to separate networks in close proximity.&lt;br /&gt;
&lt;br /&gt;
* To connect wires or cables to a power pole, simply click on one entity, then on the base of the power pole.&lt;br /&gt;
* To erase a wire or cable connection, place the same color wire over an existing connection. You don&#039;t get the wire/cable back.&lt;br /&gt;
* To remove &#039;&#039;&#039;all&#039;&#039;&#039; connections from a power pole, shift-click on the pole.  The first shift-click will remove all electrical connections, and the second will remove all red and green wires. You don&#039;t get the wires back.&lt;br /&gt;
* When connecting to a [[arithmetic combinator]] or [[decider combinator]], take care to connect the wire to the correct input or output side. Use &amp;quot;Show details&amp;quot; mode to see the orientation of the combinator.&lt;br /&gt;
* Hovering the mouse cursor over an item will highlight all wires which connect to the item.&lt;br /&gt;
* Hovering the mouse cursor over a power pole which is part of a network will display the signals on its network. Some items like combinators will also display their input and output signals when hovered over.&lt;br /&gt;
&lt;br /&gt;
== Combinators ==&lt;br /&gt;
Combinators can function as both receiving and sending devices and allow more advanced functions to be used on a circuit network.&lt;br /&gt;
&lt;br /&gt;
*The [[constant combinator]] broadcasts up to 15 values on any of the channels for whatever networks it is connected to.  (You cannot currently specify whether a value should be on the red or green channel; if you need different values, use two combinators, one for each color wire.)  You can use any item channel or any of the [[#Virtual signals|virtual signal]] channels.&lt;br /&gt;
**Note that using two of the 15 slots to broadcast values on the &#039;&#039;&#039;same&#039;&#039;&#039; channel is the same as broadcasting the sum of the two values from one slot.&lt;br /&gt;
*The [[arithmetic combinator]] performs arithmetic operations on input values and broadcasts the result to the specified output channel.  The input and output channels can be any item channel or any of the virtual signal channels.&lt;br /&gt;
** Connecting: The arithmetic combinator connects to a red or green network on its &#039;&#039;&#039;input&#039;&#039;&#039; side (the terminals are set into the main body and look like spark plugs) and performs an arithmetic calculation which is broadcast into the specified channel on its &#039;&#039;&#039;output&#039;&#039;&#039; side (the output wires appear to stretch out a bit from the body of the device). &lt;br /&gt;
** Feedback: Note that the input network and the output network &#039;&#039;&#039;are not the same network&#039;&#039;&#039;.  Connecting the output network back to the input network will result in a feedback loop.  For example, adding 1 to the value for copper plates and broadcasting it as copper plates is an action that results in an infinite loop if output is connected back to input.  The value for copper plates will rapidly (but not instantly) shoot upward. (The rate at which it climbs is determined by the current tick rate.) This technique can be combined with decider combinator logic to make electronic clocks, gates, and other systems; see [[Combinator Tutorial]] for advanced techniques.&lt;br /&gt;
** Each:  This combinator can use the &#039;Each&#039; signal for both input and output, in which case &#039;&#039;&#039;all&#039;&#039;&#039; non-zero input channels will have the combinator&#039;s operation performed and broadcast on the output side.  Having Each signals for input and output and using a non-changing operation (like adding zero) is equivalent to having a &#039;one-way&#039; wire; all the information from the input network is copied to the output network, but the reverse is not true.&lt;br /&gt;
**Multi-network: The arithmetic combinator can be joined to both red and green networks on the input side and will sum their inputs.&lt;br /&gt;
*The [[decider combinator]] functions much like an arithmetic combinator, but is designed to compare values. Essentially, it is a conditional. In terms of connecting, feedback, and the Each signal it functions as specified above.  In addition, it can handle the Everything and Anything signals, and performs more complex functions than summing when attached to multiple networks.  See the [[decider combinator]] page for more details on how to use this.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals == &lt;br /&gt;
[[File:Virtual Signals dialog box.png|thumb|Virtual Signals available for use in the circuit network]]&lt;br /&gt;
Virtual signals are special non-item signals. Other than the three logic signals, virtual signals do not behave differently from item signals.&lt;br /&gt;
&lt;br /&gt;
48 virtual signals can be sent over a network. They include the digits zero through nine, the letters A through Z, a check-mark, dot and info icon, and the colors red, green, blue, yellow, magenta, cyan, white, gray and black.&lt;br /&gt;
&lt;br /&gt;
=== Logic signals ===&lt;br /&gt;
[[File:logic_signals.png|300px|thumb|The icons of the three logic signals]]&lt;br /&gt;
Three of the virtual signals cannot be sent over a network but apply special logic to multiple signals.&lt;br /&gt;
&lt;br /&gt;
==== Everything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side in conditionals. The condition will be true when the condition is true for each input signal. The condition is also true if there are no signals. This means that the &#039;&#039;everything&#039;&#039; signal behaves as [[:Wikipedia:universal quantification|universal quantification]].&lt;br /&gt;
&lt;br /&gt;
The output of a [[decider combinator]] may also use &#039;&#039;everything&#039;&#039;, unless the input is set to &#039;&#039;each&#039;&#039;. When used, the combinator will output signal on every channel with non-zero input as long as the condition is true; the value will either be the input value or 1, depending on the corresponding setting.&lt;br /&gt;
&lt;br /&gt;
==== Anything ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything&amp;lt;/span&amp;gt;&#039;&#039; can be used on the left side of conditions. The condition will be true when the condition is true for at least one signal. This means the &#039;&#039;anything&#039;&#039; signal behaves as [[:Wikipedia:existential quantification|existential quantification]].&lt;br /&gt;
&lt;br /&gt;
==== Each ====&lt;br /&gt;
&#039;&#039;&amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each&amp;lt;/span&amp;gt;&#039;&#039; can only be used in left input side and output of [[decider combinator|decider]] and [[arithmetic combinator|arithmetic]] combinators. The signal can only be used as an output when also used as an input. When used in both the input and output, it makes a combinator perform its action on each input signal individually. The combinator will output the sum of each of the actions if only used in the input.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
*&#039;&#039;&#039;[[Circuit-network Cookbook]]&#039;&#039;&#039; - &#039;&#039;Example-heavy tutorials; for beginners who want to get to know and use the benefits of the circuit network.&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;[[Combinator Tutorial]]&#039;&#039;&#039; - &#039;&#039;Mainly textual and detailed tutorials.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Logistic network ==&lt;br /&gt;
The logistic network used by [[logistic robot]]s is essentially a third network (a wireless one), along with the green and red wired networks. The logistic network is based on proximity to a central [[roboport]].&lt;br /&gt;
&lt;br /&gt;
Some devices can also be connected to the logistic network. If a device has conditions set for circuit and for logistic network, it will become activated if both conditions are true.&lt;br /&gt;
&lt;br /&gt;
See the [[logistic network]] and [[roboport]] articles for more information.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
{{history|0.15.0|&lt;br /&gt;
* Significantly improved circuit network performance. Up to 25 times less CPU usage and 10% less memory usage.&lt;br /&gt;
* Added the Programmable Speaker: it shows alerts and plays sounds based on circuit network signals. It can be used to make simple songs.&lt;br /&gt;
* Train Stop can output the contents of the stopped train&#039;s cargo.&lt;br /&gt;
* Train Stop can be disabled using the circuit network. Trains will skip disabled Train Stops, allowing simple train control.&lt;br /&gt;
* Mining Drills can be turned on and off using the circuit network. They can also output the remaining expected resources.&lt;br /&gt;
* Pumpjacks can be turned on and off using the circuit network. They can also output the current oil mining rate.&lt;br /&gt;
* Added Modulo, Power, Left Bit Shift, Right Bit Shift, Bitwise AND, Bitwise OR and Bitwise XOR to the Arithmetic Combinator.&lt;br /&gt;
* Added additional operators to the Decider Combinator and Circuit Conditions.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.13.0|&lt;br /&gt;
* Many machines are now connectible to the circuit network.&lt;br /&gt;
* Wire disconnecting is incorporated into the latency hiding.&lt;br /&gt;
* Wires are now highlighted on entity mouseover.&lt;br /&gt;
* Reduced memory usage of circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.33|&lt;br /&gt;
* Fluid values are rounded to the closest value instead of rounding down when transmitted to circuit network.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.1|&lt;br /&gt;
* One can copy paste circuit network conditions between the [[inserter]], [[lamp]], [[pump]] and [[offshore pump]]. }}&lt;br /&gt;
&lt;br /&gt;
{{history|0.12.0|&lt;br /&gt;
* Improvements to circuit network connection, one can connect multiple wires of the same color to the same entity.&lt;br /&gt;
* The [[lamp]], [[storage tank]], [[pump]] and [[offshore pump]] can be connected to the circuit network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.10.0|&lt;br /&gt;
* [[Blueprint]]s copy circuit network connections.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.8.3|&lt;br /&gt;
* Circuit network contents info has colored slots to specify the network it represents.}}&lt;br /&gt;
&lt;br /&gt;
{{history|0.1.0|&lt;br /&gt;
* Introduced}}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Circuit network (research)]]&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=6&amp;amp;t=4728&amp;amp;p=37251#p37157 Logic gates revisited]&lt;br /&gt;
&lt;br /&gt;
[[Category: Circuit network]]&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176484</id>
		<title>Tutorial:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176484"/>
		<updated>2019-10-06T06:02:54Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Added explanation and image for virtual signals; created explicit subsection for logic signals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an &#039;&#039;&#039;advanced&#039;&#039;&#039; tutorial. Beginners should refer to the [[Tutorial:Circuit network cookbook]] for examples and the [[Circuit network]] page for an overview over the circuit network. This tutorial assumes a basic understanding of circuits and covers more advanced topics like SR latches, memory cells and clocks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Combinator logic is achieved by cross-connecting outputs to inputs in such a way to achieve the desired logic. While advanced logic requires a multitude of combinators, some very useful basic logic can be achieved using only a handful of combinators. &#039;&#039;&#039;Combinator logic works because Factorio only updates at 60 times per second, such that combinators analyze their logic in a step, and then sum and/or decide the resulting output values on the next step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When logic values are computed by combinators, the outputs are not recognized by the circuit network until the following step. So when a [[decider combinator]] is used to detect a certain input condition, it&#039;s output value will not take effect on the circuit network until the next step. &#039;&#039;&#039;This behavior is important to remember and can result in sequencing errors and significant delays when multiple combinators are connected in series.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Circuit wires act like a wire bus in electronics, it carries information in the connected wires, meaning that &#039;&#039;&#039;if there are similar signals on a wire, it will add them automatically, unless if it is a different signal, that means it will be carried in that wire as well, but as a different signal.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When cross-connecting combinators &#039;&#039;&#039;it&#039;s good practice to use the unused color to cross-connect, this will split the input and output networks and prevent unwanted inputs from accidentally connecting to a larger circuit network.&#039;&#039;&#039; Combinators will sum the red &amp;amp;/or green inputs prior to calculation, so either color can be used when wiring the output back to the input, but in most cases, it is more useful to use the opposing color of the wire so that it will not interfere with the resulting output and input.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
&lt;br /&gt;
[[File:Virtual Signals dialog box.png|thumb|right|Virtual Signals available for use in the circuit network]]&lt;br /&gt;
&lt;br /&gt;
In addition to the standard item signals, Factorio&#039;s circuit network also includes a set of signals that do not represent any particular game item. Instead, these virtual signals serve as user-definable channels for the circuit network; they hold whatever meaning the user wants them to. There are currently 48 virtual signals that can be sent over the circuit network:&lt;br /&gt;
&lt;br /&gt;
* The 36 alphanumeric characters (A-Z, 0-9)&lt;br /&gt;
* Nine colors: red, green, blue, yellow, magenta, cyan, white, grey, and black&lt;br /&gt;
* Three icons: a check mark, an informational letter &#039;i&#039;, and a small, white dot&lt;br /&gt;
&lt;br /&gt;
=== Logic signals ===&lt;br /&gt;
&lt;br /&gt;
There are three additional virtual signals known as &#039;&#039;logic signals&#039;&#039;. Unlike other signals, they cannot be sent over the circuit network; instead, they apply additional logic to combinators that modify their behavior. Specifically, these logic symbols act as wildcards, which are special signals that represent &#039;&#039;&#039;zero or more&#039;&#039;&#039; arbitrary signals instead of representing a single discrete signal.  Factorio&#039;s circuit network implements three types of wildcards.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything wildcard&amp;lt;/span&amp;gt; [[File:everything_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Everything&#039;&#039; wildcard is used with decider combinators. Its exact behavior depends on whether it is used as an input or an output:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039;: Returns true if &#039;&#039;all&#039;&#039; input signals pass the condition, or if there are &#039;&#039;no&#039;&#039; input signals, otherwise it returns false.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039;: Returns &#039;&#039;all&#039;&#039; non-zero input signals.&lt;br /&gt;
&lt;br /&gt;
When used as an input, the &#039;&#039;everything&#039;&#039; wildcard can be thought of as a logical AND, or a [[:Wikipedia:universal quantification|universal quantifier]]. When used as an output, it acts as an &#039;echo&#039; or &#039;dump&#039; of input signals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Can be used as an output as long as the input is not an &#039;&#039;each&#039;&#039; wildcard.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything wildcard&amp;lt;/span&amp;gt; [[File:anything_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Anything&#039;&#039; wildcard is also used with decider combinators, but only as an input.&lt;br /&gt;
&lt;br /&gt;
Given &#039;&#039;&#039;at least one&#039;&#039;&#039; input signal, it returns true if &#039;&#039;any&#039;&#039; input signal passes the condition. If no signal passes the condition, or there are no input signals, then it returns false. From this behavior, the &#039;&#039;anything&#039;&#039; wildcard can be thought of as a logical OR, or an [[:Wikipedia:existential quantification|existential quantifier]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each wildcard&amp;lt;/span&amp;gt; [[File:each_logic_icon.png|left|20px]] ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is used with both decider combinators and [[arithmetic combinator]]s, and behaves somewhat uniquely compared to the previous two. Generally speaking, it performs a combinator action on each signal &#039;&#039;&#039;individually&#039;&#039;&#039;, with the exact action depending on how it is used, and the type of combinator it is used in. It can be used as an input, and it can be used as an output, but &#039;&#039;only when it is used as input as well&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In a &#039;&#039;&#039;decider combinator&#039;&#039;&#039;, when used as an input, the &#039;&#039;each&#039;&#039; wildcard individually compares each input signal against the combinator condition, returning each signal that passes the condition. The manner that the &#039;&#039;each&#039;&#039; wildcard returns signals when used as input depends on whether or not it is also used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: Sums each input signal that passed the condition, and depending on output settings returns either a count of the passed signals or a summation of their values as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Returns each signal that passed the condition, their values depending on the output settings.&lt;br /&gt;
&lt;br /&gt;
In an &#039;&#039;&#039;arithmetic combinator&#039;&#039;&#039;, the designated arithmetic operation is applied individually to each input signal, and similar to the decider combinator, the signal that is returned depends on whether or not the &#039;&#039;each&#039;&#039; wildcard is used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: The result of each operation on the input signals is summed and returned as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Each input signal is returned with the result of the specified operation applied to it.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is therefore notably more complex than the other two wildcards, but offers a good deal of power in exchange for its complexity.&lt;br /&gt;
&lt;br /&gt;
== Input insulator &amp;amp; gate ==&lt;br /&gt;
An arithmetic combinator set to (In: Each + 0, Out: Each) can be used to swap wire colors and as an insulator to prevent downstream logic from backfeeding into the circuit network&#039;s inputs.&lt;br /&gt;
&lt;br /&gt;
A decider combinator set to (Out: Everything, Input-&amp;gt; Output) will also function as an insulator as long as the set logic condition is true. This can also selectively pass or &#039;gate&#039; inputs only when desired. This could be used to sequentially poll remote train stations for their chest contents, and include only desired stations.&lt;br /&gt;
&lt;br /&gt;
== Set/Reset latching switch ==&lt;br /&gt;
You want something to SET a trigger at some quantity, but then STAY on until that quantity hits some other value, the RESET value. You&#039;ll need one decider combinator and one arithmetic combinator. Two decider combinators and a [[constant combinator]] can also be used for more complex multi-channel conditions.&lt;br /&gt;
&lt;br /&gt;
Setup the first decider combinator to the desired set conditional and to output a 1. Then connect the output to the input of an arithmetic combinator, and configure it to multiply by the bias value, the difference between the set and reset values, and wire the arithmetic output to the input of the decider. The arithmetic output channel MUST be set the same as the decider&#039;s input channel. That&#039;s it! Whenever your set conditional is reached, the decider will output a &#039;1&#039;, and the bias of the arithmetic combinator will be applied. This will &#039;hold&#039; the output true until the value goes back below the reset point.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a more specific example, I want the pump to run when petrol reach 2000, and turn off when reach 200: &lt;br /&gt;
* Tank -&amp;gt; in decider&lt;br /&gt;
* out decider -&amp;gt; in arithmetic&lt;br /&gt;
* out arithmetic -&amp;gt; in decider&lt;br /&gt;
* green wire from in decider, to pump&lt;br /&gt;
&lt;br /&gt;
Pump has the same condition as the decider (Petrol &amp;gt; 2000)&lt;br /&gt;
&lt;br /&gt;
* Decider: Petrol &amp;gt; 2000&lt;br /&gt;
* out: A = 1&lt;br /&gt;
* Arithmetic: A × 1800 (2000 - 200)&lt;br /&gt;
* out: petrol&lt;br /&gt;
[[File:Factorio combinator switch.png|620px]]&lt;br /&gt;
&lt;br /&gt;
Backup steam power example with detailed configuration and explanation can be found here:&amp;lt;br /&amp;gt;[[Tutorial:Circuit network cookbook#SR_latch_-_single_decider_version|Tutorial:Circuit-network_Cookbook#SR latch - single decider version]]&lt;br /&gt;
&lt;br /&gt;
== Smart train loading ==&lt;br /&gt;
This solves the problem of loading logistics into chests, which tend to be unequal and is slower in the rate of loading logistics into the cargo of trains.&lt;br /&gt;
&lt;br /&gt;
To setup the design, you require an Arithmetic Combinator, as well as Red and Green wires. &#039;&#039;&#039;Wire all the chests used, to the input of the Arithmetic Combinator&#039;&#039;&#039;. &#039;&#039;&#039;Then write (Logistics Item / -Amount of chests) and as the output as the Logistics Item in the Arithmetic Combinator&#039;&#039;&#039;, this will average the amount of items within the chests. Lastly, &#039;&#039;&#039;wire all the inserters used to the output of the Arithmetic Combinator and have the other color of the wire be wired to the adjacent chest&#039;&#039;&#039;. &#039;&#039;&#039;Have the inserters enabled when Logistics Item &amp;lt; 1&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A more visual representation as well as questions about the design can be found in a reddit post: [https://www.reddit.com/r/factorio/comments/4e03g2/madzuris_smart_loading_train_station_guide/ MadZuri&#039;s smart loading train station].&lt;br /&gt;
&lt;br /&gt;
Explanation of why this works:&lt;br /&gt;
It compares the average amount of total items within the chests and the chest adjacent to the inserter so that it activates when the average number of items is higher than the amount within the chest.&lt;br /&gt;
The reason for why the division denominator is negative is because if the items in the chests are 0, it basically makes it so that it adds 1 to the equation.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
How to store a constant value for later use, either for a basic counter or for more advanced logic. A decider combinator wired output tied to input and configured greater than zero (for positive values), input -&amp;gt; output will &#039;hold&#039; a value, as long as all other inputs on the network are zero.&lt;br /&gt;
&lt;br /&gt;
Any non-zero input condition will create a basic clock; incrementing the stored value by the sum of all connected input values every cycle. A single pulse of an input will cause a single increment by the pulsed value. Reset to zero occurs whenever the set condition is no longer met, or if a negative pulse equal to the input occurs.&lt;br /&gt;
&lt;br /&gt;
== Basic clocks ==&lt;br /&gt;
[[File:Timer.png|thumb|right|377px|A basic clock. 30 ticks is the ceiling for Signal 1; which is continuously added.]]&lt;br /&gt;
Clocks are constructed by having the output of a combinator tied back to its own input, such that every cycle advances its own count. Either the arithmetic combinator or the decider combinator can be used.&lt;br /&gt;
&lt;br /&gt;
An arithmetic combinator tied to itself is fun to watch and will happily run-away, but requires additional control logic to reset.&lt;br /&gt;
&lt;br /&gt;
A self-resetting clock requires just a single decider combinator with output wired to input and configured with Less Than (&amp;lt;) and Input -&amp;gt; Output. When a constant combinator is then connected to the input, every cycle it will count up by the value of the Constant Combinator until the set conditional value is reached, then output a zero which will be summed with the constant combinator, and reset the process.&lt;br /&gt;
&lt;br /&gt;
The clock sequence will not include zero, will begin at the value set by the constant combinator, and will include whatever value eventually causes the conditional to be false. An arithmetic combinator can modify the clock sequence but remember its outputs will occur one cycle later than the clock cycle values.&lt;br /&gt;
&lt;br /&gt;
A clock that only counts once can be built using the following setup:&lt;br /&gt;
&lt;br /&gt;
[[File:Onetime_Clock.png|thumb|none|360px|One-time clock. Runs until T=Z+1. Reset via R&amp;gt;0.]]&lt;br /&gt;
&lt;br /&gt;
== Pulse generators ==&lt;br /&gt;
&lt;br /&gt;
Connecting an additional (=) decider combinator to the output of a basic clock will create a pulse generator, and will pulse a single output every time the clock cycles through the set condition. Any output value can be used, either directly from the clock sequence (input-&amp;gt;output), a 1, or some value on a separate logic channel on the circuit network, such as set by a constant combinator. or by the circuit network.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PulseGen.png|500px]]&lt;br /&gt;
*&#039;&#039;The value 1 can be written as any positive integer, so long as it is within the cap or ceiling of your timer.&#039;&#039;&lt;br /&gt;
*&#039;&#039;As an example from the above timer, this light will pulse every 1st tick after the timer reaches 30 ticks, making it pulse 1/30th of a second, as Factorio updates at 60 times per second.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Counter ==&lt;br /&gt;
A counter is used to count the number of input events, and output the sum of that count. Any pulsing input into a decider combinator configured input -&amp;gt; output and wired between output and input will create a counter, but this input must be zero at all other times or else the combinator will run away like a clock. A pulse generator is normally used to accomplish this. Combining several gating decider isolators set with sequential conditionals, a clock, and a pulse generator to the input of a counter will allow remote polling and counting of each isolator&#039;s contents.&lt;br /&gt;
&lt;br /&gt;
== Logic gates ==&lt;br /&gt;
&lt;br /&gt;
Some logic gates will only function with boolean values, where the inputs are either 0 or 1.&lt;br /&gt;
Other logic gates will work with other values as well, e.g. 2.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Built In&#039;&#039;&#039;===&lt;br /&gt;
The arithmetic combinator has built in OR, XOR and AND operators.&lt;br /&gt;
These operate bitwise, i.e. they perform the operation on each bit in the number in a binary format and return the result.&lt;br /&gt;
&lt;br /&gt;
An example for the bitwise AND operator:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 4  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 3  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 30  || 10&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 40  || 8&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
If your inputs only consist of boolean values (1 or 0) the arithmetic combinator&#039;s operators can be used as logic gates.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Unary NOT&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOT.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary OR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:OR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOR.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XOR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 1!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note: This only works for boolean inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:AND.png|530px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The arithmetic combinator example provided works for non-boolean values, and will return non-boolean values when given them as input, but only if both values are non 0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The decider combinator example provided only works for boolean values. It can be modified to have any number of inputs by changing the &amp;quot;1&amp;quot; shown to 1 less than the number of inputs, or the &amp;quot;2&amp;quot; shown to the number of inputs, as demonstrated below for a Ternary AND.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Ternary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:TrinaryAND.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Input 3!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NAND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values. It can be modified to have any number of inputs by changing the &amp;quot;2&amp;quot; shown to the number of inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XNOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Memory cells ==&lt;br /&gt;
&lt;br /&gt;
=== Simple latch ===&lt;br /&gt;
&lt;br /&gt;
When looping the combinator to itself, use a different color of wire from your main inputs or outputs. &lt;br /&gt;
&lt;br /&gt;
[[File:SimpleLatchv2.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Output 1!!Input 1!!Input 2!! Output 1 (t+1)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 0 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&#039;&#039;Output 1 is the green wire loop seen in the picture, it carries the value to latch.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input 1 is Set, while Input 2 is Reset.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positive cell ===&lt;br /&gt;
&lt;br /&gt;
Cell for storing a positive value, with reset support:&lt;br /&gt;
&lt;br /&gt;
[[File:AdvancedMemoryCell.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Connect the desired value as signal 3 on the right side to set the memory cell and connect a negative value as signal 3 to reset the cell.  *Please note the arithmetic combinator&#039;s output should be facing the opposite direction of the decider combinators.&lt;br /&gt;
&lt;br /&gt;
This particular cell design does not work properly on a one-tick burst of input. Input must be held for at least 2 ticks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address Enable Switch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positives and negatives cell ===&lt;br /&gt;
&lt;br /&gt;
This cell can store negatives or positives. Reset is done on a dedicated line. Additionally, a 1-tick burst is handled properly. [https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=60330&amp;amp;p=362377#p362377 Forum post].&lt;br /&gt;
&lt;br /&gt;
* The output M (memory) is the last non-zero input I (Input).&lt;br /&gt;
* A non zero R (reset) signal sets the output to zero.&lt;br /&gt;
* 1-tick bursts of R or I are handled properly.&lt;br /&gt;
* Negatives are handled properly.&lt;br /&gt;
&lt;br /&gt;
[[File:Memory_cell_with_negatives.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=14556 Combinators 101 (Tutorial)]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=File:Virtual_Signals_dialog_box.png&amp;diff=176483</id>
		<title>File:Virtual Signals dialog box.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=File:Virtual_Signals_dialog_box.png&amp;diff=176483"/>
		<updated>2019-10-06T05:31:45Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: The virtual signals available for use in the circuit network, shown in the signal selection dialog of a decider combinator.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
The virtual signals available for use in the [[circuit network]], shown in the signal selection dialog of a [[decider combinator]].&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176481</id>
		<title>Tutorial:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176481"/>
		<updated>2019-10-05T01:30:51Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Changed some wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an &#039;&#039;&#039;advanced&#039;&#039;&#039; tutorial. Beginners should refer to the [[Tutorial:Circuit network cookbook]] for examples and the [[Circuit network]] page for an overview over the circuit network. This tutorial assumes a basic understanding of circuits and covers more advanced topics like SR latches, memory cells and clocks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Combinator logic is achieved by cross-connecting outputs to inputs in such a way to achieve the desired logic. While advanced logic requires a multitude of combinators, some very useful basic logic can be achieved using only a handful of combinators. &#039;&#039;&#039;Combinator logic works because Factorio only updates at 60 times per second, such that combinators analyze their logic in a step, and then sum and/or decide the resulting output values on the next step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When logic values are computed by combinators, the outputs are not recognized by the circuit network until the following step. So when a [[decider combinator]] is used to detect a certain input condition, it&#039;s output value will not take effect on the circuit network until the next step. &#039;&#039;&#039;This behavior is important to remember and can result in sequencing errors and significant delays when multiple combinators are connected in series.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Circuit wires act like a wire bus in electronics, it carries information in the connected wires, meaning that &#039;&#039;&#039;if there are similar signals on a wire, it will add them automatically, unless if it is a different signal, that means it will be carried in that wire as well, but as a different signal.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When cross-connecting combinators &#039;&#039;&#039;it&#039;s good practice to use the unused color to cross-connect, this will split the input and output networks and prevent unwanted inputs from accidentally connecting to a larger circuit network.&#039;&#039;&#039; Combinators will sum the red &amp;amp;/or green inputs prior to calculation, so either color can be used when wiring the output back to the input, but in most cases, it is more useful to use the opposing color of the wire so that it will not interfere with the resulting output and input.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
&lt;br /&gt;
Wildcards are special signals that represent &#039;&#039;&#039;zero or more&#039;&#039;&#039; arbitrary signals instead of representing a single discrete signal. Unlike other signals, they cannot be sent over the circuit network; instead, they apply additional logic to combinators which modifies their behavior. Factorio&#039;s circuit network implements three types of wildcards.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything wildcard&amp;lt;/span&amp;gt; [[File:everything_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Everything&#039;&#039; wildcard is used with decider combinators. Its exact behavior depends on whether it is used as an input or an output:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039;: Returns true if &#039;&#039;all&#039;&#039; input signals pass the condition, or if there are &#039;&#039;no&#039;&#039; input signals, otherwise it returns false.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039;: Returns &#039;&#039;all&#039;&#039; non-zero input signals.&lt;br /&gt;
&lt;br /&gt;
When used as an input, the &#039;&#039;everything&#039;&#039; wildcard can be thought of as a logical AND, or a [[:Wikipedia:universal quantification|universal quantifier]]. When used as an output, it acts as an &#039;echo&#039; or &#039;dump&#039; of input signals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Can be used as an output as long as the input is not an &#039;&#039;each&#039;&#039; wildcard.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything wildcard&amp;lt;/span&amp;gt; [[File:anything_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Anything&#039;&#039; wildcard is also used with decider combinators, but only as an input.&lt;br /&gt;
&lt;br /&gt;
Given &#039;&#039;&#039;at least one&#039;&#039;&#039; input signal, it returns true if &#039;&#039;any&#039;&#039; input signal passes the condition. If no signal passes the condition, or there are no input signals, then it returns false. From this behavior, the &#039;&#039;anything&#039;&#039; wildcard can be thought of as a logical OR, or an [[:Wikipedia:existential quantification|existential quantifier]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each wildcard&amp;lt;/span&amp;gt; [[File:each_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is used with both decider combinators and [[arithmetic combinator]]s, and behaves somewhat uniquely compared to the previous two. Generally speaking, it performs a combinator action on each signal &#039;&#039;&#039;individually&#039;&#039;&#039;, with the exact action depending on how it is used, and the type of combinator it is used in. It can be used as an input, and it can be used as an output, but &#039;&#039;only when it is used as input as well&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In a &#039;&#039;&#039;decider combinator&#039;&#039;&#039;, when used as an input, the &#039;&#039;each&#039;&#039; wildcard individually compares each input signal against the combinator condition, returning each signal that passes the condition. The manner that the &#039;&#039;each&#039;&#039; wildcard returns signals when used as input depends on whether or not it is also used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: Sums each input signal that passed the condition, and depending on output settings returns either a count of the passed signals or a summation of their values as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Returns each signal that passed the condition, their values depending on the output settings.&lt;br /&gt;
&lt;br /&gt;
In an &#039;&#039;&#039;arithmetic combinator&#039;&#039;&#039;, the designated arithmetic operation is applied individually to each input signal, and similar to the decider combinator, the signal that is returned depends on whether or not the &#039;&#039;each&#039;&#039; wildcard is used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: The result of each operation on the input signals is summed and returned as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Each input signal is returned with the result of the specified operation applied to it.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is therefore notably more complex than the other two wildcards, but offers a good deal of power in exchange for its complexity.&lt;br /&gt;
&lt;br /&gt;
== Input insulator &amp;amp; gate ==&lt;br /&gt;
An arithmetic combinator set to (In: Each + 0, Out: Each) can be used to swap wire colors and as an insulator to prevent downstream logic from backfeeding into the circuit network&#039;s inputs.&lt;br /&gt;
&lt;br /&gt;
A decider combinator set to (Out: Everything, Input-&amp;gt; Output) will also function as an insulator as long as the set logic condition is true. This can also selectively pass or &#039;gate&#039; inputs only when desired. This could be used to sequentially poll remote train stations for their chest contents, and include only desired stations.&lt;br /&gt;
&lt;br /&gt;
== Set/Reset latching switch ==&lt;br /&gt;
You want something to SET a trigger at some quantity, but then STAY on until that quantity hits some other value, the RESET value. You&#039;ll need one decider combinator and one arithmetic combinator. Two decider combinators and a [[constant combinator]] can also be used for more complex multi-channel conditions.&lt;br /&gt;
&lt;br /&gt;
Setup the first decider combinator to the desired set conditional and to output a 1. Then connect the output to the input of an arithmetic combinator, and configure it to multiply by the bias value, the difference between the set and reset values, and wire the arithmetic output to the input of the decider. The arithmetic output channel MUST be set the same as the decider&#039;s input channel. That&#039;s it! Whenever your set conditional is reached, the decider will output a &#039;1&#039;, and the bias of the arithmetic combinator will be applied. This will &#039;hold&#039; the output true until the value goes back below the reset point.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a more specific example, I want the pump to run when petrol reach 2000, and turn off when reach 200: &lt;br /&gt;
* Tank -&amp;gt; in decider&lt;br /&gt;
* out decider -&amp;gt; in arithmetic&lt;br /&gt;
* out arithmetic -&amp;gt; in decider&lt;br /&gt;
* green wire from in decider, to pump&lt;br /&gt;
&lt;br /&gt;
Pump has the same condition as the decider (Petrol &amp;gt; 2000)&lt;br /&gt;
&lt;br /&gt;
* Decider: Petrol &amp;gt; 2000&lt;br /&gt;
* out: A = 1&lt;br /&gt;
* Arithmetic: A × 1800 (2000 - 200)&lt;br /&gt;
* out: petrol&lt;br /&gt;
[[File:Factorio combinator switch.png|620px]]&lt;br /&gt;
&lt;br /&gt;
Backup steam power example with detailed configuration and explanation can be found here:&amp;lt;br /&amp;gt;[[Tutorial:Circuit network cookbook#SR_latch_-_single_decider_version|Tutorial:Circuit-network_Cookbook#SR latch - single decider version]]&lt;br /&gt;
&lt;br /&gt;
== Smart train loading ==&lt;br /&gt;
This solves the problem of loading logistics into chests, which tend to be unequal and is slower in the rate of loading logistics into the cargo of trains.&lt;br /&gt;
&lt;br /&gt;
To setup the design, you require an Arithmetic Combinator, as well as Red and Green wires. &#039;&#039;&#039;Wire all the chests used, to the input of the Arithmetic Combinator&#039;&#039;&#039;. &#039;&#039;&#039;Then write (Logistics Item / -Amount of chests) and as the output as the Logistics Item in the Arithmetic Combinator&#039;&#039;&#039;, this will average the amount of items within the chests. Lastly, &#039;&#039;&#039;wire all the inserters used to the output of the Arithmetic Combinator and have the other color of the wire be wired to the adjacent chest&#039;&#039;&#039;. &#039;&#039;&#039;Have the inserters enabled when Logistics Item &amp;lt; 1&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A more visual representation as well as questions about the design can be found in a reddit post: [https://www.reddit.com/r/factorio/comments/4e03g2/madzuris_smart_loading_train_station_guide/ MadZuri&#039;s smart loading train station].&lt;br /&gt;
&lt;br /&gt;
Explanation of why this works:&lt;br /&gt;
It compares the average amount of total items within the chests and the chest adjacent to the inserter so that it activates when the average number of items is higher than the amount within the chest.&lt;br /&gt;
The reason for why the division denominator is negative is because if the items in the chests are 0, it basically makes it so that it adds 1 to the equation.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
How to store a constant value for later use, either for a basic counter or for more advanced logic. A decider combinator wired output tied to input and configured greater than zero (for positive values), input -&amp;gt; output will &#039;hold&#039; a value, as long as all other inputs on the network are zero.&lt;br /&gt;
&lt;br /&gt;
Any non-zero input condition will create a basic clock; incrementing the stored value by the sum of all connected input values every cycle. A single pulse of an input will cause a single increment by the pulsed value. Reset to zero occurs whenever the set condition is no longer met, or if a negative pulse equal to the input occurs.&lt;br /&gt;
&lt;br /&gt;
== Basic clocks ==&lt;br /&gt;
[[File:Timer.png|thumb|right|377px|A basic clock. 30 ticks is the ceiling for Signal 1; which is continuously added.]]&lt;br /&gt;
Clocks are constructed by having the output of a combinator tied back to its own input, such that every cycle advances its own count. Either the arithmetic combinator or the decider combinator can be used.&lt;br /&gt;
&lt;br /&gt;
An arithmetic combinator tied to itself is fun to watch and will happily run-away, but requires additional control logic to reset.&lt;br /&gt;
&lt;br /&gt;
A self-resetting clock requires just a single decider combinator with output wired to input and configured with Less Than (&amp;lt;) and Input -&amp;gt; Output. When a constant combinator is then connected to the input, every cycle it will count up by the value of the Constant Combinator until the set conditional value is reached, then output a zero which will be summed with the constant combinator, and reset the process.&lt;br /&gt;
&lt;br /&gt;
The clock sequence will not include zero, will begin at the value set by the constant combinator, and will include whatever value eventually causes the conditional to be false. An arithmetic combinator can modify the clock sequence but remember its outputs will occur one cycle later than the clock cycle values.&lt;br /&gt;
&lt;br /&gt;
A clock that only counts once can be built using the following setup:&lt;br /&gt;
&lt;br /&gt;
[[File:Onetime_Clock.png|thumb|none|360px|One-time clock. Runs until T=Z+1. Reset via R&amp;gt;0.]]&lt;br /&gt;
&lt;br /&gt;
== Pulse generators ==&lt;br /&gt;
&lt;br /&gt;
Connecting an additional (=) decider combinator to the output of a basic clock will create a pulse generator, and will pulse a single output every time the clock cycles through the set condition. Any output value can be used, either directly from the clock sequence (input-&amp;gt;output), a 1, or some value on a separate logic channel on the circuit network, such as set by a constant combinator. or by the circuit network.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PulseGen.png|500px]]&lt;br /&gt;
*&#039;&#039;The value 1 can be written as any positive integer, so long as it is within the cap or ceiling of your timer.&#039;&#039;&lt;br /&gt;
*&#039;&#039;As an example from the above timer, this light will pulse every 1st tick after the timer reaches 30 ticks, making it pulse 1/30th of a second, as Factorio updates at 60 times per second.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Counter ==&lt;br /&gt;
A counter is used to count the number of input events, and output the sum of that count. Any pulsing input into a decider combinator configured input -&amp;gt; output and wired between output and input will create a counter, but this input must be zero at all other times or else the combinator will run away like a clock. A pulse generator is normally used to accomplish this. Combining several gating decider isolators set with sequential conditionals, a clock, and a pulse generator to the input of a counter will allow remote polling and counting of each isolator&#039;s contents.&lt;br /&gt;
&lt;br /&gt;
== Logic gates ==&lt;br /&gt;
&lt;br /&gt;
Some logic gates will only function with boolean values, where the inputs are either 0 or 1.&lt;br /&gt;
Other logic gates will work with other values as well, e.g. 2.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Built In&#039;&#039;&#039;===&lt;br /&gt;
The arithmetic combinator has built in OR, XOR and AND operators.&lt;br /&gt;
These operate bitwise, i.e. they perform the operation on each bit in the number in a binary format and return the result.&lt;br /&gt;
&lt;br /&gt;
An example for the bitwise AND operator:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 4  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 3  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 30  || 10&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 40  || 8&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
If your inputs only consist of boolean values (1 or 0) the arithmetic combinator&#039;s operators can be used as logic gates.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Unary NOT&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOT.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary OR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:OR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOR.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XOR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 1!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note: This only works for boolean inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:AND.png|530px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The arithmetic combinator example provided works for non-boolean values, and will return non-boolean values when given them as input, but only if both values are non 0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The decider combinator example provided only works for boolean values. It can be modified to have any number of inputs by changing the &amp;quot;1&amp;quot; shown to 1 less than the number of inputs, or the &amp;quot;2&amp;quot; shown to the number of inputs, as demonstrated below for a Ternary AND.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Ternary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:TrinaryAND.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Input 3!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NAND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values. It can be modified to have any number of inputs by changing the &amp;quot;2&amp;quot; shown to the number of inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XNOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Memory cells ==&lt;br /&gt;
&lt;br /&gt;
=== Simple latch ===&lt;br /&gt;
&lt;br /&gt;
When looping the combinator to itself, use a different color of wire from your main inputs or outputs. &lt;br /&gt;
&lt;br /&gt;
[[File:SimpleLatchv2.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Output 1!!Input 1!!Input 2!! Output 1 (t+1)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 0 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&#039;&#039;Output 1 is the green wire loop seen in the picture, it carries the value to latch.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input 1 is Set, while Input 2 is Reset.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positive cell ===&lt;br /&gt;
&lt;br /&gt;
Cell for storing a positive value, with reset support:&lt;br /&gt;
&lt;br /&gt;
[[File:AdvancedMemoryCell.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Connect the desired value as signal 3 on the right side to set the memory cell and connect a negative value as signal 3 to reset the cell.  *Please note the arithmetic combinator&#039;s output should be facing the opposite direction of the decider combinators.&lt;br /&gt;
&lt;br /&gt;
This particular cell design does not work properly on a one-tick burst of input. Input must be held for at least 2 ticks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address Enable Switch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positives and negatives cell ===&lt;br /&gt;
&lt;br /&gt;
This cell can store negatives or positives. Reset is done on a dedicated line. Additionally, a 1-tick burst is handled properly. [https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=60330&amp;amp;p=362377#p362377 Forum post].&lt;br /&gt;
&lt;br /&gt;
* The output M (memory) is the last non-zero input I (Input).&lt;br /&gt;
* A non zero R (reset) signal sets the output to zero.&lt;br /&gt;
* 1-tick bursts of R or I are handled properly.&lt;br /&gt;
* Negatives are handled properly.&lt;br /&gt;
&lt;br /&gt;
[[File:Memory_cell_with_negatives.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=14556 Combinators 101 (Tutorial)]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=176439</id>
		<title>Tutorial talk:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=176439"/>
		<updated>2019-10-04T10:41:06Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Forgot signature; remove period in section title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory cells  ==&lt;br /&gt;
&lt;br /&gt;
I am aiming to update the &amp;quot;memory cells&amp;quot; section.&lt;br /&gt;
* The &amp;quot;advanced cell&amp;quot; does not handle 1-tick bursts properly. (I updated the article and wrote about that)&lt;br /&gt;
* There should be more versions of the memory cell, including versions that can handle negative input.&lt;br /&gt;
&lt;br /&gt;
I may post some of my designs here once I finish polishing them.&lt;br /&gt;
-- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thank you for this, designs are appreciated here. It&#039;s good that you remain objective about their advantages and disadvantages. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thank you for your incredible work on the Wiki. I am always 100% objective. In this particular scenario, the initial design is objectively flawed. Try connecting a simple clock (self-connected arithmetic combinator with + 1) into it and then disconnecting it suddenly, its memory will flicker between the last two values. More generally, if the current input is only given for 1 tick, then it flickers between the current and the previous input. I do not want to remove it without the approval of the original poster. Here is a demo of the flicker. This device on the left sends a 1-tick pulse of 1. The lamp turns on if the output signal is 1. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: (edit: fixed link): https://streamable.com/5r7w8&lt;br /&gt;
&lt;br /&gt;
::: Because your memory cell has the same size, the other memory cell has no advantages over it. So, I am okay with a removal of the &amp;quot;positive cell&amp;quot;. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok. Let&#039;s wait for a while in case the original poster has comments that we&#039;ve missed.&lt;br /&gt;
&lt;br /&gt;
:::: There&#039;s one advantage for the previous design: It&#039;s useful for someone that absolutely requires a reset-on-negative and not reset on a dedicated line, and does not care about the flicker issue. But that seems like a very rare edge case, and someone who needs it is most likely very experienced and doesn&#039;t need this guide. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Binary gates redundant? ==&lt;br /&gt;
&lt;br /&gt;
The binary gates do not seem to have much function, because As of 0.16, arithmetic combinators have built-in binary logic support. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:56, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I am not very experienced in combinators, but aren&#039;t the combinators OR, XOR and AND option bitwise instead of binary? [[User:My3DS]] changed the page to specify that just yesterday, so it seems important to me. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I am not sure I understand the difference between &amp;quot;bitwise&amp;quot; and &amp;quot;binary&amp;quot; in the context of 1-bit inputs.&lt;br /&gt;
&lt;br /&gt;
:: The built-in OR, XOR, and AND produce exactly the same truth tables as the ones currently in the article for inputs of 1&#039;s and zeros, and are additionally capable of performing more than that for inputs greater than 1.&lt;br /&gt;
&lt;br /&gt;
:: -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:25, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Like I said, combinators aren&#039;t my strong suit :) So yes, they are redundant, but I&#039;d personally wait and see what My3DS wants to do with the gates before removing them. Perhaps give them a week, and if nothing is changed until then, remove them. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok :), does the wiki have some sort of &amp;quot;pinging&amp;quot; system to let them see the conversation?. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: You can&#039;t ping people directly, but if you leave a message on someones talk page, they will see a notification until they check it. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 18:12, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Thank you :) -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I can see the merit in these designs for 3 or more inputs. But I think  it should be clear to the reader that the 2-input designs are alternatives to the built-in ones, and that the bitwise vs binary sentence should be clarified. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have updated the page to have some clarification of what is meant by bitwise and some additional notes on the gates, as some can function with boolean or non-boolean values (or binary vs non-binary values), and some can have more inputs. Let me know if something doesn&#039;t make sense or should be improved. I&#039;m also not sure if the built in ones should be under the others or before it. [[User:BlackJack69|BlackJack69]] ([[User talk:BlackJack69|talk]]) 00:19, 12 February 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is not a beginner tutorial at the moment ==&lt;br /&gt;
&lt;br /&gt;
This page seems inappropriate for circuit beginners and I&#039;ve added a sentence at the beginning to keep beginners from getting frustrated; the circuit network page and cookbook page should be more helpful for beginners. A beginner section on this (or on a different page) that explains how to connect wires, how signals work and so on would be useful.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a decent overlap with the cookbook page (the madzuri setup, memory cells, sr latches, logic gates). And virtual signals are explained here and on the circuit network page. That is not a problem as such but it means there is more work to keep it updated. In sections where the intended depth of explanation is comparable between the pages, it may be better to keep the content on one page and have a link on the other one. [[User:Unique 2|Unique 2]] ([[User talk:Unique 2|talk]]) 23:25, 10 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Working on improving the Virtual Signal section ==&lt;br /&gt;
&lt;br /&gt;
So far I&#039;ve rewritten the section explaining wildcards, as it was very terse compared to overview at the [[Circuit network#Logic signals]] section. Given that this is a tutorial page, they should be explained in depth, which I attempted to do.&lt;br /&gt;
&lt;br /&gt;
I plan to add a similar explanation for the other virtual signals, but for now I&#039;ve stayed up way past my bed time :) --[[User:ZeroKnight|ZeroKnight]] ([[User talk:ZeroKnight|talk]]) 10:41, 4 October 2019 (UTC)&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=176438</id>
		<title>Tutorial talk:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial_talk:Combinator_tutorial&amp;diff=176438"/>
		<updated>2019-10-04T10:39:00Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: /* Working on improving the Virtual Signal section. */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Memory cells  ==&lt;br /&gt;
&lt;br /&gt;
I am aiming to update the &amp;quot;memory cells&amp;quot; section.&lt;br /&gt;
* The &amp;quot;advanced cell&amp;quot; does not handle 1-tick bursts properly. (I updated the article and wrote about that)&lt;br /&gt;
* There should be more versions of the memory cell, including versions that can handle negative input.&lt;br /&gt;
&lt;br /&gt;
I may post some of my designs here once I finish polishing them.&lt;br /&gt;
-- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:Thank you for this, designs are appreciated here. It&#039;s good that you remain objective about their advantages and disadvantages. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: Thank you for your incredible work on the Wiki. I am always 100% objective. In this particular scenario, the initial design is objectively flawed. Try connecting a simple clock (self-connected arithmetic combinator with + 1) into it and then disconnecting it suddenly, its memory will flicker between the last two values. More generally, if the current input is only given for 1 tick, then it flickers between the current and the previous input. I do not want to remove it without the approval of the original poster. Here is a demo of the flicker. This device on the left sends a 1-tick pulse of 1. The lamp turns on if the output signal is 1. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:46, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: (edit: fixed link): https://streamable.com/5r7w8&lt;br /&gt;
&lt;br /&gt;
::: Because your memory cell has the same size, the other memory cell has no advantages over it. So, I am okay with a removal of the &amp;quot;positive cell&amp;quot;. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok. Let&#039;s wait for a while in case the original poster has comments that we&#039;ve missed.&lt;br /&gt;
&lt;br /&gt;
:::: There&#039;s one advantage for the previous design: It&#039;s useful for someone that absolutely requires a reset-on-negative and not reset on a dedicated line, and does not care about the flicker issue. But that seems like a very rare edge case, and someone who needs it is most likely very experienced and doesn&#039;t need this guide. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Binary gates redundant? ==&lt;br /&gt;
&lt;br /&gt;
The binary gates do not seem to have much function, because As of 0.16, arithmetic combinators have built-in binary logic support. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 09:56, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I am not very experienced in combinators, but aren&#039;t the combinators OR, XOR and AND option bitwise instead of binary? [[User:My3DS]] changed the page to specify that just yesterday, so it seems important to me. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 11:57, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:: I am not sure I understand the difference between &amp;quot;bitwise&amp;quot; and &amp;quot;binary&amp;quot; in the context of 1-bit inputs.&lt;br /&gt;
&lt;br /&gt;
:: The built-in OR, XOR, and AND produce exactly the same truth tables as the ones currently in the article for inputs of 1&#039;s and zeros, and are additionally capable of performing more than that for inputs greater than 1.&lt;br /&gt;
&lt;br /&gt;
:: -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 13:25, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: Like I said, combinators aren&#039;t my strong suit :) So yes, they are redundant, but I&#039;d personally wait and see what My3DS wants to do with the gates before removing them. Perhaps give them a week, and if nothing is changed until then, remove them. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 14:53, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::: Ok :), does the wiki have some sort of &amp;quot;pinging&amp;quot; system to let them see the conversation?. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 15:54, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::::: You can&#039;t ping people directly, but if you leave a message on someones talk page, they will see a notification until they check it. -- [[User:Bilka|Bilka]] ([[User talk:Bilka|talk]]) - &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;Admin&amp;lt;/span&amp;gt; 18:12, 13 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
:::::: Thank you :) -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
::: I can see the merit in these designs for 3 or more inputs. But I think  it should be clear to the reader that the 2-input designs are alternatives to the built-in ones, and that the bitwise vs binary sentence should be clarified. -- [[User:SafwatHalaby|SafwatHalaby]] ([[User talk:SafwatHalaby|talk]]) 14:06, 14 May 2018 (UTC)&lt;br /&gt;
&lt;br /&gt;
I have updated the page to have some clarification of what is meant by bitwise and some additional notes on the gates, as some can function with boolean or non-boolean values (or binary vs non-binary values), and some can have more inputs. Let me know if something doesn&#039;t make sense or should be improved. I&#039;m also not sure if the built in ones should be under the others or before it. [[User:BlackJack69|BlackJack69]] ([[User talk:BlackJack69|talk]]) 00:19, 12 February 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== This is not a beginner tutorial at the moment ==&lt;br /&gt;
&lt;br /&gt;
This page seems inappropriate for circuit beginners and I&#039;ve added a sentence at the beginning to keep beginners from getting frustrated; the circuit network page and cookbook page should be more helpful for beginners. A beginner section on this (or on a different page) that explains how to connect wires, how signals work and so on would be useful.&lt;br /&gt;
&lt;br /&gt;
There&#039;s also a decent overlap with the cookbook page (the madzuri setup, memory cells, sr latches, logic gates). And virtual signals are explained here and on the circuit network page. That is not a problem as such but it means there is more work to keep it updated. In sections where the intended depth of explanation is comparable between the pages, it may be better to keep the content on one page and have a link on the other one. [[User:Unique 2|Unique 2]] ([[User talk:Unique 2|talk]]) 23:25, 10 March 2019 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Working on improving the Virtual Signal section. ==&lt;br /&gt;
&lt;br /&gt;
So far I&#039;ve rewritten the section explaining wildcards, as it was very terse compared to overview at the [[Circuit network#Logic signals]] section. Given that this is a tutorial page, they should be explained in depth, which I attempted to do.&lt;br /&gt;
&lt;br /&gt;
I plan to add a similar explanation for the other virtual signals, but for now I&#039;ve stayed up way past my bed time :)&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
	<entry>
		<id>https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176437</id>
		<title>Tutorial:Combinator tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.factorio.com/index.php?title=Tutorial:Combinator_tutorial&amp;diff=176437"/>
		<updated>2019-10-04T10:32:16Z</updated>

		<summary type="html">&lt;p&gt;ZeroKnight: Rewrote the explanation for virtual signals: The section was about as terse as the overview in the Circuit network page, and contained some grammatical errors and awkward sentences. The bulleted lists were reformatted and de-noised in the rewrite.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;This is an &#039;&#039;&#039;advanced&#039;&#039;&#039; tutorial. Beginners should refer to the [[Tutorial:Circuit network cookbook]] for examples and the [[Circuit network]] page for an overview over the circuit network. This tutorial assumes a basic understanding of circuits and covers more advanced topics like SR latches, memory cells and clocks.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Languages}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Combinator logic is achieved by cross-connecting outputs to inputs in such a way to achieve the desired logic. While advanced logic requires a multitude of combinators, some very useful basic logic can be achieved using only a handful of combinators. &#039;&#039;&#039;Combinator logic works because Factorio only updates at 60 times per second, such that combinators analyze their logic in a step, and then sum and/or decide the resulting output values on the next step.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When logic values are computed by combinators, the outputs are not recognized by the circuit network until the following step. So when a [[decider combinator]] is used to detect a certain input condition, it&#039;s output value will not take effect on the circuit network until the next step. &#039;&#039;&#039;This behavior is important to remember and can result in sequencing errors and significant delays when multiple combinators are connected in series.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Circuit wires act like a wire bus in electronics, it carries information in the connected wires, meaning that &#039;&#039;&#039;if there are similar signals on a wire, it will add them automatically, unless if it is a different signal, that means it will be carried in that wire as well, but as a different signal.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When cross-connecting combinators &#039;&#039;&#039;it&#039;s good practice to use the unused color to cross-connect, this will split the input and output networks and prevent unwanted inputs from accidentally connecting to a larger circuit network.&#039;&#039;&#039; Combinators will sum the red &amp;amp;/or green inputs prior to calculation, so either color can be used when wiring the output back to the input, but in most cases, it is more useful to use the opposing color of the wire so that it will not interfere with the resulting output and input.&lt;br /&gt;
&lt;br /&gt;
== Virtual signals ==&lt;br /&gt;
&lt;br /&gt;
Wildcards are special signals that represent &#039;&#039;&#039;zero or more&#039;&#039;&#039; arbitrary signals instead of representing a single discrete signal. Unlike other signals, they cannot be sent over the circuit network; instead, they apply additional logic to combinators which modifies their behavior. Factorio&#039;s circuit network implements three types of wildcards.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#FF6666&amp;quot;&amp;gt;Everything wildcard&amp;lt;/span&amp;gt; [[File:everything_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Everything&#039;&#039; wildcard is used with decider combinators. Its exact behavior depends on whether it is used as an input or an output:&lt;br /&gt;
* &#039;&#039;&#039;Input&#039;&#039;&#039;: Returns true if &#039;&#039;all&#039;&#039; input signals pass the condition, or if there are &#039;&#039;no&#039;&#039; input signals, otherwise it returns false.&lt;br /&gt;
* &#039;&#039;&#039;Output&#039;&#039;&#039;: Returns &#039;&#039;all&#039;&#039; non-zero input signals.&lt;br /&gt;
&lt;br /&gt;
When used as an input, the &#039;&#039;everything&#039;&#039; wildcard can be thought of as a logical AND, or a [[:Wikipedia:universal quantification|universal quantifier]]. When used as an output, it acts as an &#039;echo&#039; or &#039;dump&#039; of input signals.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Can be used as an output as long as the input is not an &#039;&#039;each&#039;&#039; wildcard.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#99FF99&amp;quot;&amp;gt;Anything wildcard&amp;lt;/span&amp;gt; [[File:anything_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Anything&#039;&#039; wildcard is also used with decider combinators, but only as an input.&lt;br /&gt;
&lt;br /&gt;
Given &#039;&#039;&#039;at least one&#039;&#039;&#039; input signal, it returns true if &#039;&#039;any&#039;&#039; input signal passes the condition. If no signal passes the condition, or there are no input signals, then it returns false. From this behavior, the &#039;&#039;anything&#039;&#039; wildcard can be thought of as a logical OR, or an [[:Wikipedia:existential quantification|existential quantifier]].&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;span style=&amp;quot;color:#FFFF99&amp;quot;&amp;gt;Each wildcard&amp;lt;/span&amp;gt; [[File:each_logic_icon.png|left|20px]] ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is used with both decider combinators and [[arithmetic combinator|arithmetic combinators]], and behaves somewhat uniquely compared to the previous two. Generally speaking, it performs a combinator action on each signal &#039;&#039;&#039;individually&#039;&#039;&#039;, with the exact action depending on how it is used. It can be used as an input, or it can be used as an output, but &#039;&#039;only when it is used as input as well&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In a &#039;&#039;&#039;decider combinator&#039;&#039;&#039;, when used as an input, the &#039;&#039;each&#039;&#039; wildcard individually compares each input signal against the combinator condition, returning each signal that passes the condition. The manner that the &#039;&#039;each&#039;&#039; wildcard returns signals when used as input depends on whether it is used as output or not:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: Sums each input signal that passed the condition, returning a count of the passed signals, or a summation of their values as the desired output signal depending on output settings.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Returns each signal that passed the condition, their values depending on the output settings.&lt;br /&gt;
&lt;br /&gt;
In an &#039;&#039;&#039;arithmetic combinator&#039;&#039;&#039;, the designated arithmetic operation is applied individually to each input signal, and similar to the decider combinator, the returned signal depends whether or not the &#039;&#039;each&#039;&#039; wildcard is used as output:&lt;br /&gt;
* &#039;&#039;&#039;Input only&#039;&#039;&#039;: The result of each operation on the input signals is summed and returned as the desired output signal.&lt;br /&gt;
* &#039;&#039;&#039;Input and Output&#039;&#039;&#039;: Each input signal is returned with the result of the specified operation applied to it.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Each&#039;&#039; wildcard is therefore notably more complex than the other two wildcards, but offers a good deal of power in exchange for its complexity.&lt;br /&gt;
&lt;br /&gt;
== Input insulator &amp;amp; gate ==&lt;br /&gt;
An arithmetic combinator set to (In: Each + 0, Out: Each) can be used to swap wire colors and as an insulator to prevent downstream logic from backfeeding into the circuit network&#039;s inputs.&lt;br /&gt;
&lt;br /&gt;
A decider combinator set to (Out: Everything, Input-&amp;gt; Output) will also function as an insulator as long as the set logic condition is true. This can also selectively pass or &#039;gate&#039; inputs only when desired. This could be used to sequentially poll remote train stations for their chest contents, and include only desired stations.&lt;br /&gt;
&lt;br /&gt;
== Set/Reset latching switch ==&lt;br /&gt;
You want something to SET a trigger at some quantity, but then STAY on until that quantity hits some other value, the RESET value. You&#039;ll need one decider combinator and one arithmetic combinator. Two decider combinators and a [[constant combinator]] can also be used for more complex multi-channel conditions.&lt;br /&gt;
&lt;br /&gt;
Setup the first decider combinator to the desired set conditional and to output a 1. Then connect the output to the input of an arithmetic combinator, and configure it to multiply by the bias value, the difference between the set and reset values, and wire the arithmetic output to the input of the decider. The arithmetic output channel MUST be set the same as the decider&#039;s input channel. That&#039;s it! Whenever your set conditional is reached, the decider will output a &#039;1&#039;, and the bias of the arithmetic combinator will be applied. This will &#039;hold&#039; the output true until the value goes back below the reset point.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a more specific example, I want the pump to run when petrol reach 2000, and turn off when reach 200: &lt;br /&gt;
* Tank -&amp;gt; in decider&lt;br /&gt;
* out decider -&amp;gt; in arithmetic&lt;br /&gt;
* out arithmetic -&amp;gt; in decider&lt;br /&gt;
* green wire from in decider, to pump&lt;br /&gt;
&lt;br /&gt;
Pump has the same condition as the decider (Petrol &amp;gt; 2000)&lt;br /&gt;
&lt;br /&gt;
* Decider: Petrol &amp;gt; 2000&lt;br /&gt;
* out: A = 1&lt;br /&gt;
* Arithmetic: A × 1800 (2000 - 200)&lt;br /&gt;
* out: petrol&lt;br /&gt;
[[File:Factorio combinator switch.png|620px]]&lt;br /&gt;
&lt;br /&gt;
Backup steam power example with detailed configuration and explanation can be found here:&amp;lt;br /&amp;gt;[[Tutorial:Circuit network cookbook#SR_latch_-_single_decider_version|Tutorial:Circuit-network_Cookbook#SR latch - single decider version]]&lt;br /&gt;
&lt;br /&gt;
== Smart train loading ==&lt;br /&gt;
This solves the problem of loading logistics into chests, which tend to be unequal and is slower in the rate of loading logistics into the cargo of trains.&lt;br /&gt;
&lt;br /&gt;
To setup the design, you require an Arithmetic Combinator, as well as Red and Green wires. &#039;&#039;&#039;Wire all the chests used, to the input of the Arithmetic Combinator&#039;&#039;&#039;. &#039;&#039;&#039;Then write (Logistics Item / -Amount of chests) and as the output as the Logistics Item in the Arithmetic Combinator&#039;&#039;&#039;, this will average the amount of items within the chests. Lastly, &#039;&#039;&#039;wire all the inserters used to the output of the Arithmetic Combinator and have the other color of the wire be wired to the adjacent chest&#039;&#039;&#039;. &#039;&#039;&#039;Have the inserters enabled when Logistics Item &amp;lt; 1&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A more visual representation as well as questions about the design can be found in a reddit post: [https://www.reddit.com/r/factorio/comments/4e03g2/madzuris_smart_loading_train_station_guide/ MadZuri&#039;s smart loading train station].&lt;br /&gt;
&lt;br /&gt;
Explanation of why this works:&lt;br /&gt;
It compares the average amount of total items within the chests and the chest adjacent to the inserter so that it activates when the average number of items is higher than the amount within the chest.&lt;br /&gt;
The reason for why the division denominator is negative is because if the items in the chests are 0, it basically makes it so that it adds 1 to the equation.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
How to store a constant value for later use, either for a basic counter or for more advanced logic. A decider combinator wired output tied to input and configured greater than zero (for positive values), input -&amp;gt; output will &#039;hold&#039; a value, as long as all other inputs on the network are zero.&lt;br /&gt;
&lt;br /&gt;
Any non-zero input condition will create a basic clock; incrementing the stored value by the sum of all connected input values every cycle. A single pulse of an input will cause a single increment by the pulsed value. Reset to zero occurs whenever the set condition is no longer met, or if a negative pulse equal to the input occurs.&lt;br /&gt;
&lt;br /&gt;
== Basic clocks ==&lt;br /&gt;
[[File:Timer.png|thumb|right|377px|A basic clock. 30 ticks is the ceiling for Signal 1; which is continuously added.]]&lt;br /&gt;
Clocks are constructed by having the output of a combinator tied back to its own input, such that every cycle advances its own count. Either the arithmetic combinator or the decider combinator can be used.&lt;br /&gt;
&lt;br /&gt;
An arithmetic combinator tied to itself is fun to watch and will happily run-away, but requires additional control logic to reset.&lt;br /&gt;
&lt;br /&gt;
A self-resetting clock requires just a single decider combinator with output wired to input and configured with Less Than (&amp;lt;) and Input -&amp;gt; Output. When a constant combinator is then connected to the input, every cycle it will count up by the value of the Constant Combinator until the set conditional value is reached, then output a zero which will be summed with the constant combinator, and reset the process.&lt;br /&gt;
&lt;br /&gt;
The clock sequence will not include zero, will begin at the value set by the constant combinator, and will include whatever value eventually causes the conditional to be false. An arithmetic combinator can modify the clock sequence but remember its outputs will occur one cycle later than the clock cycle values.&lt;br /&gt;
&lt;br /&gt;
A clock that only counts once can be built using the following setup:&lt;br /&gt;
&lt;br /&gt;
[[File:Onetime_Clock.png|thumb|none|360px|One-time clock. Runs until T=Z+1. Reset via R&amp;gt;0.]]&lt;br /&gt;
&lt;br /&gt;
== Pulse generators ==&lt;br /&gt;
&lt;br /&gt;
Connecting an additional (=) decider combinator to the output of a basic clock will create a pulse generator, and will pulse a single output every time the clock cycles through the set condition. Any output value can be used, either directly from the clock sequence (input-&amp;gt;output), a 1, or some value on a separate logic channel on the circuit network, such as set by a constant combinator. or by the circuit network.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:PulseGen.png|500px]]&lt;br /&gt;
*&#039;&#039;The value 1 can be written as any positive integer, so long as it is within the cap or ceiling of your timer.&#039;&#039;&lt;br /&gt;
*&#039;&#039;As an example from the above timer, this light will pulse every 1st tick after the timer reaches 30 ticks, making it pulse 1/30th of a second, as Factorio updates at 60 times per second.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Counter ==&lt;br /&gt;
A counter is used to count the number of input events, and output the sum of that count. Any pulsing input into a decider combinator configured input -&amp;gt; output and wired between output and input will create a counter, but this input must be zero at all other times or else the combinator will run away like a clock. A pulse generator is normally used to accomplish this. Combining several gating decider isolators set with sequential conditionals, a clock, and a pulse generator to the input of a counter will allow remote polling and counting of each isolator&#039;s contents.&lt;br /&gt;
&lt;br /&gt;
== Logic gates ==&lt;br /&gt;
&lt;br /&gt;
Some logic gates will only function with boolean values, where the inputs are either 0 or 1.&lt;br /&gt;
Other logic gates will work with other values as well, e.g. 2.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Built In&#039;&#039;&#039;===&lt;br /&gt;
The arithmetic combinator has built in OR, XOR and AND operators.&lt;br /&gt;
These operate bitwise, i.e. they perform the operation on each bit in the number in a binary format and return the result.&lt;br /&gt;
&lt;br /&gt;
An example for the bitwise AND operator:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 4  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 3  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 30  || 10&lt;br /&gt;
|-&lt;br /&gt;
| 10 || 40  || 8&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
If your inputs only consist of boolean values (1 or 0) the arithmetic combinator&#039;s operators can be used as logic gates.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Unary NOT&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOT.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary OR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:OR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NOR.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Notes: This works for any number of inputs, all sent as the signal &amp;quot;A&amp;quot;. This works for boolean inputs as well as other values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XOR.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 1!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 ||  1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 ||  1 || 0&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note: This only works for boolean inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:AND.png|530px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The arithmetic combinator example provided works for non-boolean values, and will return non-boolean values when given them as input, but only if both values are non 0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:The decider combinator example provided only works for boolean values. It can be modified to have any number of inputs by changing the &amp;quot;1&amp;quot; shown to 1 less than the number of inputs, or the &amp;quot;2&amp;quot; shown to the number of inputs, as demonstrated below for a Ternary AND.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Ternary AND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:TrinaryAND.png|415px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Input 3!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary NAND&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:NAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values. It can be modified to have any number of inputs by changing the &amp;quot;2&amp;quot; shown to the number of inputs.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;Binary XNOR&#039;&#039;&#039;===&lt;br /&gt;
----&lt;br /&gt;
[[File:XAND.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Input 1!!Input 2!!Output&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0  || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0  || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1  || 1&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*Note:This only works for boolean input values.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Memory cells ==&lt;br /&gt;
&lt;br /&gt;
=== Simple latch ===&lt;br /&gt;
&lt;br /&gt;
When looping the combinator to itself, use a different color of wire from your main inputs or outputs. &lt;br /&gt;
&lt;br /&gt;
[[File:SimpleLatchv2.png|300px]]&lt;br /&gt;
&lt;br /&gt;
Truth Table:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Output 1!!Input 1!!Input 2!! Output 1 (t+1)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 0 || 1 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 0 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 0 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 0 || 1 || 0&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 1 || 1 || 1 &#039;&#039;(2)&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|} &lt;br /&gt;
&#039;&#039;Output 1 is the green wire loop seen in the picture, it carries the value to latch.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Input 1 is Set, while Input 2 is Reset.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positive cell ===&lt;br /&gt;
&lt;br /&gt;
Cell for storing a positive value, with reset support:&lt;br /&gt;
&lt;br /&gt;
[[File:AdvancedMemoryCell.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Connect the desired value as signal 3 on the right side to set the memory cell and connect a negative value as signal 3 to reset the cell.  *Please note the arithmetic combinator&#039;s output should be facing the opposite direction of the decider combinators.&lt;br /&gt;
&lt;br /&gt;
This particular cell design does not work properly on a one-tick burst of input. Input must be held for at least 2 ticks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Address Enable Switch&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Positives and negatives cell ===&lt;br /&gt;
&lt;br /&gt;
This cell can store negatives or positives. Reset is done on a dedicated line. Additionally, a 1-tick burst is handled properly. [https://forums.factorio.com/viewtopic.php?f=193&amp;amp;t=60330&amp;amp;p=362377#p362377 Forum post].&lt;br /&gt;
&lt;br /&gt;
* The output M (memory) is the last non-zero input I (Input).&lt;br /&gt;
* A non zero R (reset) signal sets the output to zero.&lt;br /&gt;
* 1-tick bursts of R or I are handled properly.&lt;br /&gt;
* Negatives are handled properly.&lt;br /&gt;
&lt;br /&gt;
[[File:Memory_cell_with_negatives.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.factorioforums.com/forum/viewtopic.php?f=18&amp;amp;t=14556 Combinators 101 (Tutorial)]&lt;br /&gt;
* [[Tutorial:Circuit network cookbook]]&lt;br /&gt;
* [[Circuit network]]&lt;br /&gt;
* [[Arithmetic combinator]]&lt;br /&gt;
* [[Constant combinator]]&lt;br /&gt;
* [[Decider combinator]]&lt;/div&gt;</summary>
		<author><name>ZeroKnight</name></author>
	</entry>
</feed>