CS420 MIDTERM 1 VERIFIED STUDY GUIDE
Machine Code - Answers - Every line of code written must be translated to machine
code (s and 1s) for a computer to understand and process it.
Low Level Language - Assembly - Answers - Provide close control over hardware
resources and memory management. Assembly languages provide users with a way to
interact closely with hardware. Broadly classified into RISC and CISC architectures.
High Level Languages - Answers - Abstract many low-level details, making coding more
human-readable and efficient. Examples are all general-purpose programming
languages (C, Java, Python). The code needs to be compiled -> assembled ->
translated.
Compiled Languages - Answers - Compilation Process: Source code is translated into
machine code or an intermediate code by a compiler before execution. This process is
called compilation.
Execution: Once the code is compiled, the resulting executable file can be run directly
by the computer's operating system without the need for further translation.
Performance: Compiled languages often offer better performance since the code is
already translated into machine code. This can lead to faster execution compared to
interpreted languages.
Portability: Compiled code can be less portable since it's generated for a specific
architecture. Separate compilations may be needed for different platforms.
Debugging: Debugging can sometimes be more challenging in compiled languages
because issues might be detected at runtime rather than during the compilation
process.
Examples: C, C++, Rust, Swift, and Fortran
Interpreted Languages - Answers - Execution Process: The source code is directly
executed by the interpreter, which translates and executes the code line by line at
runtime
Execution: The code is executed directly, without creating a separate compiled
executable. It is more portable
Performance: Can be slower than compiled languages due to the additional step of
interpreting the code at runtime
Machine Code - Answers - Every line of code written must be translated to machine
code (s and 1s) for a computer to understand and process it.
Low Level Language - Assembly - Answers - Provide close control over hardware
resources and memory management. Assembly languages provide users with a way to
interact closely with hardware. Broadly classified into RISC and CISC architectures.
High Level Languages - Answers - Abstract many low-level details, making coding more
human-readable and efficient. Examples are all general-purpose programming
languages (C, Java, Python). The code needs to be compiled -> assembled ->
translated.
Compiled Languages - Answers - Compilation Process: Source code is translated into
machine code or an intermediate code by a compiler before execution. This process is
called compilation.
Execution: Once the code is compiled, the resulting executable file can be run directly
by the computer's operating system without the need for further translation.
Performance: Compiled languages often offer better performance since the code is
already translated into machine code. This can lead to faster execution compared to
interpreted languages.
Portability: Compiled code can be less portable since it's generated for a specific
architecture. Separate compilations may be needed for different platforms.
Debugging: Debugging can sometimes be more challenging in compiled languages
because issues might be detected at runtime rather than during the compilation
process.
Examples: C, C++, Rust, Swift, and Fortran
Interpreted Languages - Answers - Execution Process: The source code is directly
executed by the interpreter, which translates and executes the code line by line at
runtime
Execution: The code is executed directly, without creating a separate compiled
executable. It is more portable
Performance: Can be slower than compiled languages due to the additional step of
interpreting the code at runtime