In my Computer Science II class, the professor considers ++,–,*=, etc. to be 2 operations. However, at the Assembly level this is not really two operations. Can someone explain or is this just for the sake of simplicity?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d actually consider it to be 3 operations: read, increment (or whatever), write. That’s assuming it’s reading from some sort of shared memory into some sort of local storage (e.g. register or stack), operating on the local storage, then writing back.
How many operations it is at assembly level will depend on what you’re incrementing, the platform, the hardware etc.