Pathway Introduction: Information Technology

Download Report

Transcript Pathway Introduction: Information Technology

LMC Tricks
Common patterns
Single General Purpose Register
• "Features"
– Accumulator only stores most recent value
– Add/Subtract look for second value in memory
• Real world
– Processors have multiple registers
– Never enough for what you want to do
Single General Purpose Register
• Recipe:
– Any time you get a new piece of info, store it
• Input… store
• Calculate answer…store
– Sometimes you can skip, better safe
Order
• Subtraction must have first operand in
accumulator
• Recipe for X – Y:
– Make sure Y is stored in memory
– Input/Load X
– Subtract Y