Skip to main content

Computer program

Computer program

A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer requires programs to function, and typically executes the program's instructions in a central processing unit.

A computer program is usually written by a computer programmer in a programming language. From the program in its human-readable form of source code, a compiler can derive machine code—a form consisting of instructions that the computer can directly execute. Alternatively, a computer program may be executed with the aid of an interpreter.

A part of a computer program that performs a well-defined task is known as an algorithm. A collection of computer programs, libraries and related data are referred to as software. Computer programs may be categorized along functional lines, such as application software or system software.

Computer programming

Computer programming is the process of writing or editing source code. Editing source code involves testing, analyzing, refining, and sometimes coordinating with other programmers on a jointly developed program. A person who practices this skill is referred to as a computer programmer, software developer, and sometimes coder.

The sometimes lengthy process of computer programming is usually referred to as software development. The term software engineering is becoming popular as the process is seen as an engineering discipline.

Programming languages
A computer program written in the imperative programming style
Computer programs can be categorized by the programming language paradigm used to produce
them. Two of the main paradigms are imperative and declarative.

Imperative languages
Imperative programming languages specify a sequential algorithm using declarations, expressions, and statements:

A declaration couples a variable name to a datatype – for example: var x: integer;
An expression yields a value – for example: 2 + 2 yields 4
A statement might assign an expression to a variable or use the value of a variable to alter the program's control flow – for example: x := 2 + 2; if x = 4 then do_something();
One criticism of imperative languages is the side effect of an assignment statement on a class of variables called non-local variables.

Declarative languages
Declarative programming languages describe what computation should be performed and not how to compute it. Declarative programs omit the control flow and are considered sets of instructions. Two broad categories of declarative languages are functional languages and logical languages. The principle behind functional languages (like Haskell) is to not allow side effects, which makes it easier to reason about programs like mathematical functions. The principle behind logical languages (like Prolog) is to define the problem to be solved – the goal – and leave the detailed solution to the Prolog system itself. The goal is defined by providing a list of subgoals. Then each subgoal is defined by further providing a list of its subgoals, etc. If a path of subgoals fails to find a solution, then that subgoal is backtracked and another path is systematically attempted.


Compilation and interpretation
A computer program in the form of a human-readable, computer programming language is called source code. Source code may be converted into an executable image by a compiler or executed immediately with the aid of an interpreter.

Compilers are used to translate source code from a programming language into either object code or machine code. Object code needs further processing to become machine code, and machine code consists of the central processing unit's native instructions, ready for execution. Compiled computer programs are commonly referred to as executables, binary images, or simply as binaries – a reference to the binary file format used to store the executable code.

Interpreters are used to execute source code from a programming language immediately, without an intermediate file. The interpreter decodes each statement and performs its behavior. One advantage of interpreters is the ability to generate an interactive session. The programmer is presented with a prompt, and individual lines of code are typed in and performed immediately.

The main disadvantage of interpreters is computer programs run slower than when compiled. Interpreting code is slower because the interpreter must decode each statement and then perform it. However, software development may be faster using an interpreter because testing is immediate when the compiling step is omitted. Another disadvantage of interpreters is an interpreter must be present on the executing computer. By contrast, compiled computer programs need no compiler present during execution.

Just in time compilers pre-compile computer programs ahead of time and interpret them later. For example, Java computer programs are pre-compiled into a file containing bytecode. Bytecode is then executed by an interpreter called a virtual machine.

Either compiled or interpreted programs might be executed in a batch process without human interaction. Batch programming languages are called scripting languages. One common scripting language is Unix shell, and its executing environment is called the command-line interface.

No properties of a programming language require it to be exclusively compiled or exclusively interpreted. The categorization usually reflects the most popular method of language execution. For example, BASIC is thought of as an interpreted language and C a compiled language, despite the existence of BASIC compilers and C interpreters.


Storage and execution


In the 1950s, computer programs were stored on perforated paper tape
Typically, computer programs are stored in non-volatile memory until requested either directly or indirectly to be executed by the computer user. Upon such a request, the program is loaded into random-access memory, by a computer program called an operating system, where it can be accessed directly by the central processor. The central processor then executes ("runs") the program, instruction by instruction, until termination. A program in execution is called a process. Termination is either by normal self-termination or by error – software or hardware error.

Simultaneous execution
Many operating systems support multitasking which enables many computer programs to appear to run simultaneously on one computer. Operating systems may run multiple programs through process scheduling – a software mechanism to switch the CPU among processes often so users can interact with each program while it runs. Within hardware, modern day multiprocessor computers or computers with multi core processors may run multiple programs.

Multiple lines of the same computer program may be simultaneously executed using threads. Multithreading processors are optimized to execute multiple threads efficiently.

Self-modifying programs
A computer program in execution is normally treated as being different from the data the program operates on. However, in some cases, this distinction is blurred when a computer program modifies itself. The modified computer program is subsequently executed as part of the same program. Self-modifying code is possible for programs written in machine code, assembly language, Lisp, C, COBOL, PL/1, and Prolog.


Functional categories

Computer programs may be categorized along functional lines. The main functional categories are application software and system software. System software includes the operating system which couples computer hardware with application software. The purpose of the operating system is to provide an environment in which application software executes in a convenient and efficient manner. In addition to the operating system, system software includes embedded programs, boot programs, and micro programs. Application software designed for end users have a user interface. Application software not designed for the end user includes middleware, which couples one application with another. Application software also includes utility programs. The distinction between system software and application software is under debate.

Application software

The word app came to being in 21st century. It is a clipping of the word "application". They have been designed for many platforms, but the word was first used for smaller mobile apps. Desktop apps are traditional computer programs that run on desktop computers. Mobile apps run on mobile devices. Web apps run inside a web browser. Both mobile and desktop apps may be purchased from app stores such as Windows Store, Apple App Store, Mac App Store, Google Play or Intel AppUp.
An application suite consists of multiple applications bundled together. Examples include Microsoft Office, LibreOffice and iWork. They bundle a word processor, spreadsheet, and other applications.
Enterprise applications bundle accounting, personnel, customer, and vendor applications. Examples include enterprise resource planning, customer relationship management, and supply chain management software.
Enterprise infrastructure software supports the enterprise's software systems. Examples include databases, email servers, and network servers.
Information worker software are designed for workers at the departmental level. Examples include time management, resource management, analytical, collaborative and documentation tools. Word processors, spreadsheets, email and blog clients, personal information system, and individual media editors may aid in multiple information worker tasks.
Media development software generates print and electronic media for others to consume, most often in a commercial or educational setting. These produce graphics, publications, animations, and videos.
Product engineering software is used to help develop large machines and other application software. Examples includes computer-aided design (CAD), computer-aided engineering (CAE), and integrated development environments.
Entertainment Software can refer to video games, movie recorders and players, and music recorders and players.

Utility programs
Utility programs are application programs designed to aid system administrators and computer programmers.

Operating system
An operating system is a computer program that acts as an intermediary between a user of a computer and the computer hardware. 

In the 1950s, the programmer, who was also the operator, would write a program and run it. After the program finished executing, the output may have been printed, or it may have been punched onto paper tape or cards for later processing. More often than not the program did not work.  The programmer then looked at the console lights and fiddled with the console switches. If less fortunate, a memory printout was made for further study. In the 1960s, programmers reduced the amount of wasted time by automating the operator's job. A program called an operating system was kept in the computer at all times.

Originally, operating systems were programmed in assembly; however, modern operating systems are typically written in C.

Boot program
A stored-program computer requires an initial computer program stored in its read-only memory to boot. The boot process is to identify and initialize all aspects of the system, from processor registers to device controllers to memory contents. Following the initialization process, this initial computer program loads the operating system and sets the program counter to begin normal operations.

Embedded programs
The micro controller on the right of this USB flash drive is controlled with embedded firmware.
Independent of the host computer, a hardware device might have embedded firmware to control its operation. Firmware is used when the computer program is rarely or never expected to change, or when the program must not be lost when the power is off.

Microcode programs
Microcode programs control some central processing units and some other hardware. This code moves data between the registers, buses, arithmetic logic units, and other functional units in the CPU. Unlike conventional programs, microcode is not usually written by, or even visible to, the end users of systems, and is usually provided by the manufacturer, and is considered internal to the device.




Comments

  1. SEGA GENESIS - GAN-GAMING
    SEGA sol.edu.kg GENESIS. GENESIS-HANDS. https://septcasino.com/review/merit-casino/ Genesis (JP-EU). NA. NA. NA. 바카라 사이트 SEGA GENESIS-HANDS. NA. SEGA GENESIS. 1xbet korean NA. GENESIS-HANDS. herzamanindir.com/ NA.

    ReplyDelete

Post a Comment

Popular posts from this blog

[Updated] Windows 8 / 8.1 product key with Activator 2016

Windows 8 / 8.1 Product key for activation 2015 Windows is doubtlessly one of the best operating systems out there. It has many awesome features and updates which make it unique and keeps the users attached to itself. Not only easy usable interface also some features which is very unique compared to other open source and Linux operating systems. Thus it is suitable for users such as windows 8.1 key, windows 8 keys, product key for windows 8, windows 8 product key, windows 8.1 CD key, window 8.1 product key. Windows 8 Product Key / Windows 8.1 Product Key windows 8-8.1 product keys There are many versions in the windows 8. It has trail preview versions such as windows 8 developer preview, windows 8 release preview, & finally the windows 8 RTM which is the retail pack of the windows. Not only the PC operating system but also the server OS which is required to run powerful servers also available with the windows release. Windows 8.1 and 8 Product Key List: Here we a...

[Working] SpyHunter 4 Email and Password 2016 Free download

[Working] SpyHunter 4 Email and Password 2016 Free download SpyHunter 4 Email And Password 2016 Free Download Crack Hello friends, this post is the updated version and I have published this version and it is 100% true and all the given credentials are working emails and passwords with the Spyhunter registration key in this post. Through this post you can get the SpyHunter malware protection software Email  and password easily. SpyHunter 4 Email And Password 2016: Spyhunter 4 2016 version is a very good anti virus and a spyware. It is one of the most used anti-spyware application. It supports all kinds of the computer applications and it prevents the computer from the most dangerous viruses. It works with the advanced technology’s. It has the capacity to detect and remove all the spywares and other applications that install the unwanted applications and make problems to the computer system. It also prevents the system from Trojans and other spyware programs. Here I’m giving...

[100% Working] Kaspersky Internet Security 2016 Key Free Download

[100% Working] Kaspersky Internet Security 2016 Key Free Download Kaspersky Internet Security 2016 Serial Keys Kaspersky activation code: As we all use the Internet more and more, cyber criminals are finding new ways to get kaspersky 2016 key and attack suspecting users – to steal money, personal information & identities. If you use the Internet regularly – for shopping, banking & socializing – your PC needs much more than just antivirus protection. In 2013, AV-Comparatives – the independent testing lab – gave its ‘Product of the Year’ award to Kaspersky Internet Security 2016 Keys. If you are still using the old and outdated antivirus program then it’s time to use Kaspersky Internet Security 2016 free license keys activation code for 180 days. The product key will be unique and provided by the official antivirus company so that you don’t have to buy new one. Kaspersky Internet Security includes all of the features provided by Kaspersky Anti-Virus… plus a vast range of a...