With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
Since there is a register (accumulator) that stores the previous sum from the ALU you can check if the result gives a negative, positive, or zero number then with that you can add a new opcode that checks that state and jumps if the condition is true.for example4 - 10 = -6 -> -6 is negative so any branch command with the N bit set to 1 would jumpassembly: BRN RA This would branch on negative to location stored in Abinary assuming opcode is 1000: 10001000Where this is the bit breakdown of the opcodeBR: 1000N: 1 | 0Z: 1 | 0P: 1 | 00: 0 | 0Also if you want to make it more versatile you can try adding the ability for B to set the bus value then the last bit '0' could be for A or B as 0 or 1 respectively.
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.