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

Best way to compare percentages

Archive: 5 posts


When comparing, people usually use sequencers, but they are fundamentally flawed as they convert value to output takes a tick to calculate, but using this method, you won't have to worry about that!

Instead of a sequencer, you use an OR gate, and here's why

If you haven't considered it, what happens when you put in 2 identical percents to an OR gate, but different signs? It must decide somehow right?, well it DOES, and thank MM that they programmed it to choose the priority of the uppermost port, cause this way if you distinguishably separate the percentages before (compare, + and comparee, -) then you can have instant analogue comparison

Now that it has all been said, lets convert that to english

If I put +1 in the top of an OR gate and -1 in the bottom, then the output is +1, but if I reverse order (-1 top, +1 bottom) then you get -1 output

"GREAT SO USEFUL, just kidding amiel445566, this sounds like nonsense still"

What this means is, it can tell if you input a signal greater than or equal to the bottom!

For example, if you are trying to make a greater than or equal to circuit all you have to do is put the |top signal| into the top input of an OR gate and -1|bottom signal| in the bottom input of an OR gate and you will have the a splitter do the work for you!

The only 3 things to be cautious about when doing this is

1. Make sure that it is 100%

You need to make sure that the output isn't something like 4% if you are comparing 4% and another number, so scale accordingly to your choosing

2. Realize this has no digital connections

The ON wire function has no relation to the calculation, and it is a mistake to use that, because it will not make your logic function correctly

3. Function is kind of limited

Since this is all non-digital based, then using it to activate strictly digital things is impossible without ADC (analogue digital conversion) so to do this, use the positional sequencer method to detect a signal is present then activate

"WHY NOT JUST USE DIGITAL COMPARING AMIEL445566?!"

Cause you can compare with analogue comparing instantly so it can be static latency, and not compound latency (I.E 1 tick latency per digit in a probe with digital comparing, or just 1 tick, no matter the amount of digits)

AND remember, there are other ways to use the OR functionality to compare, like doing subtraction BEFORE the OR gate to ensure analogue 100%

I hope this helped you compare like a PRO!
2014-08-16 07:23:00

Author:
amiel445566
Posts: 664


Can you show a visual of this, I'm slightly confused.2014-08-16 16:40:00

Author:
Darthvadre11
Posts: 134


When you say the bottom and top, do you mean when the gate's output is to the right? I feel like I need the right hand rule for this.2014-08-16 17:12:00

Author:
Tynz21
Posts: 544


Here are some examples (red= -, and white +)

Assume all percentages are the same
http://i8.lbp.me/img/ft/0d8e9849253d24af80603e0439e8d02fa4ba2e07.jpg
This is an example where the output is positive
http://if.lbp.me/img/ft/1efe09d72018765010be0c5d1c725a0ce1a7421a.jpg
This is an example where the output is negative
http://i5.lbp.me/img/ft/905910ad30bcedd93763cf4125798ecbe3ddf619.jpg
This is an example of a = to circuit
2014-08-16 20:03:00

Author:
amiel445566
Posts: 664


OK, that's what I thought thanks!2014-08-17 13:56:00

Author:
Tynz21
Posts: 544


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.