To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 21029
21028  |  21030
Subject: 
Re: A better full adder!
Newsgroups: 
lugnet.technic, lugnet.robotics
Date: 
Sat, 28 Jun 2003 01:28:16 GMT
Viewed: 
395 times
  
In lugnet.technic, Mark Tarrabain wrote:
Kevin L. Clague wrote:
Yeah... after my first round of pneumatic trials failed abysmally, I
tossed the idea of using or requiring inverted logic.


But with LEGO pneumatics you can typically get it for free.

Not sure what you mean.  If an output isn't producing any airflow, how
do you invert that?

Ahh... you are stuck in single pressure line mindset.

The modern LEGO pneumatic pistons are dual ported where pressure into the port
at the base makes it expand, and pressure into the port at the top makes it
contract (presuming of course that the non-presurized ports of the piston can
vent to the atmoshphere.)

When not in the OFF position, the center port of the switch is directing
pressure to one of the output ports and venting the pressure from the other port
to the atmosphere.  Lets presume for the moment we have a switch with pressure
applied to the center port, and we call the switch A.

If we decide that when the switch handle is to the right, and pressure is going
out the right port is A == TRUE, then when the switch handle is thrown to the
left, and pressure is redirected to the right port, we can consider this A ==
FALSE (which is the same as NOT A).

From my dual pressure perspective then A and NOT A are a pair of things you can
get from a single switch.


BTW, I've been wracking my brains on this for several hours now, I can't
figger out how you possibly could have built a full adder with only 3
pistons and 8 switches.  I even tried some really *REALLY* bizarre
setups that I can't even be sure would actually work (they depend on the
physical properties of the switches and pistons themselves, not on any
logic), where I make an XOR gate from one piston, one switch, and one
rubber band, but still couldn't beat that (by beat I mean in terms of
dollars... using $1.50 for a switch and $6 for a piston as my base).

Darn!

Well the first piston uses A to make the piston expand, and bands to make them
contract.  The first switch of the 3 on this piston creates a Terrabain AND
gate.  This leaves two switches on that piston.  The two pistons form the XOR as
you noted using B and NOT B (can get both based on above).  This gate has two
outputs A AND B, and A XOR B.  This gets us a half adder in 1 piston and 3
switches.

The second piston and three switches form a second half adder.
The second piston is expanded by A XOR B.  Its first switch is a Tarrabain AND
gate.  Its other two switches take CIn and NOT CIn to form an XOR gate. OK, so
again I didn't account for NOT Cin, just like I didn't originally account for
NOT B in.  So the second piston has two outputs (A XOR B) AND Cin, and (A XOR B)
XOR CIn (which is Sum out).

The last piston has two switches that form a single OR gate.  A AND B is one of
the inputs and (A XOR B) AND CIn is the other input.  This forms carry out.

The OR gate is made up of a two input mux, where the A column below is the input
that expands the gate.  One input to the mux is B, and the other input to the
mux is A.

A B OR
0 0  B 0
0 1  B 1
1 0  A 1
1 1  A 1

When A is 0 (piston is contracted), B is fed to the output.  When A is 1, A (or
just raw pressure) is fed to the output.  This gives us an OR gate (motivated
highly by your single piston/switch AND gate.)

So with inputs A, B and NOT B (which *may* be for free), and CIn and NOT CIn
(which *may* be for free), we can add these three bits using three pistons and 8
switches.


Oh well... at least my AND gate was useful...  :)

As I said when I first saw it, it is highly motivating.  I was stuck in standard
LEGO pneumatic circuitry, and you opened up the world of single pressure
computing.


Stick a fork in me... I'm done.

Oh... Please no.  Your ability to design on paper is amazing.

Its been a good month for new LEGO pneumatic concepts.  Between your AND gate,
and my mux (which can be used for OR, XOR or mux), we've made a LEGO pneumatic
computer something I can afford to build.

I'm quite sure that we've not said all there is to say about computing with LEGO
pneumatics.


Mark

Kevin



Message has 2 Replies:
  Re: A better full adder!
 
Kevin L. Clague wrote: > [ more brilliant stuff ] >> Stick a fork in me... I'm done. > (...) Thanks. I try. :) Actually, I do have a few more ideas I've been toying around with in my brain, but I think I'm about as done with this as I'm going to be (...) (21 years ago, 28-Jun-03, to lugnet.technic, lugnet.robotics)
  Re: A better full adder!
 
Okay, Kevin... you talked me into trying this inverted logic thingamy. (I'm just too competitive for my own good...) How's this? (URL) A and NOT A, B and NOT B, and Carry in as inputs and produces A+B+C, NOT A+B+C, and Carry Out as outputs. I saw no (...) (21 years ago, 28-Jun-03, to lugnet.technic, lugnet.robotics)

Message is in Reply To:
  Re: A better full adder!
 
(...) Not sure what you mean. If an output isn't producing any airflow, how do you invert that? BTW, I've been wracking my brains on this for several hours now, I can't figger out how you possibly could have built a full adder with only 3 pistons (...) (21 years ago, 27-Jun-03, to lugnet.technic, lugnet.robotics)

27 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR