Modify the simulator so that it includes the jump instruction. Test your work with the following program. The first instruction jumps to the instruction at address 2, so on the second cycle your simulator should print an ALU output of 15, not 14.

0 0 0 0 1 0    0 0 0 0 0    0 0 0 0 0    0 0 0 0 0  0 0 0 0 0  0 0 0 0 1 0
0 0 0 0 0 0    0 0 1 1 1    0 0 1 1 1    0 0 0 1 0  0 0 0 0 0  1 0 0 0 0 0
0 0 0 0 0 0    0 0 1 1 1    0 1 0 0 0    0 0 0 1 0  0 0 0 0 0  1 0 0 0 0 0

Recommended Answers

All 3 Replies

I really need help with this

Is that binary supposed to mean something?

Because it means diddly-squat to us.

Perhaps you should read the instruction encoding manual for whatever processor you're using (real or simulated).

This is what I decoded from it

Jump $2

Add $7 := $7 + $2

Add $8 := $7 + $2

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.