According to the table in the Dictionary, you would want the bitwise version of -. y, which is (26 b.)
Your 25 b. (or 24 b. or 27 b.) would also work as a monad, since x is taken to be 0. Henry Rich On 9/24/2011 9:06 PM, David Ward Lambert wrote: > 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 > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
