Computer Systems Flashcards
Define “hardware”.
hardware refers to the physical components of a computer system. These are the tangible parts that work together to perform various tasks, such as processing data, storing information, and interacting with users.
Define “software”.
software refers to the programs and applications that run on a computer, enabling it to perform specific tasks. Unlike hardware, software is intangible and consists of instructions that tell the computer what to do.
Describe the relationship between hardware and software.
They work together to perform tasks and execute operations.
Explain “system software”. Give examples.
system software manages the computer system resources and acts as a platform to run application software. macOS, Linux, Android, and Microsoft Windows)
Explain “application software”. Give examples.
application software is software that performs end-user tasks. word processors, web browsers and spreadsheet software.
name the 5 things the OS manages.
processor(s)
memory
input/output (I/O) devices
applications
security.
Explain the main differences between low-level and high-level languages.
Abstraction:
Low-level: Close to hardware, less abstract.
High-level: More abstract, easier for humans to read.
Ease of Use:
Low-level: Difficult to learn and write.
High-level: Easier to write and understand.
Control:
Low-level: More control over hardware and memory.
High-level: Less control, abstracted away from hardware.
Portability:
Low-level: Not portable, machine-specific.
High-level: Portable across different platforms.
Execution Speed:
Low-level: Faster execution.
High-level: Slower execution due to translation.
Examples:
Low-level: Assembly, machine code.
High-level: Python, Java, C++.
what are the differences between assembly language and machine code
Assembly Language: Human-readable
Machine Code: Binary code (0s and 1s), directly understood by the cpu.
Translation:
Assembly Language: Needs to be translated into machine code by an assembler.
Machine Code: Already in the form that the CPU can execute directly.
Use:
Assembly Language: Used for low-level programming and system tasks (e.g., operating systems).
Machine Code: The actual code that runs on the CPU after being compiled/assembled.
Portability:
Assembly Language: Specific to a computer’s architecture.
Machine Code: Also specific to a computer’s architecture and CPU type.
machine code and assembly language are ___ level languages
low
what code do all processors execute
machine
what is assembly language used for?
assembly language is often used to develop software for embedded systems and for controlling specific hardware components
what is the ratio of correspondence between assembly language and machine code
1:1
what do high level languages and assembly language need to be translated into?
machine code
what are the advantages of low level languages
faster execution
greater control
efficient
hardware specific
smaller code size
what are the disadvantages of low level languages
difficult to learn
Time-Consuming
Less Portable
Low-Level Management:
Lack of Built-in Features:
what are the advantages of high level languages
Easier to learn and use
More readable and understandable code
Portable across different platforms
Faster development time
Rich libraries and built-in functions
Less need for manual memory management
what are the disadvantages of high level languages
Slower execution compared to low-level languages
Less control over hardware and system resources
Requires translation (compiling or interpreting) into machine code
May use more memory and processing power
which 2 of assemblers, interpreters and compilers, directly translate their inputs into machine code?
assemblers, compilers
what are the advantages of a compiler
Fast execution after compilation
Program can be run multiple times without recompiling
Errors detected before execution
Produces optimized machine code for better performance
what are the disadvantages of a compiler
Compilation process can be time-consuming
Requires re-compilation to test changes
Platform-specific code (may need recompiling for different systems)
More difficult to debug due to lack of immediate feedback
what are the advantages of a assembler
Directly converts assembly language into machine code
Faster execution of programs
Provides low-level control over hardware
Generates efficient, compact code
Suitable for system-level programming
what are the disadvantages of a assembler
Difficult to learn and use
Requires detailed knowledge of the hardware
Not portable
Time-consuming
Limited debugging tools
what are the disadvantages of a interpreter
Slower execution speed compared to compiled code.
The program must be interpreted every time it runs.
Requires the presence of an interpreter to execute the code.
what are the advantages of a interpreter
Executes code line-by-line, allowing for immediate feedback.
Easier to debug since errors are reported immediately.
Platform-independent, as the interpreter runs on different systems.