Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 16 Online
OpenStudy (anonymous):

how to convert high level language to machine code

OpenStudy (woodrow73):

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

OpenStudy (anonymous):

Try this out :) http://gcc.gnu.org/java/

OpenStudy (e.mccormick):

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.

OpenStudy (woodrow73):

oops I should've been more clear.

OpenStudy (e.mccormick):

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.

OpenStudy (woodrow73):

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.

OpenStudy (e.mccormick):

Basically a machine code for the Java virtual machine that translates it into machine code for the computer.

OpenStudy (woodrow73):

Ah, so byte code was made by Java themselves

OpenStudy (rsmith6559):

That byte code was. The byte code that Python uses in .pyc files is Python's byte code.

OpenStudy (e.mccormick):

Yep... but it is one word, not two.

OpenStudy (e.mccormick):

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.

OpenStudy (masumanwar):

you need to compile that high level programming language to convert it to machine language

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!