.

Saturday, March 30, 2019

Low Level Programming Language Computer Science Essay

Low Level Programming Language entropy exploitor Science EssayLow-level programmeing run-in is a program verbiage that provides little or no stimulus generalisation from a computing devices knowledge mountain architecture. The word low refers to the small or n anexistent pith of abstraction betwixt the wrangle and shape language beca procedure of this, subordinate languages atomic cast 18 sometimes described as being close to the hardw atomic number 18.A low-level language does not need a compiler or interp so useer to run. The processor for which the language was indite is able to run the enrol without using either of these.By comparison, a high-level programming language isolates the writ of action semantics of calculating machine architecture from the specification of the program, making the process of developing a program simpler and more understandable.Low-level programming languages atomic number 18 sometimes divided up into two categories first gene ration, and second generation.First generationThe first-generation programming language, or 1GL, is a railcar legislation. It is the scarcely language a microprocessor john process presently without a previous transformation. Currently, figurers al nearly never write programs nowadays in machine code, because it requires attention to numerous elaborate which a high-level language would handle automatically, and withal requires memorizing or looking up quantitative codes for every instruction that is used. For this reason, second generation programming languages provide one abstraction level on top of the machine code. simulation A function in 32-bit x86 machine code to calculate the nth Fibonacci number8B542408 83FA0077 06B80000 0000C383FA027706 B8010000 00C353BB 01000000B9010000 008D0419 83FA0376 078BD98BC84AEBF1 5BC3Second generationSecond-generation programming language, or 2GL, is an assembly language. It is considered a second-generation language because while it is not a microprocessors native language, an assembly language programmer must still understand the microprocessors unique registers and instructions. These simple instructions are past assembled directly into machine code. The assembly code layabout also be abstracted to another layer in a corresponding manner as machine code is abstracted into assembly code.Example The same Fibonacci number calculator as on rapscallion one, scarce in x86 assembly language using MASM syntaxfibmov edx, esp+8cmp edx, 0ja fmov eax, 0retcmp edx, 2ja fmov eax, 1retpush ebxmov ebx, 1mov ecx, 1lea eax, ebx+ecxcmp edx, 3jbe fmov ebx, ecxmov ecx, eax fall edxjmp bpop ebxret last level programming language high-pitched-level programming language is a programming language with conceptive abstraction from the details of the computer. In comparison to low-level programming languages, it whitethorn use natural language elements, it is easier to use and more portable across platforms. Such languages hide the details of CPU operations such as memory approach path models and management of scope.This greater abstraction and hiding of details is generally intended to make the language exploiter-friendly, as it includes concepts from the problem ambit instead of those of the machine used. A high-level language isolates the execution semantics of computer architecture from the specification of the program, making the process of developing a program simpler and more understandable with respect to a low-level language. The amount of abstraction provided defines how high-level a programming language is.The term high-level language does not imply that the language is superior to low-level programming languages in fact, in terms of the depth of knowledge of how computers work required to profitably program in a given language, the inverse may be align. alternatively, high-level language refers to the higher level of abstraction from machine language. Rather than dealing with registers, memo ry addresses and call stacks, high-level languages deal with usability, threads, locks, objects, variables, arrays and composite plant arithmetic or Boolean expressions. In addition, they pose no opcodes that tummy directly compile the language into machine code, un exchangeable low-level assembly language. early(a) features such as string handling routines, object-oriented language features and file arousal/output may also be present.High-level languages make complex programming simpler, while low-level languages tend to baffle more cost-efficient code. High-level programming features like more generic entropy structures, run-time edition and arbitrate code files often result in slower execution speed, higher memory consumption and larger binary size. For this reason, code which inevitably to run particularly quickly and efficiently may be compose in a lower-level language, even if a higher-level language would make the cryptogram easier.With the growing complexity of modern microprocessor architectures, well-designed compilers for high-level languages frequently produce code comparable in efficiency to what most low-level programmers can produce by hand, and the higher abstraction may allow for more decently techniques providing better overall results than their low-level counterparts in particular settings.There are three models of execution for modern high-level languagesInterpreted Interpreted languages are read and then executed directly, with no digest stage.Compiled Compiled languages are alter into an executable form before running. There are two cases of compilation Intermediate representations When a language is compiled to an intermediate representation, that representation can be optimized or saved for later execution without the need to re-read the source file. When the intermediate representation is saved it is often represented as bytecode. Machine code generation Some compilers compile source code directly into machine code. Virtual machines that execute bytecode directly or transform it further into machine code hand blurred the once clear distinction between intermediate representations and truly compiled languages.Translated A language may be translated into a low-level programming language for which native code compilers are already widely available. The C programming language is a common object glass for such translators.Examples of high level programming language includeJava, C, Python, Scheme, Prolog, C++, C, VB, Java Script, Ruby and Lisp.Comparison of high and low programming languages below are similar programs in both languages to find great and smallest entropy foster in a data set.Validating sensitive dataInput validation is an important part of each computer application that requires user interaction. It applies to allthing that the application does to ensure that data forecasted by the user is acceptable for the purposes of the application.Input validation can take place at va rious times in the data launching cycle. For utilisation, the programmer can tighten the users entry of data before it begins by providing very certified data input scene of actions that permit only valid choices. The most common way to do this is to provide standard controls that do not permit free keyboard entry, such as drop-down lists, option buttons, and check boxes.Constrain the users entry of data at the moment that it occurs by monitoring every keystroke for validity and rejecting unwanted input as its flaked. For instance, a particular entry field might seem to the user to ignore anything but numeral cases.React to the users entry of data after the user is finished, accepting or rejecting the contents of a data field when the user attempts to leave the field or close the screen.Input validation can also have varying degrees of user participation. For instance, the program canAutomatically correct a users mistakes without asking the users opinion.Warn the user of inco rrect input and prompt the user to correct the input before allowing the user to continue with other activities.Benifets of entropy Validation Reduces the time that is spent completing forms and eliminates costs associated with errors by validatory data, improving efficiency and minimizing the high cost of exception handling resulting from data input errors. Validation pass offs immediately in a visual basal form and can catch common errors such as not entering a required field, incorrect data type or entering incorrect data based on other data previously entered into the form.Example validation of checking if the date entered is after todays date reclusive wedge shape Date_Entered_AfterUpdate() If Me.Date_Entereddate() then Date_Entered is form field name msgbox Please enter a date less than or equal to todays date. Me.Date_Entered.setfocus set pointer back in the date field end ifEnd SubUsing arrange with passwords in visual basicThe use of strings benefits data entry i n a password application in visual basic because the program would not reset itself and crash on error input. This could affect the safety of the password which could be compromised.It compares the 4 physical body numbers inputted in order and will only allow access when all 4 characters are correct and in the right sequence. If this doesnt happen it will reset and wipe the numbers clear. This is so the imputer cannot see which ones he/she has got right and try different ones for the others remaining.In visual basic for the to a higher place program you could limit the user to a certain amount of attempts before the user is locked out. When the code is incorrect you could have a warning tatty up on the computer, or if the wrong sort of data is inputted you can have a warning asking for the correct data. Likewise if you have not inputted 4 digits it would crash so this can be circumscribed in the code strings with . info lawsuitsBoolean Data faceThis data type projects values that can be only true or false. The keywords True and False correspond to the two states of Boolean variables. call the Boolean data type to contain two-state values such as true/false, yes/no, or on/off. The indifference value of Boolean is False.Type ConversionsWhen ocular raw material commutes numerical data type values to Boolean, 0 becomes False and all other values become true. When optic sanctioned converts Boolean values to numeric types, False becomes 0 and True becomes -1.When you convert between Boolean values and numeric data types, the .NET example renewing methods do not always produce the same results as the Visual Basic conversion keywords. This is because the Visual Basic conversion retains behaviour matched with previous versions.Programming guideNegative Numbers. Boolean is not a numeric type and cannot represent a negative value. In any case, you should not use Boolean to hold numeric values.Type incinerateacters. Boolean has no literal type characte r or identifier type character.Framework Type. The corresponding type in the .NET Framework is the system Boolean structure.In the succeeding(a) example, runningVB is a Boolean variable, which stores a simple yes/no setting. irksome runningVB As Boolean Check to see if program is running on Visual Basic engine.If scriptEngine = VB ThenrunningVB = TrueEnd Ifwhole number Data Type integer data holds signed 32-bit (4-byte) integers ranging in value from -2,147,483,648 finished 2,147,483,647.The integer data type provides optimal performance on a 32-bit processor. The other integral types are slower to load and store from and to memory. The default value of integer is 0.Programming guideInterop Considerations. If you are interfacing with components not written for the .NET Framework, for example Automation or COM objects, keep in mind that Integer has a different data width (16 bits) in other environments.Widening. The Integer data type widens to Long, Decimal, Single, or Double. Th is means you can convert Integer to any of these types without encountering a System.OverflowException error.Type set fire toacters. Appending the literal type character I to a literal forces it to the Integer data type. Appending the identifier type character % to any identifier forces it to Integer.Framework Type. The corresponding type in the .NET Framework is the System.Int32 structure.If you try to set a variable of an integral type to a number away(p) the range for that type, an error occurs. If you try to set it to a fraction, the number is rounded. The following example shows this. The valid range of an Integer variable is -2147483648 through +2147483647. glaze over k As Integer The following statement causes an error because the value is too large.k = 2147483648 The following statement sets k to 6.k = CInt(5.9)Char Data TypeHolds unsigned 16-bit (2-byte) code points ranging in value from 0 through 65535. Each code point, or character code, represents a adept Unicode char acter.You use the Char data type when you need to hold only a single character and do not need the viewgraph of String. In some cases you can use Char(), an array of Char elements, to hold multiple characters. The default value of Char is the character with a code point of 0.Unicode CharactersThe first 128 code points (0-127) of Unicode correspond to the letters and symbols on a standard U.S. keyboard. These first 128 code points are the same as those the ASCII character set defines. The second 128 code points (128-255) represent special characters, such as Latin-based alphabet letters, accents, currency symbols, and fractions. Unicode uses the remaining code points (256-65535) for a wide mannikin of symbols, including worldwide textual characters, diacritics, and mathematical and technical symbols.You can use methods like IsDigit and IsPunctuation on a Char variable to determine its Unicode classification.Type ConversionsVisual Basic does not convert directly between Char and the numeric types. You can use the Asc, AscW Functions to convert a Char value to an Integer representing its code point. You can use the Chr, ChrW Functions to convert an Integer value to a Char having that code point.If the type checking switch ( plectron Strict Statement) is on, you must lend the literal type character to a single-character string literal to severalise it as the Char data type. The following example on page 8 illustrates this.Option Strict OnDim charVar As Char The following statement attempts to convert a String literal to Char. Because Option Strict is On, it generates a compiler error.charVar = Z The following statement succeeds because it specifies a Char literal.charVar = ZCProgramming guideNegative Numbers. Char is an unsigned type and cannot represent a negative value. In any case, you should not use Char to hold numeric values.Interop Considerations. If you are interfacing with components not written for the .NET Framework, for example Automation or COM ob jects.Widening. The Char data type widens to String. This means you can convert Char to String without encountering a System.OverflowException error.Type Characters. Appending the literal type character C to a single-character string literal forces it to the Char data type. Char has no identifier type character.Framework Type. The corresponding type in the .NET Framework is the System.Char structureComparison table between Ladder logical system and Visual BasicLanguageLadder LogicVisual BasicSuitability for engineering applicationsHighMediumAvailabilityMediumHigh exploiter friendlinessLowHighCost of softwareHighLowSize of codeLow (high compact)HighDifficulty of useMedium to HighEasyEase of programmingMediumUser has knowledge then low User has no knowledge then HighIdeal useMachine controlSimulationResourceswww.wikipedia.org, www.msdn.microsoft.com, www.fortran.com, visual basic help, www.visualbasic.freetubes.net, www.blueclaw-db.com

No comments:

Post a Comment