This is my code for printing just the mantissa of a floating point. The value stored in $t1 is the value 0xBEDCFFFF, which has a mantissa of 10111001111111111111111. My code prints this without the one in the beginning. How do I write the clause to input a hidden bit of one or zero when it is necessary?
li $t4, 1 # Reset counters
li $t3, 23
mantloop: # Loop to mask and print each bit
ble $t3, $t4, finish # escape clause
subi $t3, $t3, 1 # subtract from the counter
srl $t2, $t2, 1 # shifting mask
and $t0, $t1, $t2 # ANDing registers
bnez $t0, printOneee # Print one or zero
printZerooo:
li $v0, 1
li $a0, 0
syscall
j mantloop # loop reset
printOneee:
li $v0, 1
li $a0, 1
syscall
j mantloop # loop reset
finish: # method complete