Can you write a verb br which returns the binary representation of y without 
using #: or #. ?

  br 0
0
  br 2
1 0
  br i. 5
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
  br _13
|domain error: br
|       br _13

An inverse I like is

  bv =: (2 p.~ |.)"1 :. br

  bv br i. 5
0 1 2 3 4
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to