Is it possible to implement bitwise operators using integer arithmetic?

First solutions for shifting (shift is the shift distance, must not be negative, a is the operand to be shifted and contains also the result when done). The power table is used by all three shift operations. // table used for shift operations powtab = { 1, 2, 4, 8, 16, 32, 64, 128, 256, … Read more

Haskell or Standard ML for beginners? [closed]

Much as I love Haskell, here are the reasons I would prefer SML for a class in discrete math and data structures (and most other beginners’ classes): Time and space costs of Haskell programs can be very hard to predict, even for experts. SML offers much more limited ways to blow the machine. Syntax for function … Read more