Podcast
Questions and Answers
What is the primary purpose of a high-level language?
What is the primary purpose of a high-level language?
Compiled code is highly portable and quick to implement and test.
Compiled code is highly portable and quick to implement and test.
False
What is the intermediate code that a high-level program is compiled to in a virtual machine?
What is the intermediate code that a high-level program is compiled to in a virtual machine?
byte-code
Interpreted code is usually slower than a __________________ program.
Interpreted code is usually slower than a __________________ program.
Signup and view all the answers
Match the following executable code representations with their characteristics:
Match the following executable code representations with their characteristics:
Signup and view all the answers
Developing correct programs in machine language is practical for large-scale programs.
Developing correct programs in machine language is practical for large-scale programs.
Signup and view all the answers
What is the native language of a computer?
What is the native language of a computer?
Signup and view all the answers
What is the purpose of an assembler program?
What is the purpose of an assembler program?
Signup and view all the answers
The ___________ language provides mechanisms, such as subroutines and conditional looping constructs, which greatly enhance the structure of a program.
The ___________ language provides mechanisms, such as subroutines and conditional looping constructs, which greatly enhance the structure of a program.
Signup and view all the answers
Match the following programming languages with their characteristics:
Match the following programming languages with their characteristics:
Signup and view all the answers
Study Notes
Compilation Process
- A compiler translates a high-level program to machine-specific assembler language, which is then converted to machine code by an assembler.
- Compiled code is usually faster than interpreted code, but requires compilation-time.
Interpreted Code
- An interpreter translates a high-level program on-the-fly, executing the necessary set of low-level operations.
- Interpreted code avoids the overhead of compilation-time, making it suitable for rapid implementation and testing.
- Examples of interpreted code languages include Matlab and Python.
Virtual Machine
- A virtual machine behaves as an abstract-machine layer on top of a real machine.
- A high-level program is compiled to a special byte-code, which is then interpreted by the virtual machine program.
- Interpreting byte-code is usually faster than interpreting high-level code directly.
- Examples of virtual machines include the Java virtual machine.
Advantages of Representations
- Compiled code is typically fastest.
- Interpreted code is highly portable and quick to implement and test.
- Virtual machines offer a combination of speed and portability.
High-Level Language
- The primary purpose of a high-level language is to permit more direct expression of a programmer's design.
- High-level code modules can be designed to "plug" together piece-by-piece, allowing large programs to be built out of small, comprehensible parts.
Machine Language
- The native language of a computer is binary—ones and zeros.
- Machine language is called native binary code.
- Developing correct programs in machine language is tedious and complex, and practical only for very small programs.
Assembly Language
- Assembly languages have simple mnemonic instructions that directly map to a sequence of machine language operations.
- Programs written in assembly language are translated to machine code using an assembler program.
- Assembly languages are low-level and unsuited to large-scale programming.
- Assembly language programs tend to be non-portable, requiring rewriting to run on a different machine.
High-Level Languages
- High-level languages, such as Fortran and Algol, were introduced in the 1950s and 60s.
- These languages provide mechanisms, such as subroutines and conditional looping constructs, which enhance the structure of a program.
- High-level languages are an abstraction of the underlying machine instructions and are not tied to any particular hardware.
- Ideally, a program written in a high-level language can be ported to a different machine and run without change.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Learn about the native language of computers, machine language, and how early digital computers were programmed using binary and hexadecimal codes.