Tuesday, February 19, 2019
Machine Language Essay
1- motorcar independent wranglesThe high level programming dustups ar form independent, which means they dont rely on specifications of a special(prenominal) instrument. Brookshear (2012, p.242) indicate that Since the statements in a third-generation language did not refer to the attributes of whatsoever limited forge, they could be compiled as easily for wholey machine as for another. Since machines can understand and execute instructions written in machine language, then a program has to be machine-specific, although the program first code language may be machine-independent, but the compiler localize specific machine bring output.Brookshear (p.243) A program written in a third generation language could theoretically be utilize on any machine simply by applying the appropriate compiler. The pros of lay in code into machine-specific output is to perform optimizations on the output for the fair game machine on which the program will run, such optimization wont be do able if the program is compiled to run on un cognise target machine. elevator car-independent language may offer optimization in their abstract concepts want structures, intents, loops and conditions, those are machine independent, but the most effective optimizations are those that trump out 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- quaternary programming paradigms.Imperative paradigm is the traditional approach and also known as procedural paradigm. the process of programming is a procedure has mavin or to a greater extent actions or commands execute in sequence. the commands or go are derived by an algorithm in order to produce the desire result. it describes the details of HOW the results are to be obtained, in terms of the underlying machine model.Functional paradigm functional programming is to do computation by calling or applying functions. separately 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 units 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 uncomplicated functions are nested together to build to build of import(prenominal) whizz.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.logical system paradigm This paradigm logic based and is different from other main programming paradigms. Its deviseed for Artificial intelligence to deal with problems that requires lineage 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 batch of facts, ma king use of a set of induction 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 clapperclaw, referred as clauses. Prolog is the widely known language of logic programming.Object Oriented paradigm each top language is known by its support of object-oriented programming (OOP). it has gained swell popularity in the recent decade. It has 3 main features Encapsulation classes are types that are collected modules and an instance of the class is an object. Inheritance Classes could have relationships and organized in hierarchies, hereditary pattern passes the structure and methods in one class down to child 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 catch up withed as a collection of objects ,each object is capable of performing actions or requestion actions from others objects. These objects interacts with each other to work out the domain 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 to a greater extent limiting. Object-oriented design is currently the most versatile and widely used programming paradigm.3- Machine language vs. convention 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 computer and strings of characters to represent addresses of locations in the computers memory. Therere matched correspondence between assembly statement and machine code instructions. Thus, assembly language is machine dependent as its matched to a particular processor structure. A program written in assembly language has to be translated by an assembler to set of machine code/instructions, and then it can be put to death by computer. a disassembler performs reverse function.Machine language called machine or native code, is the lowest level design of program. every program is made 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, writing programs in a machine language is a tedious task that often leads to errors that must be located and right (a process known as debugging) before the job is finished. Brookshear (p.240).Although assembly language is low-level language, but is higher level than machine code. Its more logical and human readable than machine code.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment