### Author Topic: Hash  (Read 4567 times)

0 Members and 1 Guest are viewing this topic.

#### Freyaday

• The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
• LV10 31337 u53r (Next: 2000)
• Posts: 1970
• Rating: +128/-15
• I put on my robe and pixel hat...
##### Re: Hash
« Reply #15 on: April 20, 2011, 08:09:40 pm »
Ashbad, that's wonderful advice...except we're dealing with 32bit ints here, not 16. Sorry. Thanks for the tip, though!
Also, because Axe recognizes constants, I don't think it really matters how you represent 2^15.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names

I'm a performer at heart; I stole it last week.
My Artwork!

#### Ashbad

• Guest
##### Re: Hash
« Reply #16 on: April 20, 2011, 08:35:57 pm »
Well, for 32 bits, its only a little bit more complex -- basically, you chain the shifts the carry of one isn't added to that word, but the next one, and then the second word's carry is added to the first.  Here is what I mean, in the form of a modified right shift:

Code: [Select]
A^2 -> FA/2 -> AB^2 -> GB/2 + (2**15 * F) -> BA + (2**15 * G) -> A
As you can see, when you extend the bit number in most operations, you just have to split them into different word groupings and chain them to together

EDIT: I just had to change the bits to inverse then add
« Last Edit: April 20, 2011, 08:38:18 pm by Ashbad »

#### Freyaday

• The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
• LV10 31337 u53r (Next: 2000)
• Posts: 1970
• Rating: +128/-15
• I put on my robe and pixel hat...
##### Re: Hash
« Reply #17 on: April 20, 2011, 08:38:21 pm »
Ashbad, umm, I don't think that's gonna work.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names

I'm a performer at heart; I stole it last week.
My Artwork!