1 / 18

L 9 Low level and high Level Languages

Low-level languages, like machine language and assembly language, are closer to hardware, making them fast but difficult to program. In contrast, high-level languages like C, Java, and Python are easier to write, understand, and debug, as they use human-readable syntax. High-level languages require compilers or interpreters to convert code into machine language, making them more portable and efficient for software development.

Anita101
Download Presentation

L 9 Low level and high Level Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LOW vs. HIGH Level Languages Dr Anita Choudhary Assistant Professor Department of Computer Science anitach312@gmail.com

  2. Table of Content

  3. Types of Programming Languages There are five generations of Programming languages. They are: • First-Generation Languages : These are low-levellanguages like machinelanguage. • Second-Generation Languages : These are low-level assembly languages used in kernels and hardware drives. • Third-Generation Languages : These are high-level languages like C, C++, Java, Visual Basic, and JavaScript. • Fourth Generation Languages : These are languages that consist of statements that are similar to statements in the human language. These are used mainly in database programming and scripting. Examples of these languages include Perl, Python, Ruby, SQL, and MatLab(MatrixLaboratory). • Fifth Generation Languages : These are the programming languages that have visual tools to develop a program. Examples of fifth-generation languages include Mercury, OPS5, and Prolog.

  4. Hierarchy of Computer Language

  5. Difference between Low and High Level Languages • Both High level language and low level language are the programming language’s types. • The main difference between high level language and low level language is that, Programmers can easily understand or interpret or compile the high level language in comparison of machine. • Low level language is high memory efficient. • Low level languages are closer to hardware as compared to high-level languages instead of software. They provide little or no abstraction from the machine instructions and that’s why they allow programmers to manipulate hardware elements like register, memory etc. • Low-level languages are often used for designing systems, such as developing operating systems, device drivers, and embedded systems.

  6. Programming Language

  7.  First-Generation Language The first-generation languages are also called machine languages/ 1G language. This language is machine-dependent. The machine language statements are written in binary code (0/1 form) because the computer can understand only binary language. Advantages : 1. Fast & efficient as statements are directly written in binary language. 2. No translator is required. Disadvantages : 1.  Difficult to learn binary codes. 2. Difficult to understand – both programs & where the error occurred.

  8. Second Generation Language The second-generation languages are also called assemblerlanguages/ 2G languages. Assembly language contains human-readable notations that can be further converted to machine language using an assembler. • Assembler – converts assembly level instructions to machine-level instructions. • Programmers can write the code using symbolic instruction codes that are meaningful abbreviations of mnemonics. It is also known as low-level language. Advantages : 1. It is easier to understand if compared to machine language. 2. Modifications are easy. 3. Correction & location of errors are easy. Disadvantages : 1. Assembler is required. 2. This language is architecture /machine-dependent, with a different instruction set for different machines.

  9. Second Generation Language

  10. Third-Generation Language • The third generation is also called procedural language /3 GL. It consists of the use of a series of English-like words that humans can understand easily, to write instructions. • It’s also called High-Level Programming Language. For execution, a program in this language needs to be translated into machine language using a Compiler/ Interpreter. Examples of this type of language are C, PASCAL, FORTRAN, COBOL, etc. Advantages : 1. Use of English-like words makes it a human-understandable language. 2. Lesser number of lines of code as compared to the above 2 languages. 3. Same code can be copied to another machine & executed on that machine by using compiler-specific to that machine.

  11. Third-Generation Language Disadvantages : 1. Compiler/ interpreter is needed. 2. Different compilers are needed for different machines.

  12. Fourth Generation Language The fourth-generation language is also called a non – procedural language/ 4GL. It enables users to access the database. Examples: SQL, Foxpro, Focus, etc. These languages are also human-friendly to understand. Advantages : 1. Easy to understand & learn. 2. Less time is required for application creation. 3. It is less prone to errors. Disadvantages : 1. Memory consumption is high. 2. Has poor control over Hardware. 3. Less flexible.

  13. Fifth Generation Language The fifth-generation languages are also called 5GL. It is based on the concept of artificial intelligence. It uses the concept that rather than solving a  problem algorithmically, an application can be built to solve it based on some constraints, i.e., we make computers learn to solve any problem. ParallelProcessing & superconductors are used for this type of language to make real artificial intelligence. Examples: PROLOG, LISP, etc. Advantages : 1. Machines can make decisions. 2. Programmer effort reduces to solve a problem. 3. Easier than 3GL or 4GL to learn and use. Disadvantages : 1. Complex and long code. 2. More resources are required & they are expensive too.

  14. Machine Language • In order to execute instructions on a CPU, those instructions must be in the particular binary format that was designed for that CPU. • The set of instructions available for a particular CPU is known as its machine language. • Sample Machine Instruction Format : Op-Code Field (specifies the operation to be performed) Operand Field (gives further details pertinent to the operation). • take the instruction: 0xEB 0xFE This could also be written as 11101011 11111110 in binary.

  15. Assembly Language • Assembly language is a low-level language that helps to communicate directly with computer hardware. • Assembly languages contain mnemonic codes that specify what the processor should do. • The mnemonic code that was written by the programmer was converted into machine language (binary language) for execution. • An assembler is used to convert assembly code into machine language. That machine code is stored in an executable file for the sake of execution.

  16. High-level Language • High-level languages are programming languages that are used for writing programs or software that can be understood by humans and computers. • High-level languages are easier to understand for humans because they use a lot of symbols letters phrases to represent logic and instructions in a program. • Characteristics of High-Level Language • Abstraction • Human-Readable Syntsx: • Portability • Easy to Use:  • Productivity • Automatic Memory Management • Enhanced Debugging and Error Handling • Rich Standard Libraries

  17. Language

  18. Thank You

More Related