Home    LBP Showcase / Reviews / Recommendations    Object Showcase
#1

Fast Analog Multiplication

Archive: 6 posts


I just completed a signed analog multiplication chip. It takes two real number values between -1 and +1, multiplies them and spits out the answer as a signed real number between -1 and +1 in one or two cycles.
For example 0.2 (20%) * -0.5 (-50%) = -0.1 (-10%)

Anyone interested in it? I don't have it in a level or anything, but if you ping me I'll send it to you.

For those of you interested in the math...

Figuring this out consumed way too much of my time and brain. I determined that I could fairly easily divide one analog value by powers of three, then add or subtract or ignore those reduced values based on the base 3 representation of the second number. The idea hinged on being able to convert the second value into its base 3 repr, which turned out to be a little tricky. Since I wanted this to be fast and not require an enormous sequencer, I couldn't just convert it whole-sale. I was OK using a sequencer to determine one "trit", but sequencers are slow so that part had to be done in parallel for all the "trits". I thought the key was going to be taking the number mod 1/3, the tripling for each digit. Unfortunately, there really isn't a way to get the discontinuity required by MOD. When I got stuck I also explored basic binary, but it had the same problem.

Ultimately I discovered I didn't really need the sharp rise of MOD (/|/|/|/|)... instead I could use a triangle wave (//), which is much easier to obtain given LBPs reflecting around -1/+1 and absolute value operations. Any time the trit ended up having the middle value, flipped all the subsequent additions or subtractions. Given another middle value, just flip the rest back.

So ultimately I ended up with an equation something like this:
B/2 + A[1]*B/3 + A[2]*B/9 + A[3]*B/27...
where B is the raw analog value and A[n] is the nth digit in the ternary representation, using -1, 0, & 1.

Seems to work pretty well!
2011-09-25 04:32:00

Author:
larryjoe701
Posts: 68


Great job larryjoe701. I don't really have a need for this tool, but I did want to say this is very impressive. My hat's off to you. 2011-09-25 04:42:00

Author:
RickRock_777
Posts: 1567


Very nice! If you dont mind, I really want this

My psn is: Links_r_us
2011-10-01 04:20:00

Author:
Unknown User


Cool, I'd be interested in having a look at it.

PSN ID is same as username.
2011-10-02 16:14:00

Author:
Ayneh
Posts: 2454


!#&"&% trit trit "#&2011-10-09 00:44:00

Author:
BasketSnake
Posts: 2391


I've been wondering if multiplying analogues fast were possible... I'm interested on it.

My PSN ID: SebasSBM.
2011-11-07 10:07:00

Author:
SebasSBM
Posts: 159


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.