When you are asked to hand compile into assembly language, are there multiple correct answers? For example, in https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-004-computation-structures-spring-2017/c11/c11s3/compilation_answers.pdf, can you get the correct solution even if your solution doesn't match the solution given?

有帮助吗?

解决方案

Yup. There are multiple sequences of assembly instructions that all do the same thing. (For instance, one trivial way to see this is to notice that you can insert a no-op instruction anywhere.) They might not all be equally good, but they'd all be correct.

许可以下: CC-BY-SA归因
不隶属于 cs.stackexchange
scroll top