how to convert high level language to machine code
Compile the code, then look at the .class file? At least for java, I know that the .class file holds byte code, not machine language
Java's byte code is not machine code. Also, this is posted in the OCW 6.00 area, which is a Python class, so not sure why high level has come into it. For an overview, read this: http://www.doc.ic.ac.uk/~ob3/Teaching/OperatingSystemsConcepts/Chapter05.pdf There is a nice set of definitions a few pages in that talk about a few ways to make and deal with machine code.
oops I should've been more clear.
Well, Java bytecode is closer to machine code. It is like a step away, rather than the several steps that the source file would be, and actually based on machine code. So it is really, really close but missing a few things, which is why you still need Java for the maachine to run it.
Right- byte code is universal across all operating systems, but the machine language is different for each one- which just requires a different version of the JVM if you're on a different computer. Though idk what byte code actually is.
Basically a machine code for the Java virtual machine that translates it into machine code for the computer.
Ah, so byte code was made by Java themselves
That byte code was. The byte code that Python uses in .pyc files is Python's byte code.
Yep... but it is one word, not two.
Oh, and I made the 2 word mistake in my first reply here. When I searched up to make sure I was speaking correctly (not making an assumption) I saw it was always bytecode, not byte code. Hehe.
you need to compile that high level programming language to convert it to machine language
Join our real-time social learning platform and learn together with your friends!