El

The I Function: Decode (Base Value )

Monadic (One-Argument) Form

There is no monadic form.

Dyadic (Two-Argument) Form: Decode AIB

The decode function result is the value of argument B expressed in the number

system specified by argument A. For example, to convert 1776 to its value in the

decimal number system (base 10):

1. 0 1. 0 :I. 0 :I. I1 .I. :I. ‘7 ‘7 6

Y.7’76

The following illustration shows how it was done:

Argument A (number system) specifies the following:

I

10 10 10 10

-Ten units in each of these positions

equals one unit of the next position

to the left.

Argument B is a vector with these values:

1776

The result is the same as doing the following:

6= 6 The units position always represents itself.

700 \The value in the next position is multiplied

7 x10 = 70

7 xlOxl0 =

I x10x10x10= 1000 by the rightmost value in argument A.

1776

The value in the next position is multiplied

by the two rightmost values in argument A,

and so on.

-\

The arguments must be numeric. If one argument is a scalar or single-element array,

the other argument can be a scalar, vector, or other array. The result will have the

rank of the larger argument minus one.

96

The I Function: Decode (Base Value )

Monadic (One-Argument) Form

There is no monadic form.

Dyadic (Two-Argument) Form: Decode AIB

The decode function result is the value of argument B expressed in the number

system specified by argument A. For example, to convert 1776 to its value in the

decimal number system (base 10):

1. 0 1. 0 :I. 0 :I. I1 .I. :I. ‘7 ‘7 6

Y.7’76

The following illustration shows how it was done:

Argument A (number system) specifies the following:

I

10 10 10 10

-Ten units in each of these positions

equals one unit of the next position

to the left.

Argument B is a vector with these values:

1776

The result is the same as doing the following:

6= 6 The units position always represents itself.

700 \The value in the next position is multiplied

7 x10 = 70

7 xlOxl0 =

I x10x10x10= 1000 by the rightmost value in argument A.

1776

The value in the next position is multiplied

by the two rightmost values in argument A,

and so on.

-\

The arguments must be numeric. If one argument is a scalar or single-element array,

the other argument can be a scalar, vector, or other array. The result will have the

rank of the larger argument minus one.

96