'Using binary numeric constants in MIPS asm source code?

On the process of learning Assembly i got one question

If i do the following:

la  $a1, 0x3f 

The number 63 is loaded into a1.

And if I use a constant without a leading 0x it's decimal, giving the same result:

la  $a1, 63

But how can I handle binary? Lets say

la  $a1, 00111111

How can MIPS understand that 00111111 is the number 63 in binary?



Solution 1:[1]

Binary literal constants are not typically supported. What assembler are you using? If it supports C style preprocessing, there are several options available.

Here is one example.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kevin Coffey