Sunday, January 26, 2020

Low Level Programming Language Computer Science Essay

Low Level Programming Language Computer Science Essay Low-level programming language is a programming language that provides little or no abstraction from a computers instruction set architecture. The word low refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being close to the hardware. A low-level language does not need a compiler or interpreter to run. The processor for which the language was written is able to run the code without using either of these. By comparison, a high-level programming 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. Low-level programming languages are sometimes divided into two categories: first generation, and second generation. First generation The first-generation programming language, or 1GL, is a machine code. It is the only language a microprocessor can process directly without a previous transformation. Currently, programmers almost never write programs directly in machine code, because it requires attention to numerous details which a high-level language would handle automatically, and also requires memorizing or looking up numerical codes for every instruction that is used. For this reason, second generation programming languages provide one abstraction level on top of the machine code. Example: A function in 32-bit x86 machine code to calculate the nth Fibonacci number: 8B542408 83FA0077 06B80000 0000C383 FA027706 B8010000 00C353BB 01000000 B9010000 008D0419 83FA0376 078BD98B C84AEBF1 5BC3 Second generation Second-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 then assembled directly into machine code. The assembly code can also be abstracted to another layer in a similar manner as machine code is abstracted into assembly code. Example: The same Fibonacci number calculator as on page one, but in x86 assembly language using MASM syntax: fib: mov edx, [esp+8] cmp edx, 0 ja @f mov eax, 0 ret @@: cmp edx, 2 ja @f mov eax, 1 ret @@: push ebx mov ebx, 1 mov ecx, 1 @@: lea eax, [ebx+ecx] cmp edx, 3 jbe @f mov ebx, ecx mov ecx, eax dec edx jmp @b @@: pop ebx ret High level programming language High-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may 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 access models and management of scope. This greater abstraction and hiding of details is generally intended to make the language user-friendly, as it includes concepts from the problem domain 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 productively program in a given language, the inverse may be true. Rather, high-level language refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses and call stacks, high-level languages deal with usability, threads, locks, objects, variables, arrays and complex arithmetic or Boolean expressions. In addition, they have no opcodes that can directly compile the language into machine code, unlike low-level assembly language. Other features such as string handling routines, object-oriented language features and file input/output may also be present. High-level languages make complex programming simpler, while low-level languages tend to produce more efficient code. High-level programming features like more generic data structures, run-time interpretation and intermediate code files often result in slower execution speed, higher memory consumption and larger binary size. For this reason, code which needs to run particularly quickly and efficiently may be written in a lower-level language, even if a higher-level language would make the coding 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 powerful techniques providing better overall results than their low-level counterparts in particular settings. There are three models of execution for modern high-level languages: Interpreted Interpreted languages are read and then executed directly, with no compilation stage. Compiled   Compiled languages are transformed into an executable form before running. There are two types 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 have 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 target for such translators. Examples of high level programming language include: Java, 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 greatest and smallest data value in a data set. Validating raw data Input validation is an important part of any computer application that requires user interaction. It applies to anything that the application does to ensure that data entered by the user is acceptable for the purposes of the application. Input validation can take place at various times in the data entry cycle. For example, the programmer can: Constrain the users entry of data before it begins by providing very restricted data input fields 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 typed. For instance, a particular entry field might seem to the user to ignore anything but numeric characters. 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 can Automatically correct a users mistakes without asking the users opinion. Warn the user of incorrect input and prompt the user to correct the input before allowing the user to continue with other activities. Benifets of Data Validation: Reduces the time that is spent completing forms and eliminates costs associated with errors by validating data, improving efficiency and minimizing the high cost of exception handling resulting from data input errors. Validation happens immediately in a visual basic 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: Private Sub Date_Entered_AfterUpdate()   Ã‚  Ã‚   If Me.Date_Entered>date() then  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   Date_Entered is form field name   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   msgbox Please enter a date less than or equal to todays date.   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   Me.Date_Entered.setfocus  Ã‚  Ã‚  Ã‚  Ã‚   set cursor back in the date field   Ã‚  Ã‚   end if End Sub Using strings with passwords in visual basic The use of strings benefits data entry in 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 digit 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 above 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 flash 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 modified in the code strings with . Data Types Boolean Data Type   This data type holds values that can be only true or false. The keywords True and False correspond to the two states of Boolean variables. Use the Boolean data type to contain two-state values such as true/false, yes/no, or on/off. The default value of Boolean is False. Type Conversions When Visual Basic converts numeric data type values to Boolean, 0 becomes False and all other values become true. When Visual Basic 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 Framework conversion methods do not always produce the same results as the Visual Basic conversion keywords. This is because the Visual Basic conversion retains behaviour compatible with previous versions. Programming guide Negative 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 Characters. Boolean has no literal type character or identifier type character. Framework Type. The corresponding type in the .NET Framework is the system Boolean structure. In the following example, runningVB is a Boolean variable, which stores a simple yes/no setting. Dim runningVB As Boolean Check to see if program is running on Visual Basic engine. If scriptEngine = VB Then runningVB = True End If Integer Data Type   Integer data holds signed 32-bit (4-byte) integers ranging in value from -2,147,483,648 through 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 guide Interop 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. This means you can convert Integer to any of these types without encountering a System.OverflowException error. Type Characters. 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 outside 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. Dim 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 Type   Holds unsigned 16-bit (2-byte) code points ranging in value from 0 through 65535. Each code point, or character code, represents a single Unicode character. You use the Char data type when you need to hold only a single character and do not need the overhead 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 Characters The 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 variety 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 Conversions Visual 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 (Option Strict Statement) is on, you must append the literal type character to a single-character string literal to identify it as the Char data type. The following example on page 8 illustrates this. Option Strict On Dim 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 = ZC Programming guide Negative 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 objects. 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 structure Comparison table between Ladder Logic and Visual Basic Language Ladder Logic Visual Basic Suitability for engineering applications High Medium Availability Medium High User friendliness Low High Cost of software High Low Size of code Low (high compact) High Difficulty of use Medium to High Easy Ease of programming Medium User has knowledge then low User has no knowledge then High Ideal use Machine control Simulation Resources: www.wikipedia.org, www.msdn.microsoft.com, www.fortran.com, visual basic help, www.visualbasic.freetubes.net, www.blueclaw-db.com

Saturday, January 18, 2020

Learning and Siddhartha Essay

Introduction: Hook- â€Å"Alas, Siddhartha, I see you suffering, but you’re suffering a pain at which one would like to laugh, at which you’ll soon laugh for yourself. † Introduction to Subject- Imagine if suffering and pleasure worked together as one. This is something Siddhartha discovers from his long quest to enlightenment. Introduction to topics- Topic 1: Siddhartha struggles with the need to love. In order for his quest to come to a conclusion, he must to learn how to love, not only himself, but also the world. Topic 2: Siddhartha states, â€Å"I can think, I can wait, I can fast. â€Å". To reach all goals you need patience. You need time. Although, Siddhartha soon discovers that time is merely an illusion. Topic 3: Om. Yes, a simple word, but its significance to Siddhartha is intricate, yet profound, and plays a crucial role in his journey to enlightenment. Thesis- These three main things are of great value to Siddhartha. Time, Love and the word om are highly influential in his path to enlightenment. Paragraph/Topic #1: Topic Sentence: For Siddhartha to achieve enlightenment, he needed to learn the art of love. He did not know how to love, almost incapable. It was this realization that drove him to learn that art, and to master it. Example 1: The first occurrence is a love between he and his father, a love that he rejects. Example 2: When he travels into town, he meets a beautiful woman named Kamala, where he then learns the art of lovemaking. Though, Siddhartha gets trapped in Samsara and escapes it by leaving her, although he leaves her pregnant and later it’s his son that truly invokes Siddhartha’s love. Example 3: It is the help of his friend the ferryman, Vasudeva, which helps him, not only reach enlightenment but also the ability and power to love. It is the river that they have crossed so many times that speaks to them, and through it all he learns to love, to love everything in the world. To embrace the flaws and know that in its own way, the world is perfect. Transitional Statement: Love can be tricky and challenging. Siddhartha needed to discover and explore it in order to know the profound meaning of love, and that discovery had to take time. Paragraph/Topic #2: Topic Sentence: What is time? What does it even represent? Siddhartha believes that time is nothing more than an illusion, that life itself is infinite. Example 1: Siddhartha gets trapped in Samsara when he goes to find love. The feeling is infinite, just like his belief in life, and that whole idea of the circle of life is emphasized. Example 2: The River in the book represents life itself. It wasn’t until the end of the book that Siddhartha could hear the river laugh, that is where he discovers the true reality of time. Example 3: His old friend Govinda visits Siddhartha on his ferry. Govinda then asks that Siddhartha tell him what his own doctrine is. What he has discovered. Siddhartha brings up the whole concept of time. He states that â€Å"time is not real† that â€Å"the span that seems to exist between world and eternity, between sorrow and bliss, between evil and good, is all an illusion. † (pg. 76) Transitional Statement: Understanding time, and the past and the future, is just one of the many important things Siddhartha will have to discover on his road to enlightenment. Paragraph/Topic #3 Topic Sentence: â€Å"om, is the absolute† (pg. 73) and in truth, Siddhartha is saved many times by the simple, two letter word, om. Example 1: The word om according to Carl Jung. Is the verbal embodiment of the collective unconscious. om is everything to Siddhartha and represents the world and oneness. This first occurred when he was a little boy meditating to decide if he should leave his home. Example 2: After he had left Kamala and his wealth behind, he struggled to escape samsara. It was that word that saved him when he was on the brink of suicide. Example 3: At the end, when he is meditating by the river, he finally recognizes the absolution of the word om, this is where he ultimately achieves enlightenment. Transitional Statement: Siddhartha eventually realized that the word om represents all oneness and the world. Many times he was awakened to life by this one simple word. Conclusion: Revised Thesis Statement: Siddhartha ultimately achieves enlightenment, but he wouldn’t have been able to attain his goals without exploring the concepts of time, love and om. Review of 3 Topics: Topic 1: To reach enlightenment, he learned that time, is merely an illusion, that it is infinite. Topic 2: Siddhartha also achieved love for the world, that it is flawless and perfect just the way it is. Topic 3: It was the word om that protected and saved him so many times and it was this simple word that had a significant impact not only of himself but also his journey to enlightenment. Mint: So I give you a challenge, next time you’re out in nature, and you come across a river, try to sit and listen. Just see what it tells you.

Thursday, January 9, 2020

Luther s Exposition On The Fourth Commandment - 992 Words

This paper will have a particular focus on Luther’s Large Catechisms with specific attention towards Luther’s exposition on the fourth commandment. The following will critically analyze this confessional text in light of its historical-theological context and conclude with its contemporary relevance within American social milieu. In particular, this paper will view Luther’s exposition on the fourth commandment with a pragmatic lens as a means to explore its implications for the American social structure. Luther’s Large Catechism was written to assist preachers and pastors with Christian education and to improve upon their fulfillment of their office duties. During the summer of 1527 Luther and his colleagues at Wittenburg were rudely awakened by the pastoral leadership climate of the church. Due to the various changes that were taking place during the Reformation, European society’s interest in Christian piety dramatically increased during the late Medieval Ages. As a result the church increased the number of rostered Clergy to meet the pastoral demands. However, most of the clergy had little to no educational background and what theology they did know came from booklets that assisted them in their pastoral duties. In short, the church had an overabundance of underequipped clergy who were loosely following the proper call of their office, and as a result laity were uninformed on Christian doctrine as well as lacking in effective pastor care. In the introduction to the

Wednesday, January 1, 2020

Moneyball Lessons for Business - 1245 Words

At its core, the book Moneyball, to me, is about leadership and overcoming resistance to change to create a sustainable competitive advantage. In Moneyball a new General Manager challenges a traditional industry with a new paradigm. He successfully deals with the resulting resistance from the more tradition oriented employees. In the case of the Oakland A s this has led to a substantial competitive advantage through lower costs (their payroll goes down) and improved output (the have a higher percentage of win’s) which leads to an increase in return (average cost of a run is among the lowest in baseball). This represents a major learning to me, it means that I need to be prepared to challenge the conventional wisdom by being innovative†¦show more content†¦Money ball begs the question if there is a way to exploit the inefficiency of current performance evaluation systems by implementing a novel, fact based, employee performance measurement and feedback system. Can companies copy the sabermetrics approach to talent assessment, selection and utilization ? One can imagine that this is possible in a manufacturing or a sales environment where there is a direct relation between employee action and measurable outcomes. It becomes more difficult in the finance, marketing or human resources arena where the immediate impact of employee actions is less obvious. Therefor it would be a major breakthrough if one would be able to identify those factors that predict success. Billy Bean in Moneyball, after identifying the right empirical data and then training (and convincing) his people of the new approach needs to build organizational capability in using and implementing his new system. In the same way, if a company comes up with a new way of determining what will lead to success (see question 1) it cannot stop at just inventing the new â€Å"system†, the organization needs to build capability to use it as a competitive advantage. To build this capability, employee’s performance needs to be evaluated in the light of how much he/she is contributing to the success of the new approach. Usually this capability is built through more â€Å"intangible factors†Show MoreRelatedAnalysis Case On Use Of Business Analytics Framework1345 Words   |  6 Pages â€Å"Moneyball† Analysis Case Study on the Use of Business Analytics Framework† Dheeraj Dwivedi School of Professional Studies, Northwestern University, Spring 2016, Section 58 â€Æ' â€Å"Moneyball† Movie Analysis Case Study on the Use of Business Analytics Framework â€Å"Moneyball† movie is about the war between intuition and statistics. I would start my analysis with one of the many interesting quotes in the movie. â€Å"The problem we re trying to solve is that there are rich teams and there are poorRead MoreLeadership Charachterstic of Billy Beane3317 Words   |  14 PagesSt. Francis Xavier University | MONEYBALL | Leadership and Billy Beane | | Brandon Guenette/200905666 | 3/5/2012 | | Introduction Michael Lewis’s Moneyball is a fascinating story about a small group of undervalued professional baseball players and executives who had turned themselves into one of the most successful franchises in Major League Baseball. The underlying question to this story is where the real discussion should begin. That question is: how did one of the poorest teams in baseball