Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: DENIAC - The 2 floor, 6 bit mechanical adder.  (Read 8171 times)

gregorah

  • Bay Watcher
    • View Profile
DENIAC - The 2 floor, 6 bit mechanical adder.
« on: July 29, 2009, 10:43:33 pm »

So yesterday I finished my latest project, a 6 bit ripple-carry adder.
All the logic is done using mechanical logic, most of which was fairly simple to implement.

Inputs to the adder are from switching elements -- Levers/Pressure Plates.
Outputs are done using screw pumps. The entire mechanism requires very little water, and is currently sitting ~10 squares from my dining hall.
Total power required is ~950, which is provided by 3 banks of water wheels.
It features a total shutdown lever, as well as shutdown levers for each bit in the adder.
LSB is on the left.

Video: http://www.mkv25.net/dfma/movie-1561-addingmachine
Save: http://www.uc.edu/~bakergo/Goremire.tar.gz (yes, the name is cheesy)


All the logic was derived on my own; the 'mechanical logic' section of the wiki does things the hard way.
I've found that if you find an equation for the positive output network (causing the output to be 1) as well as an equation for the negative output network (causing the output to be 0), the machine basically builds itself using two screw pumps. that could be phrased better.

The logic design philosophy is as follows:
XOR logic is performed by linking all inputs to a single gear assembly, making XOR the most basic operation in mechanical logic.

AND and OR are performed by arranging the gears in parallel or series.

There is no NOT operation, except on the inputs, where NOT was implemented by attaching a 'NOT' lever and pulling it before operating the machine.

NAND and NOR are changed into (A'+B') and (A'B'), respectively.

Doing these, plus a PUN/PDN design with only positive logic allows for the expression of any function with a set truth table, and you can hack the basic design to create oscillators and such, which I've done for a spike trap in the back of my fort.

GF's yelling at me, I'll do the equations and designs later :P
Logged

LordZorintrhox

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #1 on: July 29, 2009, 11:13:33 pm »

I have to say the use of 2x3 bridges for the binary output is inspired.
Logged
...but their muscles would also end up looking like someone wrapped pink steel bridge-cables around a fire hydrant and then shrink-wrapped it in a bearskin.

HEY, you should try my Dwarfletter tileset...it's pretty.
I make games, too

Christes

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #2 on: July 29, 2009, 11:16:24 pm »

Now that is sweet.
Logged

joelpt

  • Bay Watcher
    • View Profile
    • Quickfort homepage
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #3 on: July 30, 2009, 12:14:42 pm »

The output bridges look especially cool with the tileset I'm using:

Shrike

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #4 on: July 30, 2009, 12:16:08 pm »

Yes. That is an incredible touch to have the binary bridges.
As an EE, I approve of this on many levels.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #5 on: July 30, 2009, 01:28:02 pm »

Did you see that dude who made the adder that outputed the answer in base-10?  That was cool.

I can tell you just invented a better mousetrap though.  Nice job.

▼Yeah, that was probably it.

Whatever it was, it was a movie.
« Last Edit: July 30, 2009, 04:24:39 pm by zchris13 »
Logged
this sigtext was furiously out-of-date and has been jettisoned

Kanddak

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #6 on: July 30, 2009, 04:00:50 pm »

My hat is off to you, gregora, for being somebody other than me ( http://www.bay12games.com/forum/index.php?topic=30514.0 ) to actually go ahead and make an adder.

Nice job on the mechanical logic. Somewhere in my (above-linked) thread I play around with the idea, but I never make the conceptual leap to link multiple outputs to a single gear, therefore requiring a whole mess of four gears for XOR gates.

I, too, heartily approve of the output bridges. They are classy.

zchris13, if someone made an adder that gave decimal output, I haven't seen it but desperately want to. I wonder whether you have just heard a corrupted version of the story that I built an adder, and also built a seven-segment display that showed hexadecimal digits, but not in the same fort.
Logged
Hydrodynamics Education - read this before being confused about fluid behaviors

The wiki is notoriously inaccurate on subjects at the cutting edge, frequently reflecting passing memes, folklore, or the word on the street instead of true dwarven science.

gregorah

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #7 on: July 30, 2009, 06:21:33 pm »

Yes. That is an incredible touch to have the binary bridges.
As an EE, I approve of this on many levels.

I'm a CompE student. Currently on co-op so I needed to do something incredibly nerdy to fit my major.

My hat is off to you, gregora, for being somebody other than me ( http://www.bay12games.com/forum/index.php?topic=30514.0 ) to actually go ahead and make an adder.

<snip>

zchris13, if someone made an adder that gave decimal output, I haven't seen it but desperately want to. I wonder whether you have just heard a corrupted version of the story that I built an adder, and also built a seven-segment display that showed hexadecimal digits, but not in the same fort.

Nice! I'd have made another 2 bits but I didn't feel like trashing my dining room. :(
Bonus points for the 7 segment display, I might steal that project next :P

The actual design/connections (I screwed up on the equations at first so the gearing isn't symmetrical like it would have been):

Key:
Spoiler (click to show/hide)

Equations:
Code: [Select]
Lower Floor:
Qo = A XOR B XOR Ci
Co = AB+(A XOR B)Ci

Subtraction:
Qo = A XOR B XOR Ci
Co = A'B+(A' XOR B)Ci

~~~~~~~
aS=O=S*
|O+O+O|
|OQOCO|
|OOOOO|
|    b*c
|    dIe
*----*-*
a: A,B,Ci,i
b: B, i
c: Ci, i
d: A,i,O
e: A,B,i,O

Top Floor:
Qo' = A XOR B XOR Ci'
Co' = A'B' + (A XOR B) Ci'

Subtraction:
Qo' = A XOR B XOR Ci'
Co' = AB' + (A' XOR B) Ci'

 + +
S= =S*
a~ ~bc
|   de
*---**
a: A,B,Ci
b: A,O
c: Ci
d: B
e: A,B,I,O

Edit: subtraction operation links/equation added
« Last Edit: August 05, 2009, 10:59:32 pm by gregorah »
Logged

gregorah

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #8 on: July 30, 2009, 06:27:35 pm »

The output bridges look especially cool with the tileset I'm using:


:o
Logged

gregorah

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #9 on: July 31, 2009, 02:39:19 pm »

Upon futher review, the design *should* be modifiable into an adder/subtractor by attaching a 'subtraction' lever to all 'A' inputs on the carry logic. I'll test that at some point over the weekend and make sure it works.
« Last Edit: July 31, 2009, 02:54:30 pm by gregorah »
Logged

Sizik

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #10 on: July 31, 2009, 04:07:57 pm »

I've also made an 8-bit one around the time of this thread, albeit it was water powered and built like this:

Reservoir of water
Logic gates
Drain

It basically went like this:
Spoiler (click to show/hide)
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!

Albedo

  • Bay Watcher
  • Menacing with spikes of curmudgeonite.
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #11 on: July 31, 2009, 04:18:28 pm »

All the logic was derived on my own; the 'mechanical logic' section of the wiki does things the hard way.

Then you should absolutely add a new section!  That's exactly what the wiki is about, user input to improve and broaden articles.  (You'll probably have the majority of it just from this thread!)
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #12 on: July 31, 2009, 04:36:40 pm »

All the logic was derived on my own; the 'mechanical logic' section of the wiki does things the hard way.
Yeah, but if you understand the article in the first place then you probably already know what the easier way is.

Quote from: DF wiki article
As noted, large amounts of wood, stone, and massive amounts of power are required. Secondly, the system operates on the concept of the 'rotation sensor' Obviously, this does not exist in Dwarf Fortress at this time, and there are no plans for such a device to exist- therefore, a surrogate unit is required.
Obvious to whom? I tried googling rotation sensors and the only specifics I got were on Lego components.

Quote from: DF wiki article
"P" is used just to say where Power is supposed to be applied (though not all of these have P where it should be)
In other words...
Spoiler (click to show/hide)
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Dvergar

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #13 on: July 31, 2009, 10:00:27 pm »

I can honestly say that I have absolutely no clue what you did or what that movie shows  ;D 

Just kidding, I know about the logic functions (but that is about it)

Very nice job, too bad there will be no miniturization era for DF

IN the meantime, I build my own adding machine, 5 cat corpses on one hatch 3 on the other, pull that lever and badabingbadaboom 8 cat corpses!
Logged

Skorpion

  • Bay Watcher
    • View Profile
Re: DENIAC - The 2 floor, 6 bit mechanical adder.
« Reply #14 on: August 01, 2009, 12:20:34 am »

Hmm. Computing using a feature of a program on a computer itself. Interesting, if recursive.

I plan to foray into this myself, once I actually find a damn use for it. I mean, AND and OR gates is pretty damned simple to do with levers and gears already, and NOT gates would require a little setup, but otherwise I'd have to try and figure out some sort of memory system.
Logged
The *large serrated steel disk* strikes the Raven in the head, tearing apart the muscle, shattering the skull, and tearing apart the brain!
A tendon in the skull has been torn!
The Raven has been knocked unconcious!

Elves do it in trees. Humans do it in wooden structures. Dwarves? Dwarves do it underground. With magma.
Pages: [1] 2 3 4