Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Question about Algorithm

Archive: 17 posts


Is there a way to expand 2 values from 0-9 to a bigger amount who can be reverted back to this 2 values with an algorithm?


Example: value X value Y gets to a b c d and so on
2011-07-10 04:06:00

Author:
Katil92
Posts: 74


I don't understand. Can you explain again, perhaps with an example of what you are using it for?2011-07-10 12:26:00

Author:
Antikris
Posts: 1340


without more information no one can really give you any advice.

There are a number of ways you can do this as its basic addition and subtraction. Either use analogue addition and subtraction circuitry or use Binary addition and subtraction, i can teach you how to make both (for the latter i can just give you my set of binary arithmetic chips and teach you how to use them, for the former its a little more teaching intensive but much easier to make from scratch.)

why do you want to change these values anyway, and is there a reason for it to be set up as an algorithm?
2011-07-11 02:51:00

Author:
Epicurean Dreamer
Posts: 224


without more information no one can really give you any advice.

There are a number of ways you can do this as its basic addition and subtraction. Either use analogue addition and subtraction circuitry or use Binary addition and subtraction, i can teach you how to make both (for the latter i can just give you my set of binary arithmetic chips and teach you how to use them, for the former its a little more teaching intensive but much easier to make from scratch.)

why do you want to change these values anyway, and is there a reason for it to be set up as an algorithm?

it will be nice if you can teach me that I want to create an algorithm that increases the amount of number or decreases them without changing the source this means if i type in 10 it should give me 4 numbers like binary the only diffrent i want to have is that the numbers ar not 0 1 they can go up to 9 sure if i have an algorithm like this it will ggive everytime the same numbers out so after that i will reverse enginier it like typing the 4 numbers in to get 10 without loosing the source means that it should give everytime the right number 10 out i want to try creating something with this i have already created something that gives me out if number a is bigger smaller or equal to b yause i will use 2 number who i have to type in so the source wont get damaged
2011-07-11 05:45:00

Author:
Katil92
Posts: 74


Here is a spectacular tutorial on Signal Addition and Subtraction by the brilliant comphermc over at LBPlanetorials.


http://www.youtube.com/watch?v=6TCbjIm5kSo

Hope this helps!

2011-07-11 08:48:00

Author:
nunsmasher
Posts: 247


Here is a spectacular tutorial on Signal Addition and Subtraction by the brilliant comphermc over at LBPlanetorials.


http://www.youtube.com/watch?v=6TCbjIm5kSo

Hope this helps!



thx for that +1
2011-07-11 08:55:00

Author:
Katil92
Posts: 74


You can pass a value from one logic object to another and then interupt it - in order to change the receiving object's value - by streaming the signal through a node on a microchip. Enable the chip during transfer, disable it to break transfer and start modifying the receiver.2011-07-11 09:13:00

Author:
Antikris
Posts: 1340


what are the possible ways in lbp to divide 2 numbers?2011-07-11 17:45:00

Author:
Katil92
Posts: 74


2 operand division is tricky. I had a stab at it in theory over here (http://www.lbpcentral.com/forums/entry.php?2409-Analogue-Logic-5-Division-amp-Multiplication) though there are probably better methods utilsing geometric methods (pretty sure someone posted a multiplier working on those principles at one point, although I can't find it and you'd probably need to implement a reciprocal function if you wanted to extend that to handle division anyways)

If you just want to scale values by a fixed amount (i.e. halve signals etc.) then you caa make a specialist circuits, some of which are discused in the link above, others are discussed here (http://www.lbpcentral.com/forums/entry.php?2325-Analogue-Logic-4-Basics-of-Sampling-amp-Scaling)
2011-07-11 18:12:00

Author:
rtm223
Posts: 6497


it will be nice if you can teach me that I want to create an algorithm that increases the amount of number or decreases them without changing the source this means if i type in 10 it should give me 4 numbers like binary the only diffrent i want to have is that the numbers ar not 0 1 they can go up to 9 sure if i have an algorithm like this it will ggive everytime the same numbers out so after that i will reverse enginier it like typing the 4 numbers in to get 10 without loosing the source means that it should give everytime the right number 10 out i want to try creating something with this i have already created something that gives me out if number a is bigger smaller or equal to b yause i will use 2 number who i have to type in so the source wont get damaged

I have read your reply but I'm aboutto go out for the night not back till later on. I'll write a proper reply when i have more time. Cheers Dreamer.
2011-07-11 18:44:00

Author:
Epicurean Dreamer
Posts: 224


WHUUT LOL.

Seriously were still talking about LBP2 right?
2011-07-11 19:09:00

Author:
liamdaniels
Posts: 85


?
WHUUT LOL.

Seriously were still talking about LBP2 right?

yup ^^ and now here comes the next question omg am i a noob so much questions ;D how i can count up to 999999999 ? will this be possible ? lol i am using selectors for this at the moment but need them all as 1 number to work with -.-


?

yup ^^ and now here comes the next question omg am i a noob so much questions ;D how i can count up to 999999999 ? will this be possible ? lol i am using selectors for this at the moment but need them all as 1 number to work with -.-

now i will try it with timers and say if it worked ^^
2011-07-11 20:24:00

Author:
Katil92
Posts: 74


?

yup ^^ and now here comes the next question omg am i a noob so much questions ;D how i can count up to 999999999 ? will this be possible ? lol i am using selectors for this at the moment but need them all as 1 number to work with -.-
You can count up that far using 9 10-port selectors, where each selector cycles the next once it reaches the 10th port. If you wanted to add 100 million to whatever value the selectors currently held you'd simply cycle the 9th selector by 1, to add/subtract 10 cycle the 2nd selector appropriately and so on.

To encode the number directly as binary number you'd need a minimum of 30 bits, since 2^29=536870912 and 2^30=1073741824.

What are the exact sequence of operations in the algorithm you want to make?
2011-07-11 23:28:00

Author:
Ayneh
Posts: 2454


You can count up that far using 9 10-port selectors, where each selector cycles the next once it reaches the 10th port. If you wanted to add 100 million to whatever value the selectors currently held you'd simply cycle the 9th selector by 1, to add/subtract 10 cycle the 2nd selector appropriately and so on.

To encode the number directly as binary number you'd need a minimum of 30 bits, since 2^29=536870912 and 2^30=1073741824.

What are the exact sequence of operations in the algorithm you want to make?

i know how binary is but wont go on binary ^^ i know how it goes with selectors the only problem they bring with them self is dividing and multiplying gets trickyer then it is -.-

atm i want to encode to base 64 after that decoding ^^
2011-07-11 23:43:00

Author:
Katil92
Posts: 74


i know how binary is but wont go on binary ^^ i know how it goes with selectors the only problem they bring with them self is dividing and multiplying gets trickyer then it is -.-
If you wanted to divide by 2 using selectors you'd need to cycle down by half the number of the current port selected (depending which port 0 is I think this may complicate things though). Not sure if mulitplication by 2 will work or not if you cycled up by double the current port.

If you then did the same process again would you be able to divide by 4 and so on - dodgy handling of fractions aside?


atm i want to encode to base 64 after that decoding ^^
Is this going to be a Babylonian level?
2011-07-11 23:54:00

Author:
Ayneh
Posts: 2454


yup ^^ and now here comes the next question omg am i a noob so much questions ;D how i can count up to 999999999 ? will this be possible ? lol i am using selectors for this at the moment but need them all as 1 number to work with -.-

Check out my Simple Counter tutorial. Link in signature.
2011-07-12 01:15:00

Author:
Antikris
Posts: 1340


though there are probably better methods utilsing geometric methods (pretty sure someone posted a multiplier working on those principles at one point, although I can't find it and you'd probably need to implement a reciprocal function if you wanted to extend that to handle division anyways)

That multiplier you're thinking of might have been mine? I posted that on the LBP2 beta so you won't find it anymore. It should be possible to convert it to a divisor. I'll publish it if it'll help, but it sounds like Katil92 just wants scaling.
2011-07-12 10:04:00

Author:
Rogar
Posts: 2284


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.