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.

40d:Computing

From Dwarf Fortress Wiki
Revision as of 17:38, 31 August 2008 by TaintedMustard (talk | contribs)
Jump to navigation Jump to search

Computing in dwarf fortress is the practice of setting up your fortress in such a way that allows logical operations like AND, OR, NOT, and etc to exist and be used. Computing in Dwarf Fortress is a very young concept with lots of room for improvement and development. Innovation and invention is encouraged.

Basics

Binary logic takes one or two inputs and creates an output based on them. The devices that perform these operations are commonly called logic gates.

NOT takes one input and returns true if that input is false

AND takes two inputs and returns true if both inputs are true

OR takes two inputs and returns true if at least one input is true

XOR takes two inputs and returns true if exactly one input is true

NAND takes two inputs and returns true if either input is false

NOR takes two inputs and returns true if both inputs are false

A B  AND  OR   XOR  NAND NOR
0 0  0    0    0    1    1
0 1  0    1    1    1    0
1 0  0    1    1    1    0
1 1  1    1    0    0    0

The most human-understandable logic system requires NOT, AND and OR gates, but having a design for either a NAND or a NOR gate is enough to build any of the other ports.

Additionally, two-dimensional logic design requires a 'jumper' gate that crosses two signals without affecting their contents. This may only be an issue in DF if you are considering magma-based circuits.

Fluid Logic

Fluid logic utilizes the tendency of fluids in dwarf fortress to, umm, flow. It takes advantage of the ability of pressure plates in the new version to be triggered by water (or magma) resting on top of them. This allows systems of pumps, floodgates, doors, bridges, and anything else operated by pressure plate to be incorporated into a machine.

To get you started, a pressure plate set to trigger on water level 0-3 and linked to a floodgate will CLOSE the floodgate when the tile has deep water. If the pressure plate is set for water level 4-7, then the floodgate will OPEN when the tile has deep water.

Machine Logic

See mechanical logic

Borg Logic

Borg logic is the experimental version of fluid logic. It consists of creating a way for your dwarves to travel constantly in a predictable way through your fortress through constant hauling jobs or military designations. Pressure plates are used in similar setups to those in the fluid logic method. It is theorized that Borg logic would be quicker and easier to set up than fluid logic, although it would require a very large population dedicated to nothing but borging. The consequences of dwarves quitting to eat, sleep, drink, etc are unknown. There are no known examples of borg logic, and it is purely theoretical at this time.

Note: Borg Logic may be a bit more difficult, or impossible, in early versions due to a bug in 33c (and possibly earlier versions): The 'citizens trigger' setting on pressure plates does not actually cause the pressure plate to trigger when citizens step on it. This has been fixed, though.

Animal Logic

Animals have a natural 'follow the leader' tendency and never starve. Pitting an animal into a maze with movable exits can force the animal to shuttle around and compute.

See Also

User:SL/Logic Gates - These use mechanisms for connecting gates and devices and so forth, but fluid for logic. They're built on top of a body of water, and require power (for a pump or two per gate).

User:Kyace/Adder - A full adder built using fluid logic, with a video of a rough prototype. Trivial to combine 8 of these to make a fluid device capable of adding two 8 bit numbers together.



Rooms
Furniture
Animal trapAnvilArmor standBedBinBucketCabinetCageCoffinContainerRestraintSeatStatueTableWeapon rack

Access
DoorFloodgateBarsGrateFloor hatchBridgeRoadWindow
Constructions
Machine & Trap parts
Other Buildings
Related Articles