68000 Assembly: Multiplying gives a weird result
<p>I have a question regarding the MULU instruction. One thing I've noticed is that suppose I have the value 000FFFFF in a data register. And then suppose I want to put in another F so that it contains 00FFFFFF. What I usually do is multiply the data register by 16 like so:</p>

<pre><code>MULU  #16, D4
</code></pre>

<p>And then I add another F by doing ADD instruction (so I get 00FFFFFF). But when I multiplied again on 000FFFFF, all the bits inside the data register end up going to zero (00000000). After that multiply, I will have 000FFFF0, and then the rest will follow. I still don't understand the reason for this. I looked up <a href="http://mrjester.hapisan.com/04_MC86/Sect04Part08/Index.html" rel="nofollow noreferrer">this example</a> and I feel that it should work. I also noticed that the Extend, Carry, and Zero bits all go to true if I simply add 1 to 000FFFFF</p>