[plt-scheme] BitField
Got it. :)
Great! Thanks.
Jens Axel Søgaard wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> Paulo Jorge O. C. Matos wrote:
>
>> I have to check out your references. No, I saw the bitwise operations
>> but I also tried to implemented SHA-1 hashing algorithm that uses alot
>> of shifts, etc. How do you manage to do a shift with the bitwise
>> operations available?
>
>
> Shifting is done with arithmetic-shift.
>
> Rotation is done like this:
>
> /(define (word<<< n s)
> // (bitwise-ior (arithmetic-shift n s) //
> (arithmetic-shift n (- s 32))))/
>
> The <<< notation was chosen in order to mimic the notation of the MD5 RFC.
>
--
Paulo J. Matos : pocm(_at_)mega.ist.utl.pt
Instituto Superior Tecnico - Lisbon
Software & Computer Engineering - A.I.
- > http://mega.ist.utl.pt/~pocm
---
Yes, God had a deadline...
So, He wrote it all in Lisp!