note: you must be online to view the links below.
JUST CLICK THE LINKS BELOW. THESE LINKS WILL SERVE AS YOUR NOTES
Logic gates
VB INTERFACE
Visual Basic History WIKI
VB Toolbox
ALC Shakespear Batch 2011 Online Notes
Thursday, March 8, 2012
History Of Computer Programming
Computer programming (often shortened to programming or coding) is the process of designing, writing, testing, debugging / troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new. The purpose of programming is to create a program that exhibits a certain desired behaviour (customization). The process of writing source code often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic.
History of programming
The concept of devices that operate following a pre-defined set of instructions traces back to Greek Mythology, notably Hephaestus, the Greek Blacksmith God, and his mechanical slaves.[3] The Antikythera mechanism from ancient Greece was a calculator utilizing gears of various sizes and configuration to determine its operation.[4] Al-Jazari built programmable Automata in 1206. One system employed in these devices was the use of pegs and cams placed into a wooden drum at specific locations. which would sequentially trigger levers that in turn operated percussion instruments. The output of this device was a small drummer playing various rhythms and drum patterns.[5][6] The Jacquard Loom, which Joseph Marie Jacquard developed in 1801, uses a series of pasteboard cards with holes punched in them. The hole pattern represented the pattern that the loom had to follow in weaving cloth. The loom could produce entirely different weaves using different sets of cards. Charles Babbage adopted the use of punched cards around 1830 to control his Analytical Engine. The synthesis of numerical calculation, predetermined operation and output, along with a way to organize and input instructions in a manner relatively easy for humans to conceive and produce, led to the modern development of computer programming. Development of computer programming accelerated through the Industrial Revolution.
In the late 1880s, Herman Hollerith invented the recording of data on a medium that could then be read by a machine. Prior uses of machine readable media, above, had been for control, not data. "After some initial trials with paper tape, he settled on punched cards..."[7] To process these punched cards, first known as "Hollerith cards" he invented the tabulator, and the keypunch machines. These three inventions were the foundation of the modern information processing industry. In 1896 he founded the Tabulating Machine Company (which later became the core of IBM). The addition of a control panel (plugboard) to his 1906 Type I Tabulator allowed it to do different jobs without having to be physically rebuilt. By the late 1940s, there were a variety of plug-board programmable machines, called unit record equipment, to perform data-processing tasks (card reading). Early computer programmers used plug-boards for the variety of complex calculations requested of the newly invented machines.
The invention of the von Neumann architecture allowed computer programs to be stored in computer memory. Early programs had to be painstakingly crafted using the instructions (elementary operations) of the particular machine, often in binary notation. Every model of computer would likely use different instructions (machine language) to do the same task. Later, assembly languages were developed that let the programmer specify each instruction in a text format, entering abbreviations for each operation code instead of a number and specifying addresses in symbolic form (e.g., ADD X, TOTAL). Entering a program in assembly language is usually more convenient, faster, and less prone to human error than using machine language, but because an assembly language is little more than a different notation for a machine language, any two machines with different instruction sets also have different assembly languages.
In 1954, FORTRAN was invented; it was the first high level programming language to have a functional implementation, as opposed to just a design on paper.[8][9] (A high-level language is, in very general terms, any programming language that allows the programmer to write programs in terms that are more abstract than assembly language instructions, i.e. at a level of abstraction "higher" than that of an assembly language.) It allowed programmers to specify calculations by entering a formula directly (e.g. Y = X*2 + 5*X + 9). The program text, or source, is converted into machine instructions using a special program called a compiler, which translates the FORTRAN program into machine language. In fact, the name FORTRAN stands for "Formula Translation". Many other languages were developed, including some for commercial programming, such as COBOL. Programs were mostly still entered using punched cards or paper tape. (See computer programming in the punch card era). By the late 1960s, data storage devices and computer terminals became inexpensive enough that programs could be created by typing directly into the computers. Text editors were developed that allowed changes and corrections to be made much more easily than with punched cards. (Usually, an error in punching a card meant that the card had to be discarded and an new one punched to replace it.)
As time has progressed, computers have made giant leaps in the area of processing power. This has brought about newer programming languages that are more abstracted from the underlying hardware. Although these high-level languages usually incur greater overhead, the increase in speed of modern computers has made the use of these languages much more practical than in the past. These increasingly abstracted languages typically are easier to learn and allow the programmer to develop applications much more efficiently and with less source code. However, high-level languages are still impractical for a few programs, such as those where low-level hardware control is necessary or where maximum processing speed is vital.
Throughout the second half of the twentieth century, programming was an attractive career in most developed countries. Some forms of programming have been increasingly subject to offshore outsourcing (importing software and services from other countries, usually at a lower wage), making programming career decisions in developed countries more complicated, while increasing economic opportunities in less developed areas. It is unclear how far this trend will continue and how deeply it will impact programmer wages and opportunities.
Modern programming
Whatever the approach to software development may be, the final program must satisfy some fundamental properties. The following properties are among the most relevant:
Efficiency/performance: the amount of system resources a program consumes (processor time, memory space, slow devices such as disks, network bandwidth and to some extent even user interaction): the less, the better. This also includes correct disposal of some resources, such as cleaning up temporary files and lack of memory leaks.
Reliability: how often the results of a program are correct. This depends on conceptual correctness of algorithms, and minimization of programming mistakes, such as mistakes in resource management (e.g., buffer overflows and race conditions) and logic errors (such as division by zero or off-by-one errors).
Robustness: how well a program anticipates problems not due to programmer error. This includes situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources such as memory, operating system services and network connections, and user error.
Usability: the ergonomics of a program: the ease with which a person can use the program for its intended purpose, or in some cases even unanticipated purposes. Such issues can make or break its success even regardless of other issues. This involves a wide range of textual, graphical and sometimes hardware elements that improve the clarity, intuitiveness, cohesiveness and completeness of a program's user interface.
Portability: the range of computer hardware and operating system platforms on which the source code of a program can be compiled/interpreted and run. This depends on differences in the programming facilities provided by the different platforms, including hardware and operating system resources, expected behaviour of the hardware and operating system, and availability of platform specific compilers (and sometimes libraries) for the language of the source code.
Maintainability: the ease with which a program can be modified by its present or future developers in order to make improvements or customizations, fix bugs and security holes, or adapt it to new environments. Good practices during initial development make the difference in this regard. This quality may not be directly apparent to the end user but it can significantly affect the fate of a program over the long term.
The details look different in different languages, but a few basic instructions appear in just about every language:
•input: Get data from the keyboard, a file, or some other device.
•output: Display data on the screen or send data to a file or other device.
•arithmetic: Perform basic arithmetical operations like addition and multiplication.
•conditional execution: Check for certain conditions and execute the appropriate sequence of statements.
•repetition: Perform some action repeatedly, usually with some variation.
Many computer languages provide a mechanism to call functions provided by libraries. Provided the functions in a library follow the appropriate run time conventions (e.g., method of passing arguments), then these functions may be written in any other language.
Programmers
Computer programmers are those who write computer software. Their jobs usually involve:
•Coding
•Compilation
•Documentation
•Integration
•Maintenance
•Requirements analysis
•Software architecture
•Software testing
•Specification
•Debugging
Introduction
A computer is a machine that performs a variety of tasks according to specific
instructions. It is a data processing machine which accepts data via an input device and
its processor manipulates the data according to a program.
Overview of Computer Programming Languages
What is a Programming Language?
A programming language is a standardized communication technique for expressing instructions to a computer. Like human languages, each language has its own syntax and grammar.
Programming languages enable a programmer to precisely specify what data a computer will act upon, how these data will be stored/transmitted, and precisely what actions to take under various circumstances.
There are different types of programming languages that can be used to create programs, but regardless of what language you use, these instructions are translated into machine language that can be understood by computers.
Categories of Programming Languages
1. High-level Programming Languages
A high-level programming language is a programming language that is more user friendly, to some extent platform-independent, and abstract from low-level computer processor operations such as memory accesses. A programming statement may be translated into one or several machine instructions by a compiler. Examples are Java, C, C++, Basic, Fortran
2. Low-level Assembly Language
Assembly languages are similar to machine languages, but they are much easier to program in because they allow a programmer to substitute names for numbers. Assembly languages are available for each CPU family, and each assembly instruction is translated into one machine instruction by an assembler program.
Note: The terms "high-level" and "low-level" are inherently relative. Originally, assembly language was considered low-level and COBOL, C, etc. were considered high-level. Many programmers today might refer to these latter languages as low-level.
The Program Development Life Cycle
Programmers do not sit down and start writing code right away when trying to make a computer program. Instead, they follow an organized plan or methodology, that breaks the process into a series of tasks.
Here are the basic steps in trying to solve a problem on the computer:
1. Problem Definition
2. Problem Analysis
3. Algorithm design and representation (Pseudocode or flowchart)
4. Coding and debugging
In order to understand the basic steps in solving a problem on a computer, let us define a single problem that we will solve step-by-step as we discuss the problem solving methodologies in detail. The problem we will solve will be defined in the next section.
Problem Definition
A programmer is usually given a task in the form of a problem. Before a program can be designed to solve a particular problem, the problem must be well and clearly defined first in terms of its input and output requirements.
A clearly defined problem is already half the solution. Computer programming requires us to define the problem first before we even try to create a solution.
Let us now define our example problem:
“Create a program that will determine the number of times a name occurs in a list.”
Problem Analysis
After the problem has been adequately defined, the simplest and yet the most efficient and effective approach to solve the problem must be formulated. Usually, this step involves breaking up the problem into smaller and simpler subproblems.
Example Problem:
Determine the number of times a name occurs in a list
Input to the program:
List of names, name to look for
Output of the program:
The number of times the name occurs in a list
Algorithm design and representation
Once our problem is clearly defined, we can now set to finding a solution. In computer programming, it is normally required to express our solution in a step-by-step manner.
An Algorithm is a clear and unambiguous specification of the steps needed to solve a problem. It may be expressed in either Human language (English, Tagalog), through a graphical representation like a flowchart or through a pseudocode, which is a cross between human language and a programming language.
Now given the problem defined in the previous sections, how do we express our general solution in such a way that it is simple yet understandable?
Expressing our solution through Human language:
1. Get the list of names
2. Get the name to look for, let's call this the keyname
3. Compare the keyname to each of the names in the list
4. If the keyname is the same with a name in the list, add 1 to the count
5. If all the names have been compared, output the result
Expressing our solution through a flowchart:

Expressing our solution through pseudocode:
Let nameList = List of Names
Let keyName = the name to be sought
Let Count = 0
For each name in NameList do the following
if name == keyName
Count = Count + 1
Display Count
Flowcharting Symbols and their meanings
A flowchart is a design tool used to graphically represent the logic in a solution. Flowcharts typically do not display programming language commands. Rather, they state the concept in English or mathematical notation. Here are some guidelines for commonly used symbols in creating flowcharts. You can use any symbols in creating your flowcharts, as long as you are consistent in using them


additional reference:
http://www.lingoworkshop.com/Articles/A_brief_history_of_computer_programming.php
History of programming
The concept of devices that operate following a pre-defined set of instructions traces back to Greek Mythology, notably Hephaestus, the Greek Blacksmith God, and his mechanical slaves.[3] The Antikythera mechanism from ancient Greece was a calculator utilizing gears of various sizes and configuration to determine its operation.[4] Al-Jazari built programmable Automata in 1206. One system employed in these devices was the use of pegs and cams placed into a wooden drum at specific locations. which would sequentially trigger levers that in turn operated percussion instruments. The output of this device was a small drummer playing various rhythms and drum patterns.[5][6] The Jacquard Loom, which Joseph Marie Jacquard developed in 1801, uses a series of pasteboard cards with holes punched in them. The hole pattern represented the pattern that the loom had to follow in weaving cloth. The loom could produce entirely different weaves using different sets of cards. Charles Babbage adopted the use of punched cards around 1830 to control his Analytical Engine. The synthesis of numerical calculation, predetermined operation and output, along with a way to organize and input instructions in a manner relatively easy for humans to conceive and produce, led to the modern development of computer programming. Development of computer programming accelerated through the Industrial Revolution.
In the late 1880s, Herman Hollerith invented the recording of data on a medium that could then be read by a machine. Prior uses of machine readable media, above, had been for control, not data. "After some initial trials with paper tape, he settled on punched cards..."[7] To process these punched cards, first known as "Hollerith cards" he invented the tabulator, and the keypunch machines. These three inventions were the foundation of the modern information processing industry. In 1896 he founded the Tabulating Machine Company (which later became the core of IBM). The addition of a control panel (plugboard) to his 1906 Type I Tabulator allowed it to do different jobs without having to be physically rebuilt. By the late 1940s, there were a variety of plug-board programmable machines, called unit record equipment, to perform data-processing tasks (card reading). Early computer programmers used plug-boards for the variety of complex calculations requested of the newly invented machines.
The invention of the von Neumann architecture allowed computer programs to be stored in computer memory. Early programs had to be painstakingly crafted using the instructions (elementary operations) of the particular machine, often in binary notation. Every model of computer would likely use different instructions (machine language) to do the same task. Later, assembly languages were developed that let the programmer specify each instruction in a text format, entering abbreviations for each operation code instead of a number and specifying addresses in symbolic form (e.g., ADD X, TOTAL). Entering a program in assembly language is usually more convenient, faster, and less prone to human error than using machine language, but because an assembly language is little more than a different notation for a machine language, any two machines with different instruction sets also have different assembly languages.
In 1954, FORTRAN was invented; it was the first high level programming language to have a functional implementation, as opposed to just a design on paper.[8][9] (A high-level language is, in very general terms, any programming language that allows the programmer to write programs in terms that are more abstract than assembly language instructions, i.e. at a level of abstraction "higher" than that of an assembly language.) It allowed programmers to specify calculations by entering a formula directly (e.g. Y = X*2 + 5*X + 9). The program text, or source, is converted into machine instructions using a special program called a compiler, which translates the FORTRAN program into machine language. In fact, the name FORTRAN stands for "Formula Translation". Many other languages were developed, including some for commercial programming, such as COBOL. Programs were mostly still entered using punched cards or paper tape. (See computer programming in the punch card era). By the late 1960s, data storage devices and computer terminals became inexpensive enough that programs could be created by typing directly into the computers. Text editors were developed that allowed changes and corrections to be made much more easily than with punched cards. (Usually, an error in punching a card meant that the card had to be discarded and an new one punched to replace it.)
As time has progressed, computers have made giant leaps in the area of processing power. This has brought about newer programming languages that are more abstracted from the underlying hardware. Although these high-level languages usually incur greater overhead, the increase in speed of modern computers has made the use of these languages much more practical than in the past. These increasingly abstracted languages typically are easier to learn and allow the programmer to develop applications much more efficiently and with less source code. However, high-level languages are still impractical for a few programs, such as those where low-level hardware control is necessary or where maximum processing speed is vital.
Throughout the second half of the twentieth century, programming was an attractive career in most developed countries. Some forms of programming have been increasingly subject to offshore outsourcing (importing software and services from other countries, usually at a lower wage), making programming career decisions in developed countries more complicated, while increasing economic opportunities in less developed areas. It is unclear how far this trend will continue and how deeply it will impact programmer wages and opportunities.
Modern programming
Whatever the approach to software development may be, the final program must satisfy some fundamental properties. The following properties are among the most relevant:
Efficiency/performance: the amount of system resources a program consumes (processor time, memory space, slow devices such as disks, network bandwidth and to some extent even user interaction): the less, the better. This also includes correct disposal of some resources, such as cleaning up temporary files and lack of memory leaks.
Reliability: how often the results of a program are correct. This depends on conceptual correctness of algorithms, and minimization of programming mistakes, such as mistakes in resource management (e.g., buffer overflows and race conditions) and logic errors (such as division by zero or off-by-one errors).
Robustness: how well a program anticipates problems not due to programmer error. This includes situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources such as memory, operating system services and network connections, and user error.
Usability: the ergonomics of a program: the ease with which a person can use the program for its intended purpose, or in some cases even unanticipated purposes. Such issues can make or break its success even regardless of other issues. This involves a wide range of textual, graphical and sometimes hardware elements that improve the clarity, intuitiveness, cohesiveness and completeness of a program's user interface.
Portability: the range of computer hardware and operating system platforms on which the source code of a program can be compiled/interpreted and run. This depends on differences in the programming facilities provided by the different platforms, including hardware and operating system resources, expected behaviour of the hardware and operating system, and availability of platform specific compilers (and sometimes libraries) for the language of the source code.
Maintainability: the ease with which a program can be modified by its present or future developers in order to make improvements or customizations, fix bugs and security holes, or adapt it to new environments. Good practices during initial development make the difference in this regard. This quality may not be directly apparent to the end user but it can significantly affect the fate of a program over the long term.
The details look different in different languages, but a few basic instructions appear in just about every language:
•input: Get data from the keyboard, a file, or some other device.
•output: Display data on the screen or send data to a file or other device.
•arithmetic: Perform basic arithmetical operations like addition and multiplication.
•conditional execution: Check for certain conditions and execute the appropriate sequence of statements.
•repetition: Perform some action repeatedly, usually with some variation.
Many computer languages provide a mechanism to call functions provided by libraries. Provided the functions in a library follow the appropriate run time conventions (e.g., method of passing arguments), then these functions may be written in any other language.
Programmers
Computer programmers are those who write computer software. Their jobs usually involve:
•Coding
•Compilation
•Documentation
•Integration
•Maintenance
•Requirements analysis
•Software architecture
•Software testing
•Specification
•Debugging
Introduction
A computer is a machine that performs a variety of tasks according to specific
instructions. It is a data processing machine which accepts data via an input device and
its processor manipulates the data according to a program.
Overview of Computer Programming Languages
What is a Programming Language?
A programming language is a standardized communication technique for expressing instructions to a computer. Like human languages, each language has its own syntax and grammar.
Programming languages enable a programmer to precisely specify what data a computer will act upon, how these data will be stored/transmitted, and precisely what actions to take under various circumstances.
There are different types of programming languages that can be used to create programs, but regardless of what language you use, these instructions are translated into machine language that can be understood by computers.
Categories of Programming Languages
1. High-level Programming Languages
A high-level programming language is a programming language that is more user friendly, to some extent platform-independent, and abstract from low-level computer processor operations such as memory accesses. A programming statement may be translated into one or several machine instructions by a compiler. Examples are Java, C, C++, Basic, Fortran
2. Low-level Assembly Language
Assembly languages are similar to machine languages, but they are much easier to program in because they allow a programmer to substitute names for numbers. Assembly languages are available for each CPU family, and each assembly instruction is translated into one machine instruction by an assembler program.
Note: The terms "high-level" and "low-level" are inherently relative. Originally, assembly language was considered low-level and COBOL, C, etc. were considered high-level. Many programmers today might refer to these latter languages as low-level.
The Program Development Life Cycle
Programmers do not sit down and start writing code right away when trying to make a computer program. Instead, they follow an organized plan or methodology, that breaks the process into a series of tasks.
Here are the basic steps in trying to solve a problem on the computer:
1. Problem Definition
2. Problem Analysis
3. Algorithm design and representation (Pseudocode or flowchart)
4. Coding and debugging
In order to understand the basic steps in solving a problem on a computer, let us define a single problem that we will solve step-by-step as we discuss the problem solving methodologies in detail. The problem we will solve will be defined in the next section.
Problem Definition
A programmer is usually given a task in the form of a problem. Before a program can be designed to solve a particular problem, the problem must be well and clearly defined first in terms of its input and output requirements.
A clearly defined problem is already half the solution. Computer programming requires us to define the problem first before we even try to create a solution.
Let us now define our example problem:
“Create a program that will determine the number of times a name occurs in a list.”
Problem Analysis
After the problem has been adequately defined, the simplest and yet the most efficient and effective approach to solve the problem must be formulated. Usually, this step involves breaking up the problem into smaller and simpler subproblems.
Example Problem:
Determine the number of times a name occurs in a list
Input to the program:
List of names, name to look for
Output of the program:
The number of times the name occurs in a list
Algorithm design and representation
Once our problem is clearly defined, we can now set to finding a solution. In computer programming, it is normally required to express our solution in a step-by-step manner.
An Algorithm is a clear and unambiguous specification of the steps needed to solve a problem. It may be expressed in either Human language (English, Tagalog), through a graphical representation like a flowchart or through a pseudocode, which is a cross between human language and a programming language.
Now given the problem defined in the previous sections, how do we express our general solution in such a way that it is simple yet understandable?
Expressing our solution through Human language:
1. Get the list of names
2. Get the name to look for, let's call this the keyname
3. Compare the keyname to each of the names in the list
4. If the keyname is the same with a name in the list, add 1 to the count
5. If all the names have been compared, output the result
Expressing our solution through a flowchart:

Expressing our solution through pseudocode:
Let nameList = List of Names
Let keyName = the name to be sought
Let Count = 0
For each name in NameList do the following
if name == keyName
Count = Count + 1
Display Count
Flowcharting Symbols and their meanings
A flowchart is a design tool used to graphically represent the logic in a solution. Flowcharts typically do not display programming language commands. Rather, they state the concept in English or mathematical notation. Here are some guidelines for commonly used symbols in creating flowcharts. You can use any symbols in creating your flowcharts, as long as you are consistent in using them
additional reference:
http://www.lingoworkshop.com/Articles/A_brief_history_of_computer_programming.php
Tuesday, September 13, 2011
Evolution and History of Programming Languages
To build programs, people use languages that are similar to human language. The results are translated into machine code, which computers understand.
Higher-Level Languages -
Fifth-Generation Languages
Programming languages fall into three broad categories:
• Machine languages
• Assembly languages
• Higher-level languages
The Evolution of Programming Languages -
Machine Languages
• Machine languages (first-generation languages) are the most basic type of computer languages, consisting of strings of numbers the computer's hardware can use.
• Different types of hardware use different machine code. For example, IBM computers use different machine language than Apple computers.
The Evolution of Programming Languages - Assembly Languages
• Assembly languages (second-generation languages) are only somewhat easier to work with than machine languages.
• To create programs in assembly language, developers use cryptic English-like phrases to represent strings of numbers.
• The code is then translated into object code, using a translator called an assembler.
The Evolution of Programming Languages -
Higher-Level Languages
Higher-Level Languages
Higher-level languages are more powerful than assembly language and allow the programmer to work in a more English-like environment.
Higher-level programming languages are divided into three "generations," each more powerful than the last:
• Third-generation languages
• Fourth-generation languages
• Fifth-generation languages
Higher-Level Languages -
Fourth-Generation Languages
Fourth-Generation Languages
• Fourth-generation languages (4GLs) are even easier to use than 3GLs.
• 4GLs may use a text-based environment (like a 3GL) or may allow the programmer to work in a visual environment, using graphical tools.
• The following languages are 4GLs:
o Visual Basic (VB)
o VisualAge
o Authoring environments
Higher-Level Languages -
Fifth-Generation Languages
• Fifth-generation languages (5GLs) are an issue of debate in the programming community – some programmers cannot agree that they even exist.
• These high-level languages would use artificial intelligence to create software, making 5GLs extremely difficult to develop.
• Solve problems using constraints rather than algorithms, used in Artificial Intelligence
Programing Languages by category
Interpreted Programing Language:
Interpreted languages are programming in which programs may be executed from source code form, by an interpreter.
Procedural Programing Languages
Procedural programming languages are based on the concept of the unit and scope (the data viewing range of an executable code.
Scripting Programing Languages
Programing Languages by category
Interpreted Programing Language:
Interpreted languages are programming in which programs may be executed from source code form, by an interpreter.
- Ant
- APL
- J
- Lisp
- Lush
- MUMPS (an ANSI standard general purpose language
- Python
- S-Lang
- VBScript
- Windows PowerShell (Microsoft .NET-based CLI)
Procedural Programing Languages
Procedural programming languages are based on the concept of the unit and scope (the data viewing range of an executable code.
- Alma-0
- BASIC (BASICs are innocent of most modularity in (especially) versions before about 1990)
- C
- C++
- C#
- COBOL
- Combined Programming Language (CPL)
- D
- DASL
- Eiffel
- Fortran
- Java
- Pascal
- RPG
Scripting Programing Languages
- AppleScript
- ColdFusion
- Javascript
- F-Script
- Frink
- Game Maker Language (GML)
- JASS
- MAXScript
- Perl
- PHP (intended for Web servers)
- R
- S-Lang
Types of Programing Languages
Interpreted language
is a programming language in which programs are 'indirectly' executed ("interpreted") by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU.
Advantages of interpreting a language
Interpreting a language gives implementations some additional flexibility over compiled implementations. Features are often easier to implement in interpreters than in compilers include (but are not limited to):
• platform independence (Java's byte code, for example)
• reflection and reflective use of the evaluator (e.g. a first-order eval function)
• dynamic typing
• smaller executable program size (since implementations have flexibility to choose the instruction code)
• dynamic scoping
Disadvantages of interpreted languages
The main disadvantage of interpreting is a much slower speed of program execution compared to direct machine code execution on the host CPU. A technique used to improve performance is just-in-time compilation which converts frequently executed sequences of interpreted instruction to host machine code.
APL (programming language)
is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments.
Grace hopper – the mother of cobol language.
IBM – International Business Machines
Procedural Programming Language
derived from structured programming, based upon the concept of the procedure call.
Pascal was designed in 1968/9 and published in 1970 by Mr. Niklaus Wirth.
Brief description
Wirth's intention was to create an efficient language (regarding both compilation speed and generated code) based on so-called structured programming, a concept which had recently become popular. Pascal has its roots in the ALGOL 60 language, but also introduced concepts and mechanisms which (on top of ALGOL's scalars and arrays) enabled programmers to define their own complex (structured) datatypes, and also made it easier to build dynamic and recursive data structures such as lists, trees and graphs. Important features included for this were records, enumerations, subranges, dynamically allocated variables with associated pointers, and sets. To make this possible and meaningful, Pascal has a strong typing on all objects, which means that one type of data cannot be converted or interpreted as another without explicit conversions. Similar mechanisms are standard in many programming languages today. Other languages that influenced Pascal's development were COBOL, Simula 67, and Wirth's own ALGOL W.
Pascal, like many programming languages of today (but unlike most languages in the C family), allows nested procedure definitions to any level of depth, and also allows most kinds of definitions and declarations inside procedures and functions. This enables a very simple and coherent syntax where a complete program is syntactically nearly identical to a single procedure or function (except for the keyword itself, of course.)
Java
• Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform
What is the function of the program?
• It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, particularly for server-client web applications.
SCRIPTING PROGRAMMING LANGUGES
A scripting language, script language or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the end-user. Scripts are often interpreted from source code or bytecode, whereas the application is typically first compiled to native machine code.
Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile-link-run process.
PERL
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular amongst programmers.
*CGI – Computer Graphic Interface
Advantages:
* Portability: Perl code that doesn't use system specific features can be run on any platform, and these days almost every operating systems support it. So, for example, if you write an utility that renames files in a complete directory tree according to some rule, you will be able to run it on Windows and Unix (Linux, Solaris, AIX, BSD, etc), and probably Mac OS too. But if you write an utility that changes file permissions, you might run into problems, because file permission are implemented differently on different systems.
* String processing and especially Regular expression support: Perl is a winner in everything related to string processing. Its regular expression support is the most versatile in existence and seamlessly integrated into the language. (In fact, it is so good, that Perl has set a new standard for regular expression, which is now emulated in many other programs and languages).
* CPAN: has a huge collection of free and reusable Perl code for many purposes - Science, system administration, Mathematics, Biology, foreign languages, database access, networking, etc.
* It is a beautiful language that combines the best features from many other languages and is very easy to learn if you approach it properly. But that's also a matter of taste.
Disadvantages:
*You can't easily create a binary image ("exe") from a Perl file. It's not a serious problem on Unix, but it might be a problem on Windows. There are some utilities which can do it, but they are neither free nor portable.
*If you want to run your program on a different computer, you can't always be sure that Perl is installed everywhere. It is common enough on most modern Linux and Solaris installations, although some system administrators choose to not install it for various reasons. On Windows, though, it is not so common and you need to install it. The installation is easy to get and free, but it needs to be done before you can run anything.
*Moreover, if you write a script which uses modules from CPAN, and want to run it on another computer, you need to install all the modules on that other computer, which can be a drag.
PHP
is a general-purpose scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications. PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge. A competitor to Microsoft's Active Server Pages (ASP) server-side script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers.
PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP is free software released under the PHP License which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.
JavaScript
JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions. It is also considered a functional programming language like Scheme and OCaml because it has closures and supports higher-order functions.
JavaScript is an implementation of the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.
JavaScript's use in applications outside web pages—for example in PDF documents, site-specific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web apps.
JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.
AppleScrip
AppleScript is a scripting language created by Apple Inc. and built into Macintosh operating systems since System 7. The term "AppleScript" may refer to the scripting system itself, or to particular scripts that are written in the AppleScript language.
AppleScript is primarily an inter-application processing system, designed to exchange data between and control other applications in order to automate repetitive tasks. AppleScript has some limited processing abilities of its own – basic calculation abilities, and some more intricate text processing tools – and is extensible, allowing the addition of scripting additions which add new functions to the language itself. Mainly, however, AppleScript relies on the built-in functionality of other applications and processes to handle complex tasks.
AppleScript has some elements of object-oriented programming, particularly in the construction of script objects, and some Lisp-like natural language processing tendencies, but does not strictly conform to either category.
GML
Game Maker Language (GML) is a scripting language developed for use with a computer game creation application called Game Maker. It was originally created by Mark Overmars to supplement the drag-and-drop action system used in Game Maker. However, in the latest versions, all the drag-and-drop actions translate to GML rather than being separate from it.
GML is heavily integrated with the Game Maker environment. Usually, elements such as sprites and sounds are all organized within the Game Maker IDE (though they can also be loaded from external files). Game Maker's architecture is designed to handle such things as event detection, level design, and object configuration without the need to code them manually, minimizing code verbosity with intuitive interface features.
FrinkFrink, named after the fictional mad scientist Professor John Frink, is a calculating tool and programming language designed by Alan Eliasen. It is built on the Java Virtual Machine and incorporates features similar to Java, Perl, Ruby, Smalltalk, and various BASIC implementations. Its main focus is on the fields of science, engineering, physics, text processing, and education.
One of the distinguishing characteristics of Frink is that it tracks units of measure through all calculations. This allows all values to contain a quantity and its units of measure. Frink understands how different units of measure interrelate, such as a length cubed is a volume, or power multiplied by time is energy. Different units of measure can be mixed in calculations, and Frink automatically ensures that the calculations lead to a result with the expected dimensions.
is a programming language in which programs are 'indirectly' executed ("interpreted") by an interpreter program. This can be contrasted with a compiled language which is converted into machine code and then 'directly' executed by the host CPU.
Advantages of interpreting a language
Interpreting a language gives implementations some additional flexibility over compiled implementations. Features are often easier to implement in interpreters than in compilers include (but are not limited to):
• platform independence (Java's byte code, for example)
• reflection and reflective use of the evaluator (e.g. a first-order eval function)
• dynamic typing
• smaller executable program size (since implementations have flexibility to choose the instruction code)
• dynamic scoping
Disadvantages of interpreted languages
The main disadvantage of interpreting is a much slower speed of program execution compared to direct machine code execution on the host CPU. A technique used to improve performance is just-in-time compilation which converts frequently executed sequences of interpreted instruction to host machine code.
APL (programming language)
- (named after the book A Programming Language)[5] is an interactive array-oriented language and integrated development environment which is available from a number of commercial and non-commercial vendors[6] and for most computer platforms.
- It is based on a mathematical notation developed by Kenneth E. Iverson and associates
- is used in scientific,[10] actuarial,[9] statistical,[11] and financial applications where it is used by practitioners for their own work and by programmers to develop commercial applications. It was an important influence on the development of spreadsheets, functional programming,
- (an acronym which stands for Beginner's All-purpose Symbolic Instruction Code) is a family of high-level programming languages designed to be easy to use.
- - The original Dartmouth BASIC was designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College in New Hampshire, USA to provide computer access to non-science students.
- The eight design principles of BASIC were:
- Be easy for beginners to use.
- Be a general-purpose programming language.
- Allow advanced features to be added for experts (while keeping the language simple for beginners).
- Be interactive.
- Provide clear and friendly error messages.
- Respond quickly for small programs.
- Not to require an understanding of computer hardware.
- Shield the user from the operating system.
is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments.
Grace hopper – the mother of cobol language.
IBM – International Business Machines
Procedural Programming Language
derived from structured programming, based upon the concept of the procedure call.
- Procedures, also known as routines, subroutines, methods, or functions simply contain a series of computational steps to be carried out.
Pascal was designed in 1968/9 and published in 1970 by Mr. Niklaus Wirth.
Brief description
Wirth's intention was to create an efficient language (regarding both compilation speed and generated code) based on so-called structured programming, a concept which had recently become popular. Pascal has its roots in the ALGOL 60 language, but also introduced concepts and mechanisms which (on top of ALGOL's scalars and arrays) enabled programmers to define their own complex (structured) datatypes, and also made it easier to build dynamic and recursive data structures such as lists, trees and graphs. Important features included for this were records, enumerations, subranges, dynamically allocated variables with associated pointers, and sets. To make this possible and meaningful, Pascal has a strong typing on all objects, which means that one type of data cannot be converted or interpreted as another without explicit conversions. Similar mechanisms are standard in many programming languages today. Other languages that influenced Pascal's development were COBOL, Simula 67, and Wirth's own ALGOL W.
Pascal, like many programming languages of today (but unlike most languages in the C family), allows nested procedure definitions to any level of depth, and also allows most kinds of definitions and declarations inside procedures and functions. This enables a very simple and coherent syntax where a complete program is syntactically nearly identical to a single procedure or function (except for the keyword itself, of course.)
Java
• Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform
What is the function of the program?
• It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, particularly for server-client web applications.
SCRIPTING PROGRAMMING LANGUGES
A scripting language, script language or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the end-user. Scripts are often interpreted from source code or bytecode, whereas the application is typically first compiled to native machine code.
Early script languages were often called batch languages or job control languages. Such early scripting languages were created to shorten the traditional edit-compile-link-run process.
PERL
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular amongst programmers.
*CGI – Computer Graphic Interface
Advantages:
* Portability: Perl code that doesn't use system specific features can be run on any platform, and these days almost every operating systems support it. So, for example, if you write an utility that renames files in a complete directory tree according to some rule, you will be able to run it on Windows and Unix (Linux, Solaris, AIX, BSD, etc), and probably Mac OS too. But if you write an utility that changes file permissions, you might run into problems, because file permission are implemented differently on different systems.
* String processing and especially Regular expression support: Perl is a winner in everything related to string processing. Its regular expression support is the most versatile in existence and seamlessly integrated into the language. (In fact, it is so good, that Perl has set a new standard for regular expression, which is now emulated in many other programs and languages).
* CPAN: has a huge collection of free and reusable Perl code for many purposes - Science, system administration, Mathematics, Biology, foreign languages, database access, networking, etc.
* It is a beautiful language that combines the best features from many other languages and is very easy to learn if you approach it properly. But that's also a matter of taste.
Disadvantages:
*You can't easily create a binary image ("exe") from a Perl file. It's not a serious problem on Unix, but it might be a problem on Windows. There are some utilities which can do it, but they are neither free nor portable.
*If you want to run your program on a different computer, you can't always be sure that Perl is installed everywhere. It is common enough on most modern Linux and Solaris installations, although some system administrators choose to not install it for various reasons. On Windows, though, it is not so common and you need to install it. The installation is easy to get and free, but it needs to be done before you can run anything.
*Moreover, if you write a script which uses modules from CPAN, and want to run it on another computer, you need to install all the modules on that other computer, which can be a drag.
PHP
is a general-purpose scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications. PHP can be deployed on most web servers and as a standalone interpreter, on almost every operating system and platform free of charge. A competitor to Microsoft's Active Server Pages (ASP) server-side script engine and similar languages, PHP is installed on more than 20 million websites and 1 million web servers.
PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP is free software released under the PHP License which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.
JavaScript
JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions. It is also considered a functional programming language like Scheme and OCaml because it has closures and supports higher-order functions.
JavaScript is an implementation of the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.
JavaScript's use in applications outside web pages—for example in PDF documents, site-specific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web apps.
JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.
AppleScrip
AppleScript is a scripting language created by Apple Inc. and built into Macintosh operating systems since System 7. The term "AppleScript" may refer to the scripting system itself, or to particular scripts that are written in the AppleScript language.
AppleScript is primarily an inter-application processing system, designed to exchange data between and control other applications in order to automate repetitive tasks. AppleScript has some limited processing abilities of its own – basic calculation abilities, and some more intricate text processing tools – and is extensible, allowing the addition of scripting additions which add new functions to the language itself. Mainly, however, AppleScript relies on the built-in functionality of other applications and processes to handle complex tasks.
AppleScript has some elements of object-oriented programming, particularly in the construction of script objects, and some Lisp-like natural language processing tendencies, but does not strictly conform to either category.
GML
Game Maker Language (GML) is a scripting language developed for use with a computer game creation application called Game Maker. It was originally created by Mark Overmars to supplement the drag-and-drop action system used in Game Maker. However, in the latest versions, all the drag-and-drop actions translate to GML rather than being separate from it.
GML is heavily integrated with the Game Maker environment. Usually, elements such as sprites and sounds are all organized within the Game Maker IDE (though they can also be loaded from external files). Game Maker's architecture is designed to handle such things as event detection, level design, and object configuration without the need to code them manually, minimizing code verbosity with intuitive interface features.
FrinkFrink, named after the fictional mad scientist Professor John Frink, is a calculating tool and programming language designed by Alan Eliasen. It is built on the Java Virtual Machine and incorporates features similar to Java, Perl, Ruby, Smalltalk, and various BASIC implementations. Its main focus is on the fields of science, engineering, physics, text processing, and education.
One of the distinguishing characteristics of Frink is that it tracks units of measure through all calculations. This allows all values to contain a quantity and its units of measure. Frink understands how different units of measure interrelate, such as a length cubed is a volume, or power multiplied by time is energy. Different units of measure can be mixed in calculations, and Frink automatically ensures that the calculations lead to a result with the expected dimensions.
Wednesday, June 22, 2011
Adding and Subtracting binary numbers
Adding binary numbers
Adding binary numbers is very similar to adding decimal numbers, first an example:Let's look at the above example step by step:
1 + 1 = 0 (carry one)
1 + 1 (+ the carry) = 1 (carry one)
0 + 1 (+ the carry) = 0 (carry one)
1 + 0 (+ the carry) = 0 (carry one)
1 + 0 (+ the carry) = 0 (carry one)
0 + 1 (+ the carry) = 0 (carry one)
1 + 0 (+ the carry) = 0 (carry one)
The last carry is placed at the left hand side of the result giving: 10000010
reference: helpwithpcs.com
Subtracting Binary Numbers
The most common way of subtracting binary numbers is done by first taking the second value (the number to be subtracted) and apply what is known as two's complement, this is done in two steps:
- complement each digit in turn (change 1 for 0 and 0 for 1).
- add 1 (one) to the result.
By applying these steps you are effectively turning the value into a negative number, and as when dealing with decimal numbers, if you add a negative number to a positive number then you are effectively subtracting to the same value.
In other words 25 + (-8) = 17, which is the same as writing 25 - 8 = 17.
An example, let's do the following subtraction 11101011 - 01100110 (23510 - 10210)
note: When subtracting binary values it is important to maintain the same amount of digits for each number, even if it means placing zeroes to the left of the value to make up the digits, for instance, in our example we have added a zero to the left of the value 1100110 to make the amount of numerals up to 8 (one byte) 01100110.
First we apply two's complement to 01100110
which gives us 10011010.
Now we need to add 11101011 + 10011010, however when you do the addition you always disregard the last carry, so our example would be:
which gives us 10000101, now we can convert this value into decimal, which gives 13310
So the full calculation in decimal is 23510 - 10210 = 13310 (correct !!)
reference: helpwithpcs.com
Subscribe to:
Posts (Atom)


