language.generations - Programming Languages On completion...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Languages On completion of this chapter, you will be able to: Distinguish between low-level and high level programming languages. Differentiate between an assembler, an interpreter, and a compiler. Differentiate among the five different generations of programming languages. Introduction There are many programming languages that have been developed to code programs. As of writing this document, I have counted in excess of 560. As many as there have been some are extinct. Although there are so many, these languages can be grouped into two categories – low-level languages and high-level languages. The classification of these two types of languages gives rise to the different generations of programs. As we will see, low-level languages describe two generations of programs – first generation and second generation. High-level languages give rise to what is describes as third generation languages. There is also forth and fifth generation languages. Every generation language as you might suspect by now, has features that are different from one another. This document will help you to understand the similarities and differences of one generation of programming from another. Low Level Languages These types of programming languages are machine dependent. That is, the code written for one type of machine or processor cannot be understood by a different type of processor. This is because every class of processor is designed with its own set of primitive instruction codes. First Generation language The first type of low-level language is called first generation language, sometimes called machine language. As with all first generation language, their codes must be written in binary digits. As you know, a computer (the processor) can only understand binary information. As such, first generation languages do not need a compiler or interpreter to run. The processor for which the language was written is able to run the binary code directly. The following section takes a closer look at machine language programs in general. Machine Language Instruction Let us design a four address hypothetical computer. That is, each instruction for this machine is contained in four fields, as shown in Figure 1 Figure 1 Format for one machine instruction code 1 Operation code Register number Register number Memory address 4 bits 4 bits 4 bits 4 bits
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The field, operation code , represents some primitive operation of the processor, such as arithmetic operations. The field, register number , represents one of the registers of the processor; and field, memory address , represents an address of primary memory (RAM). We will make each field four bits long. Also, let us design this machine with one accumulator register within the ALU, so that when certain operation is performed, the result of that operation is placed in the accumulator. The accumulator register will be implied within the instruction. Let us design this machine with another feature. It has seven basic operations that are indigenous to it – load,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 16

language.generations - Programming Languages On completion...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online