CarbonCopy Posted January 3, 2013 Posted January 3, 2013 I understand that machine language ( and assembly ) is the only language that the computer understands. But, how is a microprocessor able to read these codes ?
zapatos Posted January 3, 2013 Posted January 3, 2013 (edited) It has been a while, but... Assembly is not machine language and therefore not understood by the machine. It must first be compiled or assembled into machine code to be used. Assembly is just much closer to machine code than, say, Java. Machine code is developed in conjunction with the microprocessor. Microprocessors can only read the machine code developed for that family of microprocessors, not for some other microprocessor family. A player piano analogy... The composer is the software developer The sheet music the source code The punch machine to create the piano roll is the compiler The piano roll is the machine code The player piano is the microprocessor The player piano can play the piano roll because that is what it was designed to do. It expects the holes in the paper to be formatted in a predetermined way. The piano reads the hole, which is simply an instruction to play a predetermined note. The microprocessor can read the machine code because that is what it was designed to do. It expects the instructions to be formatted in a predetermined way. The microprocessor reads the code which is simply an instruction to perform a predetermined action. Edited January 3, 2013 by zapatos 1
alpha2cen Posted January 3, 2013 Posted January 3, 2013 Basic programs are loaded in the Rom to do that work. When we turn on the computer, the loaded program do their job according to the assembly language.
mathematic Posted January 3, 2013 Posted January 3, 2013 Assembly language allows human being to write machine language. For example there could be an assembly language instruction "add", which then gets translated, to the appropriate bit pattern which is the machine language instruction, by the assembler.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now