[Jprogramming] bitwise not
David Ward Lambert
b49P23TIvg at stny.rr.com
Sun Sep 25 09:06:37 HKT 2011
Please what is the j notation for bitwise not?
Adverb b. is ingenious---I haven't figured out why negative m is useful.
On last-ditch effort I've reinvented the j notation:
bitwise_not=: (16 + #. 1 0 0 1)b. NB.(#.1 1 0 0 1)b.
The definition is non-obvious and should be considered for the
beginner's dictionary. There's a good chance I've overlooked
documentation.
These definitions are fun:
bnot0=: -. at x:&.#:
bnot1=: -.&.((8$2)&#:)
bnot0^:40 41]2324244 NB.removes most significant bits
0 1
bnot1^:40 41]2324244 NB.chose to retain a standard byte
20 235
More information about the Programming
mailing list