Topic 6 - Fundamentals of Computer Systems Flashcards
What are the two components of computer systems?
The two primary components of a computer are hardware and software.
Define one of the components of computer systems.
Hardware is the electrical and electro-mechanical components of a computer such as the keyboard, mouse, speakers, hard drive or SSD, power supply, printer.
Define another one of the components of computer systems.
Software is the program and program code of an application of a computer; this may be a word processor, video games, and other programs such as Spotify, Internet Explorer, Skype and many more.
Give examples of devices that are part of both components of computer systems.
Wireless routers and wireless keyboards are devices which are both hardware and software.
Define application software.
Application software is simply software which completes a specific task for the user.
Define system software.
System software is software which maintains the computer, ensuring it is running healthily with no problems.
What are the 4 types of system software?
- Utility program
- Operating System (OS)
- Library programs
- Translators
Define an OS.
An operating system is the system software which manages the computer’s hardware and peripherals and also completes other important tasks such as providing a user interface for the user.
What are utility programs?
Utility programs are programs that maintain and optimize the computer, and its storage via housekeeping tasks; data backup, defragmentation of hard drive, data compression and data encryption.
Describe library programs.
Library programs are pre-compiled routines/modules which can be imported into the code of a program by the user. These programs are very useful as they simplify the programming process and prevent unnecessary lines of code.
Describe translators.
Translators are another type of utility programs which translate between languages, typically translating the program source code to low-level machine code.
State the types of translators.
Types of translators are:
- Compilers
- Assemblers
- Interpreters
Why were low-level languages created?
At the time during the earliest computers, these computers were very weak in speed and memory so programmers would write instructions which directly manipulated the CPU to execute commands.
What are high-level languages?
High-level programming languages are languages which directly communicate with the processor of a computer, making the programming process much easier.
What are low-level languages?
Low-level languages are instructions which directly manipulate the CPU of a computer as they are specific to the type of CPU and directly affect the CPU.
What are the two types of low-level languages?
- Machine Code
- Assembly Language
Define machine code.
Machine code is a type of low-level language in the form of pure binary bits.
Give a disadvantage of machine code.
Because it is in the form of binary bits, machine code can get very long, making it hard to debug.
Give another disadvantage of machine code.
Machine code can be prone to errors.
Describe an advantage of machine code.
Because it is already in binary format, when being executed by the computer it does not need to be translated so it can run easily and quickly, making it powerful and strong.
State two uses of machine code.
Machine code can be used in real-time applications and embedded systems.
Define assembly languages.
Assembly languages are another type of low-level language which use mnemonics (ADD, MOV, STR…) instead of binary code, aiming to simplify the programming process.
Describe an advantage of assembly languages.
Assembly languages are generally less vulnerable to errors as they are more compact than machine code.
What correlation do assembly languages and machine code have?
Assembly languages and machine code have a 1 to 1 correlation;
e.g: The assembly instruction MOV R2, R1 is directly correlated to the binary number 11011001:
MOV stands for the MOVE command, represented by the 4-bit identifier 1101, R2 stands for Register 2, so in binary this would be 10, and R1 stands for Register 1 so in binary this would be 01.
Give examples of imperative high-level languages.
High-level languages include FORTRAN, Python, C++, C#, Delphi, Ruby and many more.
How are instructions presented in high-level languages?
High-level languages instructions don’t include mnemonics or binary code; English instructions such as while, if, print and mathematical symbols like ‘+’, * are used instead.
Define imperative high-level languages.
Imperative high-level languages are a type of high-level languages which is similar to low-level languages because the code tells the computer how to execute the code via commands and steps for the computer to perform. This is a sharp contrast from declarative programming where the computer is only told what to execute.
How do named variables, commenting and indenting help with coding?
These features make coding so much better and easier to debug as the code is far more detailed.
How useful are built in functions to programming?
Built in functions in high level programming are very useful as they help simplify the programming process, saving lots of time.
What happens when a high-level language program is run?
When a high-level language program is run, a compiler or interpreter translator will translate the code into machine code for the computer to understand, then the program will be executed.
What is an assembler?
An assembler is a type of translator which translates assembly code to machine code. As assembly code and machine code have a 1 to 1 correlation, the procedure should be straightforward and simple. Assemblers are also platform specific as certain assemblers only work on certain processor instruction sets.
What is a compiler?
A compiler is a type of translator which is used in many high-level languages to translate the code to machine code. This makes it platform specific as machine code may differ depending on the CPU used.
What is an interpreter?
An interpreter is a type of translator which translates high-level language code into machine code. Unlike, compilers, interpreters do not produce object code.
How does a compiler work?
A compiler first checks for errors in the program then translates the entire program into machine code. If an error is detected during the initial check, the program won’t be translated.
How does an interpreter work?
The interpreter has individual procedures for each program instruction, but the general process is that the interpreter will check for errors line by line, and if there are no errors then the line will be translated into machine code; this may mean if errors are detected later in the program, the program will still be partially translated.
Give one problem with using an interpreter.
During translation, the source code must be present with the interpreter, posing a huge security risk as the source code is at risk of extraction.