StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Assembly Languages and High-Level Languages - Essay Example

Summary
The paper "Assembly Languages and High-Level Languages" discusses that it is more inflected by human needs but they are logical/rational needs like being able to remember codes or not having to write long blocks of code repeatedly just to do simple operations…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER97.6% of users find it useful
Assembly Languages and High-Level Languages
Read Text Preview

Extract of sample "Assembly Languages and High-Level Languages"

December 6, Machine languages, assembly languages, and high level languages Machine languages, assembly languages, and high level languages form a logical nested structure: high level languages are mostly written to run on compilers which are written in assembly language (and very often write it); assembly language compilers are written in machine language and compile into machine language. This is not a matter of the needs of the machine but of the needs of the human being who interacts with the machine; as far as the machine is concerned, its all machine language, but human beings need the higher level logical structures in order to understand what is going on more easily. Each level of language has its own special considerations. Machine languages are a representation of the actual internal process of the machine; they are the actual hexadecimal strings that when entered into the CPU cause it to take action. Because every machine language command must correspond to an actual hardwired operation performed on the chip by the electronic components, it is faster and more convenient to keep the number of machine commands fairly low; this is the philosophy behind RISC (Reduced Instruction Set Computing). Instructions are very brief and only the most logically essential operations (such as compares, additions, etc.), plus a few of the most frequently used opearations (such as move-into register and clear register) are represented by individual instructions. Thus, to multiply, the machine language actually enters many instructions. It tells the CPU to enter the multiplier into one register, enter the multiplicand into another register, add the multiplier register to the running total in another register, decrement the multiplicand register by one, check to see if the multiplicand register is now zero, report the running register if it is, and repeat the process if it is not. (This actually omits many more instructions because they would run longer than this paper!) By convention, most machine codes for most types of processors are written with a few characters for type of operation, a few that specify the operation, and a few that say where the operation is to be applied (for example, to the contents of a particular register), in that order. There is no requirement for this logically but it allows the human authors of the initial instruction set to stay organized. That step looking organized to humans – brings us to the next logical level, assembly language. When people need to debug the CPUs operations, or to think about things like termination and boundary conditions, or to build a reusable module to do specific very complicated tasks, they turn to assembly languages. Human beings do not think in the minute procedural way a CPU does, but programmers need to be able to see exactly what a computer is doing. Thus assembly languages act as a convenient shorthand to let humans see what the computer is doing (and debug or alter it), by creating short, somewhat meaningful abbreviations for many of the common processes (multiplication, exponentiation, sorting, if/then decisions, etc.) so that when an assembly language compiler finds an assembly language command, it then writes a long string of machine code to execute that process. In that it is very similar to shorthand; simple brief symbols that stand for long complicated chains of symbols. But most users dont actually care what is happening inside the computer, as long as it works. This is where high level languages come in. Languages like Java are created for a group of users so that the many things they need to do for the type of work they want to do can be expressed very simply and clearly. Because this is so clearly related to human beings, and human beings work in a particular context, high level languages are very much tied to the context of the human being doing the work. For example, if one wants to do many, many of the common applications on the web, the compiler one would write would look a lot like Java, in which complex web operations are represented by simple clear codes; if one wants to do research into logic and meaning, a language which directly represents many of the logical functions in terms like those found in books of logic (like different kinds of mathematical functions, one might create a high level compiler like Pascal or LISP might be more appropriate. BASIC compilers have taught millions of people how to think procedurally; Ada enables users who need to send commands to machinery (as in embedded systems) but need to study the behavior of the software first; Mathematica and MATLAB allow mathematicians to concentrate on mathematics without paying too much attention to computation, because they have so many computation functions built in. What if the human being might need to write something new or different that fits a need that wasnt thought of before? For that there is C++, which allows for general programming and has many "programmer tricks" built in. A simple example: in Java, where it is comparatively rarely necessary to define a function, it takes twelve characters at a minimum to do a function definition (before the definition itself is written); in Haskell, which to some extent exists to define functions, it takes two. Yet its not just a matter of length; clarity can sometimes be what matters. Most languages use asin for "take the arcsine of" but Mathematica uses ArcSin because it will clearly remind the mathematically sophisticated user of exactly what is going on. ("Syntax") This shows up in many different ways. Business-oriented languages need to record what the code does, and so they tend to need space for big, lengthy comments to explain, for example that this block of code implements a particular tax regulation, or even to explain why a big block of code needed to be commented out (as when the regulation changes but the code must remain for historical or legal purposes). But mathematical programs tend to need it to be easier to explain what a particular line does or to give the source of a particular formula for computation. Web applications need to use comment structures to ensure backward compatability, So unsurprisingly, it is easy to write long comments and comment out big blocks of text in COBOL; easier to put comments at line ends in languages like XML; and easier to create backward-compatability comments in Java. (Van Tassel) Thus we can see a pattern: machine language is written to express what the machine does, and so it only needs to make sense to the machine. The one concession to human thought is to use positional coding for operation, type of operation, and limits/rules/data for operation. Assembly language is written to make machine language intelligible and to allow simple abbreviations for long blocks of text. It is more inflected by human needs but they are logical/rational needs like being able to remember codes or not having to write long blocks of code repeatedly just to do simple operations. And finally, high level languages are written with human needs almost entirely in mind; any given high level language is written with some user in mind, to make it easy for that particular user to do the particular human things he or she needs to do. Works Cited Pixel et al. "Syntax Across Languages." Rigaux.org Language Study. Rigaux: August 29, 2008. Web. December 6, 2010. Van Tassel, Dennie. "Comments: Programming Language Statements – History." History and Comparison of Programming Languages. Gavilan: August 25, 2008. Web. December 6, 2010. Read More
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us