Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
OR gate that outputs smallest value?
Archive: 5 posts
Just wondering if it's possible to make something like an OR gate, that outputs a a value if provided with any number of values, but instead has the property of the AND gate and outputs the smallest input. Also, the signal must be constant, so the value must instantaneous change to the smaller input as soon as one is provided. | 2011-03-26 02:13:00 Author: SSTAGG1 Posts: 1136 |
you could try this. run an OR gate into the positive pole of a direction combiner, and run that out to one of the OR gate inputs. That will create a steady loop so it retains its current value. If you need a larger value, input that into the other OR gate input, since it will output the larger of the two, that will increase the value in the loop. To get the smaller value you will need to input the difference into the negative side of the direction combiner. If you have 5 and want it to be 3, you will need to input 2 into the negative pole of the direction combiner. RTM has some stuff about sampling values on his blog that may be able to help with sampling the value to perform the subtraction. | 2011-03-26 02:35:00 Author: tdarb Posts: 689 |
If you want to output the smallest value x, then 100-x will give you the largest value, which if run through an AND gate should be the dominant output. 100 minus that value will give you back your original. Of course this is assuming you don't need signed input. | 2011-03-26 03:09:00 Author: Thegide Posts: 1465 |
Which of { 0, 5, 30 } would you want to get from this gate? I hope you want 5, because if you want 0... that's an AND. & = AND | = OR ! = NOT !( X=0 & Y=0 & Z=0) & ( X = 0 & X ) & ( Y = 0 & Y ) & ( Z = 0 & Z ) If everything is not zero, then anything that is zero is changed to 100 while everthing else is left as is. It (should) return the lowest non-zero value. EDIT: No latency? Lemme think a moment. Well, a standard zero check (input -> positional sequencer covered in one battery -> not) is constant, but lags by one frame. | 2011-03-26 04:42:00 Author: Loius Posts: 342 |
Yeah, in your example, It'd be the 5. I meant this to output a value when any value was input (unlike the AND), but output the lowest input of the inputs that exist (so I'd just not use the 0 as a value, but when the 0 was added, it would go to zero). The constant signal is just that I can't have the value go to zero before adjusting. My initial problem was that I had a system which needed to reset to a variable value (determined by actions of the player). It could either reset either up or down, thus making the OR gate incapable since it would continue outputting the higher value. I'm not sure I understood your system, but what I was thinking of doing now was just ORing the value to 100, and then just ANDing it to the value I want. The change should be instantaneous. What I've set up works so far, so consider this question solved. Thanks for all the input. | 2011-03-26 08:07:00 Author: SSTAGG1 Posts: 1136 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.