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

Binary to decimal help (double dabble)

Archive: 4 posts


Ok, I did something dumb. I am using a binary storage system for my score in a level, but that's not the dumb part.

The dumb part is that I based it on a 14 bit number, and realized after the fact that the number range is too low and I actually need a 16 bit number.

Now fixing the binary is fine. I just add two more bits and that is ready to go.

The issue is my binary to BCD conversion. Is there an easy way to add two bits to a an existing double dabble (http://en.wikipedia.org/wiki/Double_dabble), or will i have to rewire the whole thing? It's been a while since I wired this up so I am a bit rusty on it.
2011-08-14 18:32:00

Author:
tdarb
Posts: 689


I think SliverScrop91 or comphermc did a totourial on this. I'm not sure though, check out their channels.2011-08-14 20:21:00

Author:
zzmorg82
Posts: 948


Thanks. I ended up just going back and rebuilding it. It had that annoying bug where the wires crisscrossed when it was closed anyway.

I was just trying to be lazy and see if there was a way to do it without rewiring everything.
2011-08-14 22:16:00

Author:
tdarb
Posts: 689


What I ended up doing is building one much bigger than I'll ever need and wiring up from LSB upwards till i hit MSB then deleting the unused bit width from the cascade up the hierarchy. Bit of a pain. I do believe there is a pretty simple way of adding more width but I've (also) been to lazy to sit down and memorize how this is done

I recon its as simple as adding a new set of cascade with the usual carry linked up to the MSB ~> LSB for each set of 4 over on the MSB side of the set.

To be fair though, I'm really beginning to move away from Binary and into the deeper realms of using the floating point to carry out arithmetic in lbp. It can get flaky with really low numbers (very small or very large) but using N*3 keeps it very accurate down to a granularity that's usable for pretty much any realistic situation, especially if you forgo using timers as analogue registers and manipulate the signal using pulse gates, J-K flip-flops/samplers/feedback loops to store integers e.t.c. The only real issue is getting a true readout as there isn't currently a completely accurate signal probe in lbp yet.
2011-08-15 07:26:00

Author:
Epicurean Dreamer
Posts: 224


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.