user2111264
user2111264

Reputation: 1

Mips Help for Converting decimal into octal

I'm having trouble converting an input (decimal number) and converting into an octal and displaying that number, using MIPS. In the project, I have to use Masking, are there any good sample codes for this?

Upvotes: 0

Views: 1346

Answers (1)

markgz
markgz

Reputation: 6266

To mask out all but the bottom 3 bits of the number in $t0 use:

andi $t1,$t0, 0x7    # 0x7 is binary 0111

Upvotes: 0

Related Questions