Thursday, May 16, 2019

Machine Language Essay

1- shape independent nomenclaturesThe mellow level course of instructionming languages ar mould independent, which means they dont rely on specifications of a particular instrument. Brookshear (2012, p.242) indicate that Since the statements in a third-generation language did not refer to the attri exclusivelyes of any particular machine, they could be compiled as easily for integrity machine as for another. Since machines can understand and execute book of instruction manual written in machine language, then a programme has to be machine-specific, although the program source edict language may be machine-independent, but the compiler target specific machine produce.Brookshear (p.243) A program written in a third generation language could theoretically be used on any machine simply by applying the appropriate compiler. The pros of compiling code into machine-specific output is to serve optimizations on the output for the target machine on which the program will run, suc h(prenominal) optimization wont be doable if the program is compiled to run on unknown target machine. Machine-independent language may offer optimization in their abstract concepts like structures, objects, loops and conditions, those are machine independent, but the most powerful optimizations are those that best exploit special features of the target platform. E.g. Instructions which do several things at once, such as decrement register and branch if not zero. Wikipedia(2013).2- Four programming paradigms.Imperative paradigm is the traditional approach and also known as procedural paradigm. the process of programming is a procedure has one or more actions or commands executed in sequence. the commands or steps are derived by an algorithmic program in order to produce the desired result. it describes the details of HOW the results are to be obtained, in terms of the cardinal machine model.Functional paradigm working(a) programming is to do computation by calling or applying f unctions. each function is an abstract of single or multiple expressions which can be evaluated. Brookshear (p.245) define how functional programming is constructed by having smaller unit of measurements connected in order so that output of each unit is used as an input in another unit till the desired overall output is obtained. the functional paradigm is simple functions are nested together to build to build main one.As per (Laird ,2009, p.17), The main ideas of functional programming are high-order and pure functions, recursion, evaluation of equations, and pattern matching.Logic paradigm This paradigm logical system based and is different from other main programming paradigms. Its figure of speeched for Artificial intelligence to corporation with problems that requires extraction of knowledge and training driven from facts and making use of rules and relations. Nrmark(2010) highlighted one of its characteristics in program execution becomes a systematic search in a settle o f facts, making use of a set of inference rules Prolog language is one of the languages that uses logical paradigm. (Laird ,2009), In logic programming, set of facts and rules are analyzed in each step, referred as clauses. Prolog is the widely known language of logic programming. endeavor Oriented paradigm Any top language is known by its support of object-oriented programming (OOP). it has gained capacious popularity in the recent decade. It has 3 main features Encapsulation classes are types that are self-contained modules and an instance of the class is an object. hereditary pattern Classes could have relationships and organized in hierarchies, inheritance passes the structure and methods in one class down to kidskin classes in the hierarchy. Polymorphism common types can be presented by using a uniform interface. These features facilitates programming process when programs become larger and complex. Brookshear (p.247) in OOP a software system is represented as a collection o f objects,each object is capable of performing actions or requestion actions from others objects. These objects interacts with each other to work out the bailiwick problem.As per (Laird ,2009), All four of the main programming paradigms are useful in their own way, but pure programmg languages of only one paradigm are known to be slightly more limiting. Object-oriented design is currently the most versatile and widely used programming paradigm.3- Machine language vs. assembly languageAssembly Language is the first step in the evolution of programming languages. (Rajaraman , 1998) In an assembly language, mnemonics are used to represent operations to be performed by the data central processing unit and strings of characters to represent addresses of locations in the computers memory. Therere one-to-one correspondence between assembly statement and machine code instructions. Thus, assembly language is machine dependent as its matched to a particular processor structure. A program wr itten in assembly language has to be translated by an assembler to set of machine code/instructions, thus it can be executed by computer. a disassembler performs reverse function.Machine language called machine or native code, is the lowest level representation of program. every program is do of a series of instructions executed directly by CPU. Machine language is set of instructions executed directly by CPU. every task has one or more specific instructions. Wikipedia(2013). Unfortunately, pen programs in a machine language is a tedious task that often leads to errors that must be located and corrected (a process known as debugging) before the job is finished. Brookshear (p.240).Although assembly language is low-altitude language, but is higher level than machine code. Its more logical and human readable than machine code.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.