As Jos said, there are the bitwise operations. There's even an operation to pick out an arbitrary range of bits.

http://docs.racket-lang.org/reference/generic-numbers.html#(part._.Bitwise_.Operations)

I have used these bitwise operations to in my Racket consulting work recently, for data conversion of technical data from a cool embedded system.

There are some esoteric bit-twiddling tricks that C can do faster, but few people actually know how to do those and have a need.

In addition to the bitwise operations, it's helpful to know that "number->string" has an optional radix argument, and that the reader supports integer literals in binary like "#b1011".

--
http://www.neilvandyke.org/
_________________________________________________
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/users

Reply via email to