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.

Difference between revisions of "User:Jong"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Replaced content with '==Dwarven Computer== User:Jong/Dwarven_Computer')
 
Line 1: Line 1:
 
==Dwarven Computer==
 
==Dwarven Computer==
[[User:Jong/Dwarven_Computer]]
+
[[Image:DCOverview.png|thumb|Overview of the Dwarven Computer]]
 +
{{Main|User:Jong/Dwarven_Computer}}
 +
 
 +
I successfully built first fully programmable digital computer in Dwarf Fortress! It has been tested and works as expected, although incredibly slow.
 +
 
 +
I did make a few changes from the documented design in the final implementation, but the basic design is sound and should only have a few bugs.
 +
 
 +
==Single-Stage carry-look-ahead adder==
 +
 
 +
In another [http://www.bay12forums.com/smf/index.php?topic=55380.0 thread] on the official forums, I came up with an improved design for a carry-look-ahead adder. [[Image:Single stage adder.png|thumb|Single Stage Adder]]
 +
 
 +
It directly attaches the output gears of the carry calculation circuit to the root of the sum circuit's gear tree, where the carry-in gears would have been. This allows the power availability, which is determined by the carry circuit, to substitute for a toggled gear and thus making the whole adder single stage.
 +
 
 +
I further optimized the design by replacing most of the simple single-input gears with double input gears that were mentioned in that thread as well. This greatly reduced the complexity of the adder.
 +
 
 +
==Binary Multiplier==
 +
 
 +
===Multiple Input Adder===
 +
 
 +
Given the efficiency of my new adder design, and multiple input design, I have been considering the problem of creating an efficient multiple input adder, which could be used as a component of a binary multiplier.
 +
 
 +
It turns out that the sum calculation circuit needs no modification at all, as it simply determines whether the total of the inputs and the carry is odd or even, producing a result when it is odd.
 +
 
 +
However the carry calculation could become very complex, as the quantity of the carry is variable depending on the total number of inputs. For example 1+1+1+1 gives 100, which is 2 units down the row.

Latest revision as of 09:32, 30 April 2010

Dwarven Computer[edit]

Overview of the Dwarven Computer

I successfully built first fully programmable digital computer in Dwarf Fortress! It has been tested and works as expected, although incredibly slow.

I did make a few changes from the documented design in the final implementation, but the basic design is sound and should only have a few bugs.

Single-Stage carry-look-ahead adder[edit]

In another thread on the official forums, I came up with an improved design for a carry-look-ahead adder.

Single Stage Adder

It directly attaches the output gears of the carry calculation circuit to the root of the sum circuit's gear tree, where the carry-in gears would have been. This allows the power availability, which is determined by the carry circuit, to substitute for a toggled gear and thus making the whole adder single stage.

I further optimized the design by replacing most of the simple single-input gears with double input gears that were mentioned in that thread as well. This greatly reduced the complexity of the adder.

Binary Multiplier[edit]

Multiple Input Adder[edit]

Given the efficiency of my new adder design, and multiple input design, I have been considering the problem of creating an efficient multiple input adder, which could be used as a component of a binary multiplier.

It turns out that the sum calculation circuit needs no modification at all, as it simply determines whether the total of the inputs and the carry is odd or even, producing a result when it is odd.

However the carry calculation could become very complex, as the quantity of the carry is variable depending on the total number of inputs. For example 1+1+1+1 gives 100, which is 2 units down the row.