answersLogoWhite

0


Best Answer

Machine language is all binary numbers, and will vary on different architectures. For example, on a 32 bit processor, instructions will come in the form of a sequence of 32 "1"s or "0"s, where maybe the first 5 tell the CPU which instruction is being performed (add, subtract, load memory into register, load register into memory, etc), if you are adding maybe the next 5 bits means register $eax, the next 5 bits could be register $ebx.

The actual instruction will look something like: 01101001011010001100110011001100

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

To humans, machine language is imagined as being a sequence of binary digits. The symbols we use to represent these digits are actually immaterial -- any two symbols will do -- however the digits 0 and 1 or notationally convenient as they allow us to treat computer code as a base 2 (binary) number and thus perform binary arithmetic and logic at the same level as the machine itself. Binary codes are also easily converted to and from base 4, base 8 or base 16 (or indeed any base that is itself a power of two), thus providing us with convenient shorthand notation that keeps us close to the machine level without being overly abstract. We can also convert to and from other non-binary bases, including base 10 (decimal), however these conversions add a much greater level of abstraction that takes us much farther away from the actual machine code. Nevertheless, humans "compute" numbers much more easily and naturally in base 10 than in base 2 and we're not always concerned with how the computer physically represents those values. But when we are, we must use the machine's "natural" language.

The computer, however, has no notion of numbers. They may be called digital computers, but the digital notion is only in how we humans perceive the instructions and data that make a computer perform the tasks we wish it to perform. The computer has no real intelligence of course -- it is just a machine. A complex machine but a machine nonetheless. It is not possible to say what the machine's instructions "look like" to the machine. That would be like asking what the state of a light switch would look like to a light bulb. The switch is either on or off and the bulb simply behaves accordingly.

The best way to think of a computer is as a machine that can be configured, where each configuration instructs the machine to perform a very specific but very minute amount of work, such as moving the contents of one CPU register into another register. These individual configurations may be extremely primitive, but when millions upon millions of such configurations are switched every second, some of which will result in a choice between two possible configurations depending on the result of the current configuration, we give the machine the illusion of intelligence. In reality it's just doing exactly what we told it to do, just as we tell a light bulb to light up by throwing a switch.

Inside the computer there are CPU registers which we can think of as being banks of switches. By setting these switches on or off we are configuring the computer, essentially telling it which specific task we wish it to perform at that moment in time. This, in turn, engages the appropriate circuitry to perform that particular operation.

The most important register is the instruction register (IR) which stores the current instruction. If we wish to invoke a move instruction, we place the instruction's opcode in the IR. If we assume the opcode is 88 decimal, that translates to the binary value 01011000. In other words we turn switches 3, 4 and 6 on and turn the rest off. The computer now knows it must perform a move instruction.

Of course the CPU registers are not a bank of switches that we can simply turn on and off like light switches. They are in fact an array of cells where each cell consists of a capacitor and a transistor. The capacitor can be rapidly filled or drained of a small electric charge by the transistor. Thus the transistor provides the means to switch the state of the capacitor which thus determines the state of the cell (on or off). However, a capacitor cannot hold its charge for very long thus in order for the computer to "remember" the state of its registers (as well as its RAM -- the working memory, caches and other volatile memory), those transistor must refill all filled capacitors before they drop below a certain level. Hence we have a refresh cycle that maintains the machine's state between each new configuration.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Machine language is the computer instructions in memory--the actual bits used by the machine hardware or microcode interpreter. To "look" at it, it has to be converted to a human-readable form. Often, it is printed as a sequence of hexadecimal numbers, usually tagged with the memory address. Sometimes it is processed by a disassembler program, which tries to translate the code into assembly language instructions and data. This is not always successful since in machine architectures that mix data and instructions, it can be difficult to determine which program areas are data and which are instructions.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

a stream of binary numbers

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does a assembly language code look like?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What would a wait for input command in Assembly look like?

It would look like a line of assembly code!


Why is assembly language efficient?

Assembly uses commands you can begin to understand, like JSR (Jump to subroutine which changes points in a code) machine code on the other hand is the code that the machine reads. This would only look like numbers to you, probably in hex code. Basically the higher level a language is the easier to understand because of the level of abstraction. It goes, machine code, assembly language, then things like C then java or visual basic. In VB you can write commands almost the same as you would construct an English sentence, the compiler then converts this down to machine code which the processor can understand and execute. Got it?


Examples of machine language?

Machine code is the ONLY example of machine language. However, every machine architecture has its own version of machine code; it is the native language of the machine. If you want to examine machine code upon your own machine, use a hex editor. This will show you every byte of the code in hexadecimal form.


What Is The Java Enum And What Is It Used For?

The best way I can describe an enum is a class of Java language. Enums look like they are used in code string when writing a website.


What are examples of machine level language?

Machine language is nothing but numeric codes. Because humans have a difficult time remembering numeric codes, manufacturers of microprocessors create mnemonics; these sets of mnemonics are called assembly language. Each processor family has its own set of mnemonics, or assembly language, so assembly for the Intel processor used in many PCs is different from the assembly for a Motorola processor. In fact the assembly for different processors made by the same manufacturer will have assembly that differs, sometimes by a little, sometimes significantly. A quick example of one type of Motorola assembly, to clear 10 32-bit memory locations might look like this: movea #$6000,ao move.l #10,d7 10$ clr.l (a0+) subq.l #1,d7 bne.s 10$ rts

Related questions

What would a wait for input command in Assembly look like?

It would look like a line of assembly code!


What is difference between machine code and assembly language?

Machine language is the actual instructions in computer memory that are fetched into the processor and executed. It is directly executable and consists of what look to most human beings like a bunch of hexadecimal numbers, though a few geeks such as myself can tell it is code instead of numbers. For example, the instructions executing interrupt 21, service 10, are: B410 CD21 Assembly language is a human readable as mnemonics, it translates on a one for one basis into machine language. The computer cannot execute assembly language directly, but human beings who are trained can understand it. The assembly language equivalent of the above instructions is: MOV AH,10 ; prepare for service 10 by putting 10 into AH INT 21 ; vectors into code established in the interrupt table


Why is assembly language efficient?

Assembly uses commands you can begin to understand, like JSR (Jump to subroutine which changes points in a code) machine code on the other hand is the code that the machine reads. This would only look like numbers to you, probably in hex code. Basically the higher level a language is the easier to understand because of the level of abstraction. It goes, machine code, assembly language, then things like C then java or visual basic. In VB you can write commands almost the same as you would construct an English sentence, the compiler then converts this down to machine code which the processor can understand and execute. Got it?


Compare the assembly language with machine language?

Assembly language is 1 step above machine language. In assembly language you can use mnemonics to represent what you want to do. For example, to compare two numbers together I could represent the sequence as:L R1, Value1 load the first valueC R1, Value2 compare against the second valueJG First first value greater than secondAs you can see, there is some symbology here that allows me to determine what the program logic is doing. Note that the above code is not understandable to a computer circuit; it has to be translated to machine code. And that is what assembly code is; a symbolic human representation of what the machine is supposed to do.Machine code on the other hand, is usually the targeted result of translating assembly code to the machine equivalent. The machine circuit only understands a sequence of zeros and ones, and is not immediately understandable to a human. The result of the program sequence above in machine code might look something like:111001101101100000111100011000101010Which makes sense to a machine, but not a human.


What does the assembly look like?

Need more info. assembly to what?


What did the code look like and how did it work?

what did the code look like and how did it work??


What does machine language code look like?

Machine language is the computer instructions in memory--the actual bits used by the machine hardware or microcode interpreter. To "look" at it, it has to be converted to a human-readable form. Often, it is printed as a sequence of hexadecimal numbers, usually tagged with the memory address. Sometimes it is processed by a disassembler program, which tries to translate the code into assembly language instructions and data. This is not always successful since in machine architectures that mix data and instructions, it can be difficult to determine which program areas are data and which are instructions.


How do you translate C plus plus expression to assembly language?

The easiest way is to place a breakpoint in your program, then examine the assembly instructions at that breakpoint. Consult your IDE on how to look at the assembly source.


Examples of machine language?

Machine code is the ONLY example of machine language. However, every machine architecture has its own version of machine code; it is the native language of the machine. If you want to examine machine code upon your own machine, use a hex editor. This will show you every byte of the code in hexadecimal form.


What Is The Java Enum And What Is It Used For?

The best way I can describe an enum is a class of Java language. Enums look like they are used in code string when writing a website.


What does the SEICENTO washer bottle assembly look like?

looks like any other car


Is there a cheat code to make it look like you have poptropica membership?

there is not a cheat code to make it look like you have membership. but if there were, I would use it.:D