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=: -.@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


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to