View Single Post
Old Nov 30th, 2006, 11:16 PM   #6
The Dark
Expert Programmer
 
Join Date: Jun 2005
Posts: 894
Rep Power: 4 The Dark is on a distinguished road
From this code:
        li $v0,5	       #reads in an integer
	syscall
	#move $a0,$v0
From looking at the web it looks like result ($v0) is already an integer.

If it is an integer, then you already have the binary.

To get the individual bits out, it is just a matter of using "and"s and bit shifting calls.

You don't really need to extract the bits and put them in an array and then compare them, you could just extract them and compare them as you go.

Caveat: I've never done any MIPS assembly, so this is all an educated guess.
The Dark is offline   Reply With Quote