Sponsored links: Algebra eBooks ### The Maxima on-line user's manual

Algebra Calculator

#### Search: #### Ibase

-- Option variable: ibase Default value: 10

`ibase` is the base for integers read by Maxima.

`ibase` may be assigned any integer between 2 and 36 (decimal), inclusive. When `ibase` is greater than 10, the numerals comprise the decimal numerals 0 through 9 plus letters of the alphabet A, B, C, ..., as needed to make `ibase` digits in all. Letters are interpreted as digits only if the first digit is 0 through 9. Uppercase and lowercase letters are not distinguished. The numerals for base 36, the largest acceptable base, comprise 0 through 9 and A through Z.

Whatever the value of `ibase`, when an integer is terminated by a decimal point, it is interpreted in base 10.

See also `obase`.

Examples:

`ibase` less than 10.

```          (%i1) ibase : 2 \$
(%i2) obase;
(%o2)                          10
(%i3) 1111111111111111;
(%o3)                         65535```

`ibase` greater than 10. Letters are interpreted as digits only if the first digit is 0 through 9.

```          (%i1) ibase : 16 \$
(%i2) obase;
(%o2)                          10
(%i3) 1000;
(%o3)                         4096
(%i4) abcd;
(%o4)                         abcd
(%i5) symbolp (abcd);
(%o5)                         true
(%i6) 0abcd;
(%o6)                         43981
(%i7) symbolp (0abcd);
(%o7)                         false```

When an integer is terminated by a decimal point, it is interpreted in base 10.

```          (%i1) ibase : 36 \$
(%i2) obase;
(%o2)                          10
(%i3) 1234;
(%o3)                         49360
(%i4) 1234.;
(%o4)                         1234```

```(%o1)                                true
(%i2) ```

### Related Examples

ibase:4;

x=0;

Calculate

ibase:5;

456;

ibase:20;

Calculate

obase:12;

ibase:12;

18*0a;

Calculate

z10:10;

z11:11;

ibase:z11;

Calculate

ibase : 16;

x:0a;

Calculate

ibase : 16;

aa:a;

ab:a;

Calculate

? ibase;

Calculate

##### ibase-obase

ibase:16;

obase:10;

0004DE2668D0D984EC0DE...

Calculate

ibase:5;

456;

Calculate

##### ibase

ibase:4;

x=4;

Calculate 