v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing User:Jjdorf/Logic Gates

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 174: Line 174:
 
2 Mechanisms
 
2 Mechanisms
 
2 Additional Mechanisms which are then recovered
 
2 Additional Mechanisms which are then recovered
===Decomposed XOR Gate===
 
The above gate is functionally equivalent to the following, which can be used in more complicated designs.
 
  
PAb
+
==ML Full 1-bit Adder==
  BaO
+
As designed on my forum posts, a 1-bit full feature adder "chip" can be built from combined logic gates. This adder takes as input three single bit numbers, which are added together to produce two outputs, a result and a carry.
  
Another variation:
+
OIPAB
 +
  ZxC
  
  PAb
+
Power (P) is provided, and must be a gear. The outputs (O & C) are most likely to be direct connections to FL Buffers.  Input gears are the complicated part.  Each input signal, A, B, and Z, are the three single bit inputs.  Z is what is commonly known as the Carry input.  The gears labeled A, B, and Z are standard non-pre-toggled gears linked to these signals.  The two other gears use combinations of these inputs to produce the correct results.  The first, x, is a pre-toggled gear linked to A and B signals.  The second, I, is a non-pre-toggled gear linked to all three input signals.  This last gear is known as a three input XOR gate, and is active when an odd number of inputs are true.
  aBO
 
  
==ML 8-bit Adder/Subtractor==
+
The power cost of this gear train, including the P gear, but not addition power train, nor the output trains, costs exactly 30 powerIt will take 7 mechanisms to build, excluding the cost of linking input signals (which by my convention, is included in the cost of Fluid memory and buffer gates).
From my forum thread, the Adder/Subtractor uses 8 bits of an adder/subtractor assembly, one per input bit, and a carry input endcap.  Inputs are one Z signal, which is false for addition, and true for subtraction; and 1 A and 1 B input per bit of addition.
 
 
 
First, the 1-bit adder module:
 
 
 
  CC
 
PBAa  PS
 
  bB
 
 
 
Link the incoming A signal to the A and a gears, pre-toggling the a gearLink the incoming B signal ''and'' the incoming Z signal to the B and b gears, pre-toggling the b gear.  Construct an FL Buffer under the CC gear pair, and link its pressure plate to the S gear.  Also link the A, B, and Z signals to that pressure plate.  Construct a second FL Buffer under S, but ''not'' under the adjacent Power gear (P).  The pressure plate of this second buffer is the result of the addition or subtraction for this bit.
 
 
 
Second the endcap:
 
 
 
  *ZP
 
 
 
Link the Z signal to the Z gear.  The extra gear * simply transfers power.  The final construction will look like this:
 
 
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  CC
 
PBAa  PS
 
  bB
 
  *ZP
 
  
 
==DPROM==
 
==DPROM==

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)