hi i am a beginners in mips and we're given a homework to convert binary string into decimal
Objective: Introduce student to MIPS programming and the use of MIPS operations.
Weight: This assessment will be worth 3% of the whole course.
Due Date: April 16th 2011.
Main Task: Design and Implement a MIPS program that will convert a binary string into decimal.
Criteria
1. Prompt user to input a binary string of no more that 8 bits.- 10 pts
2. Verify if user input was all binary.(Prompt again if entry was wrong) - 30pts
3. Should contain at least 1 function. -10 pts
4. Should be commented to explain purpose of instructions. -10 pts
5. Calculate and display the correct answer for the user. - 40 pts
this is my code and i am so confused i really need help pls tell me what to do step by step because this is very hard for me as a beginner
.text
.align 2
# Let X be a binary number, n digits in length, compose of bits X n-1
#Let D be a decimal number
#Let i be a counter
main: li $v0, 4 #code for print string
la $a0, prompt #load address of prompt into $a0
syscall #print the prompt message
la $t3, True
lw $t5, 0($t3)
la $t3,False
lw $t6, 0($t3)
li $v0, 8 #code for read strings
la $a0, binary #addr of buffer (binary)
li $a1, 9 #size of buffer (1 byte)
syscall #
Comments
Leave a comment