0% found this document useful (0 votes)
42 views

Text 1 Computer Language

Computer languages allow programmers to write instructions for computers in a more intuitive way compared to machine language. Early computers led to the development of assembly language which represented instructions through operations like addition instead of binary. Higher-level languages later emerged which allow programmers to write commands in terms that are independent of the computer's design. These languages must be translated into lower-level languages understood by computers through compilers or interpreters. Elements of programming languages aim to make code more structured and reusable through techniques like control structures, procedures, and local variables.

Uploaded by

karol2611
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Text 1 Computer Language

Computer languages allow programmers to write instructions for computers in a more intuitive way compared to machine language. Early computers led to the development of assembly language which represented instructions through operations like addition instead of binary. Higher-level languages later emerged which allow programmers to write commands in terms that are independent of the computer's design. These languages must be translated into lower-level languages understood by computers through compilers or interpreters. Elements of programming languages aim to make code more structured and reusable through techniques like control structures, procedures, and local variables.

Uploaded by

karol2611
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

TEXT 1 COMPUTER LANGUAGE

The power of a digital computer lies in the rapidity with which it can execute many instructions. Each instruction executed by the Central Processing Unit (CPU) of a computer performs a small part of a much larger task. In the early days of electronic computers it was recognized that the computer itself could be used to translate powerful instructions automatically into sequences of elementary instructions. Thus the concept of computer languages was born. Machine and Assembly Languages A CPU operates by responding to differences in electrical voltages. Higher and lower voltages are represented in the most basic computer language machine language by the binary digits zero and one. Machine-language programs are composed of long strings of BINARY NUMBERS and are difficult to understand. Assembly language is a step up from machine language. It allows the computer programmer to think in terms of cumulative operations, such as addition and subtraction, rather than the more basic electrical modulations. An assembler program translates such operations into a machine-language program. Machine and assembly languages are called low-level languages. High-Level Languages Computer programmers need to express problems in a form that is independent of the design of the CPU. They also prefer not to specify every detail of an operation when writing COMPUTER SOFTWARE. So high-level, or symbolic, computer languages have been developed witth a high-level language a user can obtain the sum of two numbers by giving the computer a command such as PRINT 512 + 637. For this to happen, high-level languages must be translated into low-level languages. This is accomplished, within the computer, by either a COMPILER or an INTERPRETER. A compiler program translates a source program into machine language and executes it. An interpreter program reads individual words of a source program, causing the consecutive executions of partial segments of a machine-language program. A compiler program runs more quickly but is more difficult to write than an interpreter program. Personal computers tend to use interpreted languages such as BASIC. Minicomputers and mainframe computers often use compiled languages such as FORTRAN. Elements of Programming Languages A major concern of structured programming languages is the use of control structures to indicate parts of a program that are to be repeated or executed conditionally. Examples of these are FOR...NEXT, IF...THEN...ELSE, WHILE...REPEAT, and DO...UNTIL. The popular language BASIC lacks the last two of these structures and relies instead on a GOTO instruction that causes the computer and programmer to jump to any indicated position in the program. Use of the GOTO instruction can make a program very difficult to understand, because an instruction such as GOTO 1500 does not indicate to someone reading the program what operations are performed at line 1500. Another programming language concern is the design of small program parts that can be invoked by name whenever the functions of those parts are required in a program. This makes a main program easier to understand; in addition, libraries of such prewritten procedures can be shared. A final concern of programming languages is the design of so-called local variables. A local variable is a variable symbol recognized only within a particular procedure. Local variables prevent unexpected and unwanted interactions between parts of a program. They are particularly important when different parts of a program are written by different programmers. Although the symbols, words, and styles of different programming languages appear very different, most languages share many functional features. An example of this is a loop procedure, used to control repetitive tasks.

You might also like