Jump to content

The Calculator Project!


Recommended Posts

I've created a two-digit entry system that generates a number from 0 to 99 (using Stayputniks as counters) just by typing "00" through "99". Here's how it works:

1. The first key press generates the tens digit by simply retrieving 10x the number pressed, which isn't very hard. It drops clusters of ten Stayputniks and jettisons (with rockets!) every cluster that isn't needed. To keep part count down, I just have it drop clusters of ten rather than ten individual cores, but the logic would be the same if it were dropping individual cores.

2. The trick was coming up with logic for the ones digit (second number pressed) that drops 1x the number of Stayputniks requested on the second key press, regardless of what the first key press was. I finally figured out a way to do this using some clever toggle logic with two consecutive cargo bay doors.

Instructions for Use:

Just type your number with a reasonable pause between digits. No other keys or actions needed.

It works for all 100 numbers from 00 to 99, including repeated digits.

Craft file here.

Some pics showing the number 27 as an example:

Here's what the machine looks like before firing computation.

UKyVwJm.png

As the "2" key is hit, two clusters of ten Stayputniks are dropped while the others are rocketed far, far away.

5DXA5Rv.png

Then when the "7" key is hit, seven more Stayputniks drop to the ground for a total of 27 Stayputniks. Launch pad integrity not guaranteed for numbers below 30.

l4tnFlx.png

(BTW yes, all the Stayputniks survive the launch pad inferno. It's easy to modify the design slightly to make the rockets avoid hitting the pad... but what would be the fun in that?)

This version does not attempt to do any math, mainly for part count and time commitment reasons. This basic two digit entry machine is already 258 parts and took me a few hours. That said, I'm sure it could be done if someone wanted to take the time to do it.

Similarly, I expect this approach could be generalized to handle 3-digit and larger numbers, but the part count would quickly become intractible if the system needs to have individual Stayputniks. If poker chip-style markers are allowed (e.g. different probe cores for 1s, 10s, 100s, etc), I suspect the part count would only grow as O(log(n^2)).

Edited by Yakky
Link to comment
Share on other sites

Reposting my own spin from my Facebook post......dunno if I'm breaking the rules but the machine below consists of an "output" engine on the right being fed fuel via a Stayputnik. The Stayputniks have a very low max temperature of 1200 degrees....if both of the "input" engines to either side are ignited, and only both, then it will be destroyed and cut off the fuel supply to the output engine. This is a logical NAND gate, at which point you have Turing completeness. Unfortunately they're one-use-only, but they can certainly be used to construct a calculator circuit.

In a practical implementation the fuel tanks feeding the input engines would be replaced by fuel lines (signals) coming from other parts of the circuit, and the fuel line feeding the "output" engines would all go to one massive tank with enough fuel to handle the "propagation delay" of the entire circuit.

http://i.imgur.com/WwUtTJu.jpg

You could just activate infinite fuel, all cheat menu options are OK except for whack a kerbal if I read the rules correctly.

Link to comment
Share on other sites

Kabbacus 1024 + Binary to Decimal conversion

Ok, this is basically the same as my previous binary calculator except, I built it backwards and didn't feel like spending an hour fixing it. So, if you want to do math, it can still add and subtract just like the other one, but in reverse of the method I described. I won't go into another WOT on how to use it, read my previous post in this thread.

Anyway, this one has 2 new features. First, it can work with binary numbers up to 1111111111 or decimal 0 - 1023. The other feature is, it can show a decimal conversion of the binary number... but... it's a one shot deal. I could fix this to make it resettable but I'm up to 300+ parts and my machine doesn't like much more. So, feel free to take what's here and do your own resetting.

The way it does decimal conversion is, with batteries and control pods. If you look at the first image, you'll see the binary 1 and 0 column. Each 'cart' has a set of batteries on it. The total battery count for each row is shown on the left. You perform your calculations and your binary answer will be on the right side. To convert to decimal, you stage the machine which blows the radial separators under the end cart, essentially breaking the machine in half. With the batteries in the 0 column separated from the machine, the total battery count is the decimal conversion. Thus, your answer will be in your total electric charge.

Because I used a QBE control pod for the main controller, which has a battery reserve of 1, your answer will always be +1. Though you can tweak that out, if you don't have a power supply to probe cores, they eat batteries. So, no matter what, you have to supply power to them. Again, this is fixable to show the exact answer but I just didn't feel like spending the time to do so. The proof of concept is there.

Anyway, your binary calculator + decimal conversion. TaDaaaa...

binary5.jpg

Initial state reading all 0's

binary6.jpg

Carts moving after pressing keys 1,2,5,0

binary8.jpg

Explosive stage sepration or... hitting the = button.

binary7.jpg

Carts docked on the right with the answer.

binary9.jpg

And just so you know that's not a fluke, here's 10010100 = 148 decimal and there's 149 electric charge.

And the craft file.

Oh, and for those with some serious ambition, here's a binary abacus calculating the square root of ½

square_root_of_one_half.gif

Edited by Fengist
Link to comment
Share on other sites

This is so GENIUS! I don´t know what to say about it. Just eat your rep.

So, does this count as making a readable display tooooo????

I guess no. I think Upsilon wants it with lights or so.

Link to comment
Share on other sites

This is so GENIUS! I don´t know what to say about it. Just eat your rep.

I guess no. I think Upsilon wants it with lights or so.

You're probably right. This is a kinda cheaty display. And I was relatively pleased with the fact that it worked but it was more of a 'DUH!' moment than a stroke of genius. I was playing with a couple of the carts trying to transfer battery power back and forth (which doesn't work) and I had a 1 battery QBE on one and a 2 Battery Octo on the other. I kept watching the total charge jump from 1 to 3 as I'd undock them and they'd redock... so... it was a DUH...

And thanks for the rep guys. It's always handy when I torque off the mods, which I've done on occasion.

- - - Updated - - -

I'm thinking of an improved version of that...

By all means do so. This basic battery method would work with decimal as well but it would take a lot more 'carts' and a lot more planning to do so. And you'll need a more 'motive' force than docking port suction. I had to change some of the batteries around to reduce weight so they'd move on their own as well as shorten the travel path.

This could make a traditional abacus rather than a binary, but then again, you'd have the same problem I have with mine. You have to manually move carts based on which way another cart is being moved. Then again, that's how an abacus works. But, with enough carts or other switching methods, replicating a Soroban would be doable. A Suanpan, which can do hexidecimal, would be doable too, but lots more carts.

Edited by Fengist
Link to comment
Share on other sites

Sorry for not updating this thing recently. I'll do it a bit later today or tomorrow... whenever I have the time.

As for Fengist's calculator, I'm actually fine with having ElectricCharge (or some other resource displayed in the upper right) as the "readable display" for now. I think that making the numbers with lights (a lá LCD clock face) is probably possible, but it won't be easy at all. So the resources tab may be the closest that we'll ever get. I hope not, though; anyone want to take a crack at a lights-based readable display?

Some of these entries are astoundingly clever; I'm continually impressed by how awesome this Forum is. I'll have a lot of fun updating this.

...oh, and Kerdinand, would you mind PM'ing me your Calculator-Project signature badge so I can send it to the participants? The badge is absolutely awesome. Thanks. :)

-Upsilon

Link to comment
Share on other sites

Kabbacus 1024 + Binary to Decimal conversion

Ok, this is basically the same as my previous binary calculator except, I built it backwards and didn't feel like spending an hour fixing it. So, if you want to do math, it can still add and subtract just like the other one, but in reverse of the method I described. I won't go into another WOT on how to use it, read my previous post in this thread.

Anyway, this one has 2 new features. First, it can work with binary numbers up to 1111111111 or decimal 0 - 1023. The other feature is, it can show a decimal conversion of the binary number... but... it's a one shot deal. I could fix this to make it resettable but I'm up to 300+ parts and my machine doesn't like much more. So, feel free to take what's here and do your own resetting.

The way it does decimal conversion is, with batteries and control pods. If you look at the first image, you'll see the binary 1 and 0 column. Each 'cart' has a set of batteries on it. The total battery count for each row is shown on the left. You perform your calculations and your binary answer will be on the right side. To convert to decimal, you stage the machine which blows the radial separators under the end cart, essentially breaking the machine in half. With the batteries in the 0 column separated from the machine, the total battery count is the decimal conversion. Thus, your answer will be in your total electric charge.

Because I used a QBE control pod for the main controller, which has a battery reserve of 1, your answer will always be +1. Though you can tweak that out, if you don't have a power supply to probe cores, they eat batteries. So, no matter what, you have to supply power to them. Again, this is fixable to show the exact answer but I just didn't feel like spending the time to do so. The proof of concept is there.

Anyway, your binary calculator + decimal conversion. TaDaaaa...

http://www.datainterlock.com/Kerbal/binary5.jpg

Initial state reading all 0's

http://www.datainterlock.com/Kerbal/binary6.jpg

Carts moving after pressing keys 1,2,5,0

http://www.datainterlock.com/Kerbal/binary8.jpg

Explosive stage sepration or... hitting the = button.

http://www.datainterlock.com/Kerbal/binary7.jpg

Carts docked on the right with the answer.

http://www.datainterlock.com/Kerbal/binary9.jpg

And just so you know that's not a fluke, here's 10010100 = 148 decimal and there's 149 electric charge.

And the craft file.

Oh, and for those with some serious ambition, here's a binary abacus calculating the square root of ½

http://www.binaryabacus.com/square_root_of_one_half.gif

thats awsome!
Link to comment
Share on other sites

...The leaderboard has been updated. Let be know if everything is okay.

(I also sent out Kerdinand's badge to all of the people who have completed this challenge. I also placed it at the top of the original post. It's very cool. :))

...Seems the OP is a tad underwhelmed though.

On the contrary. I'm very nearly overwhelmed by both the quantity and quality of entries in this challenge so far, including yours. I'm giving some Reputation to both you and Kerdinand, as the two of you have really outdone yourselves since I last updated the leaderboard. Thanks for participating, and I look forward to what you'll come up with next!

-Upsilon

Link to comment
Share on other sites

I used to make calculators in minecraft.

*Racks brain*

On other news, this is such an interesting 'challange' which happens to be one involving working together!

---Edit---

I think I remember that adders were made up of 2 half adders that were made up of used 2 gates, AND and XOR.

So... that's what we need for large numbers.

Also had an idea for better 'data' transfere. Why don't we use landing legs do push solid objects through tubes.

Edited by burnoutforzai
Link to comment
Share on other sites

Really, the only limiting factor for a digital/electronic/logic calculator design here is the fact that there are no true detector parts in KSP... besides solar panels. Uncovering/obscuring those might work, somehow.

Link to comment
Share on other sites

  • 2 weeks later...

I love this, gals & guys!

You know what would make this stuff really incredible and totally automated? A proximity sensor. Take a look: http://forum.kerbalspaceprogram.com/threads/111519-Proximity-Sensor-For-Switching-Action-Groups

- - - Updated - - -

Really, the only limiting factor for a digital/electronic/logic calculator design here is the fact that there are no true detector parts in KSP... besides solar panels. Uncovering/obscuring those might work, somehow.

Genius! Why didn't I think of that!

Link to comment
Share on other sites

Hey, so I've designed the calculator on paper and have run numbers through it. It works in binary, which I hope isn't a problem, because that allows me to count up to bigger numbers. I'm about to build in KSP, thought I'd reserve a spot here.

-Built and tested, she works! I'll post an imgur album tomorrow, too tired, it's finals week, and I need to get back to studying xD

But I promise I'll post pics tomorrow. Here's the theory bit, to explain some:

This is a binary counter, so it counts in base 2. There is a long fuselage, with 9 landing legs on each side, parallel to each other. 1 is represented by a deployed landing leg, 0 is represented by a stowed landing leg. You have a row of "active" bits and a row of "imaginary" bits. The imaginary bits act the same as when you were a child doing math. Remember when you would do 9 + 5? 9 + 1 = 10, so you'd put a "1" over the next digit, the ten's place, and bring a 4 down to the one's place, since you had 4 left over from adding 9 + 1. You'd then bring the 1 above the ten's place down, thus giving you "14". Same concept. The second row of "imaginary" bits acts as the floating 1's above the 10's place in your early math days, just as binary instead.

The rules are:

1) You put in the first number you want to add, in binary. THEN, you start from the least significant bit and add upwards for each bit int he second number

2) If an active bit and an imaginary bit are "1" in the same vertical column, the next imaginary bit to the left becomes a "1" and the two bits that were active become "0"'s.

3) If there are no active bits below an active imaginary bit, then the imaginary bit comes down to the active bit, making the active bit a "1" instead of a "0". Else-wise refer to (2)

And when you run out of conversions / imaginary bit switches, heyo! You're done!

I probably over-complicated the wording, but that's how the calculator works xD. On the upside, it can add up to 512!

Edited by Indy
Link to comment
Share on other sites

  • 2 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...