Answer:
Code is given below:
Explanation:
.data
str1: .space 20
str2: .space 20
msg1:.asciiz "Please enter string (max 20 characters): "
msg2: .asciiz "\n Please enter string (max 20 chars): "
msg3:.asciiz "\nSAME"
msg4:.asciiz "\nNOT SAME"
.text
.globl main
main:
li $v0,4 #loads msg1
la $a0,msg1
syscall
li $v0,8
la $a0,str1
addi $a1,$zero,20
syscall #got string to manipulate
li $v0,4 #loads msg2
la $a0,msg2
syscall
li $v0,8
la $a0,str2
addi $a1,$zero,20
syscall #got string
la $a0,str1 #pass address of str1
la $a1,str2 #pass address of str2
jal methodComp #call methodComp
beq $v0,$zero,ok #check result
li $v0,4
la $a0,msg4
syscall
j exit
ok:
li $v0,4
la $a0,msg3
syscall
exit:
li $v0,10
syscall
methodComp:
add $t0,$zero,$zero
add $t1,$zero,$a0
add $t2,$zero,$a1
loop:
lb $t3($t1) #load a byte from each string
lb $t4($t2)
beqz $t3,checkt2 #str1 end
beqz $t4,missmatch
slt $t5,$t3,$t4 #compare two bytes
bnez $t5,missmatch
addi $t1,$t1,1 #t1 points to the next byte of str1
addi $t2,$t2,1
j loop
missmatch:
addi $v0,$zero,1
j endfunction
checkt2:
bnez $t4,missmatch
add $v0,$zero,$zero
endfunction:
jr $ra
Answer:
The option that is best described as a way engineers can test and investigate how things should be under certain circumstances is;
Explanation:
Modeling is a tool an engineer can use for the physical representation of a system that will facilitate the definition, testing and analysis, communication, data generation, data verification and data validation of given concepts
Models also aid in setting specifications, supporting designs, and verification of a given system
Therefore, with modeling engineers can investigate the behavior of systems under given environmental conditions.
Do you have a picture of the question?
Answer:
When the expenditure increased, then the consumer's expenditure is increased to Rs.150 and when the price falls of the good it becomes Rs.5. Then, Good X will be Rs.10.
last question:If the Good X falls by 20%, then, it will be Rs.2, and according to his demand 100 units will be equal to Rs.200.
cause if one unit=rs.2, then 100units=100×2=200.
A. Physical I/O sensors
Safety switches, operator inputs, travel limit switches etc