Actions

User

Difference between revisions of "Carsten Milkau/D-Latch"

From Unofficial Stationeers Wiki

< User:Carsten Milkau
(Created page with "== D-latch == A d-latch is a circuit that stores the last value seen at its "data" input while its "enable" input was on. {| |enabled||data||previous output||output |- |0||x...")
 
(Using Select and Reader Unit)
Line 23: Line 23:
 
This d-latch can store any value. It works in two steps:
 
This d-latch can store any value. It works in two steps:
  
==== Step 1 : Selection ====
+
<ol>
a select unit determines whether to output the "stored value" or the "data" input using the "enabled" input. i.e.  
+
<li>a select unit determines whether to output the "stored value" or the "data" input using the "enabled" input. i.e.  
 
+
<pre>  if enabled
  if enabled
 
 
   then output = stored
 
   then output = stored
   else output = data</code>
+
   else output = data</pre></li>
 
+
<li>a reader unit feeds the output value back into the select unit so it can circulate (effectively being stored). This would be obsolete if the select unit could read its own output.
==== Step 2: Feedback ====
+
<pre>  stored = output</pre></li>
a reader unit feeds the output value back into the select unit so it can circulate (effectively being stored). This would be obsolete if the select unit could read its own output.
+
</ol>
 
 
  stored = output
 

Revision as of 14:04, 17 July 2018

D-latch

A d-latch is a circuit that stores the last value seen at its "data" input while its "enable" input was on.

enabled data previous output output
0 x y y
1 x y x

In theory, a single select unit can do this (selector input = enable, input 1 = data, input 2 = output, output = output). In practice, this is not possible as the game does not allow it to have its own output as input. However, several constructions using two or more circuits are possible.

Connectors

  • Enabled: if 1, store data, else do nothing.
  • Data: input
  • Output: stored value

Using Select and Reader Unit

This d-latch can store any value. It works in two steps:

  1. a select unit determines whether to output the "stored value" or the "data" input using the "enabled" input. i.e.
      if enabled
      then output = stored
      else output = data
  2. a reader unit feeds the output value back into the select unit so it can circulate (effectively being stored). This would be obsolete if the select unit could read its own output.
      stored = output