MARIE simulator: multiplication of two numbers using addition -
multiplication of 2 numbers 6 , 3 by, repeatedly addition of 3 6 times,using loop add 3 6 times , store result accumulator.
input store x input store y loop, load x add multiply store multiply load y subt 1 store y skipcond 400 jump loop load multiply output halt x, dec 0 y, dec 0 one, dec 1 multiply, dec 0
Comments
Post a Comment