r/AskComputerScience • • Apr 25 '21

Does all programming turn into machine code?

I don’t know if this question makes sense but when you write code in whatever language, python, C, Java etc does it all eventually get converted into assembly and then machine code?

35 Upvotes

32 comments sorted by

View all comments

1

u/newytag Apr 28 '21

Not all code gets executed on a machine. I'm sure there's lots of code snippets on GitHub that have never been run and hence never been turned into machine code.

But any programming code that wants to be executed on a machine, needs to be machine code at some point. When that happens depends on the language and environment used.

Assembly is essentially machine code in a human-readable format, so it is not necessary and usually not included as a step.