Ethical Hacking Programming, Blogging, Hosting, All Computer Software, PC Software Download, JAVA in hindi, HTML, PHP, C, C++, Free Learning, Software's Download, Technical Videos, Technical Tricks and Tips, How Make Money

C programming Programming and Programming Languages Class 1

Programming and Programming Languages


The native language of a computer is binary—ones and zeros—and all instructions and data must be provided to it in this form. Native binary code is called machine language. The earliest digital electronic computers were programmed directly in binary, typically via punched cards, plug-boards, or front-panel switches.  Later, with the advent of terminals with keyboards and monitors, such programs were written as sequences of hexadecimal numbers, where each hexadecimal digit represents a four binary digit sequence.  Developing correct programs in machine language is tedious and complex, and practical only for very small programs.

In order to express operations more abstractly, assembly languages were developed. These lanes are simple memory instructions that map the sequence of machine language operations directly. For example, sends Movi instruction data in a register, ADD instruction adds the contents of two registers together. Programs written in the assembly language are translated into machine code using an assembler program. While Assembly languages ​​are greatly improved-
Suggestions on raw binary, they are still inappropriate for very low levels and huge programming. Moreover, since each processor provides its own Simlr speech, assembly language programs are non-portable; A program must be rewritten to run on a different machine.

The 1950s and 60s saw the introduction of high-level languages, such as Fortran and Algol.
These languages provide mechanisms, such as subroutines and conditional looping constructs, which
greatly enhance the structure of a program, making it easier to express the progression of instruction
execution; that is, easier to visualise program flow.  Also, these mechanisms are an abstraction of
the underlying machine instructions and, unlike assembler, are not tied to any particular hardware.
Thus, ideally, a program written in a high-level language may be ported to a different machine and run without change. To produce executable code from such a program, it is translated to machine-
specific assembler language by a compiler program, which is then coverted to machine code by an assembler (see Appendix B for details on the compilation process).

Compiled code is not the only way to execute a high-level program. An alternative is to translate
the program on-the-fly using an interpreter program (e.g., Matlab, Python, etc). Given a text-file
containing a high-level program, the interpreter reads a high-level instruction and then executes the
necessary set of low-level operations.  While usually slower than a compiled program, interpreted
code avoids the overhead of compilation-time and so is good for rapid implementation and testing.
Another alternative, intermediate between compiled and interpreted code, is provided by a virtual
machine (e.g., the Java virtual machine), which behaves as an abstract-machine layer on top of a
real machine. A high-level program is compiled to a special byte-code rather than machine language,
and this intermediate code is then interpreted by the virtual machine program.  Interpreting byte
code is usually much faster than interpreting high-level code directly. Each of these representations
has is relative advantages: compiled code is typically fastest, interpreted code is highly portable and
quick to implement and test, and a virtual machine offers a combination of speed and portability.
The primary purpose of a high-level language is to permit more direct expression of a program-
mer’s design. The algorithmic structure of a program is more apparent, as is the flow of information
between different program components. High-level code modules can be designed to “plug” together
piece-by-piece, allowing large programs to be built out of small, comprehensible parts. It is impor-
tant to realise that programming in a high-level language is about communicating a software design
to programmers not to the computer.  Thus, a programmer’s focus should be on modularity and
readability rather than speed. Making the program run fast is (mostly) the compiler’s concern.


Share:

Related Posts:

No comments:

Post a Comment

Follow On YouTube