Computer Systems Flashcards

(45 cards)

1
Q

What is hardware?

A

Physical components of the computer components (including internal components and external components)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some examples of hardware?

A

CPU, motherboard, RAM, ROM, printer, transistors, speakers etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is software?

A

Programs that run on a computer, made up of sequences of instructions that are executed in order to perform a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two main types of software?

A

1) Application Software
2) System Software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is application software?

A

Programs that complete a specific task for the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is system software?

A

Programs that operate, control and maintain the computer and its components

Ms: controls operation of computer system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are examples of application and system software?

A

Application Software:
- word processor
- web browser
- image editor
- video editor
System Software:
- operating systems
- utility programs
- libraries
- translators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the main types of system software?

A

1) Operating Systems
2) Utility Programs
3) Libraries
4) Translators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are operating systems and why are they used?

A

Operating systems provide an interface between hardware and applications; provide platform for applications to run on as well as core functionality
- provides virtual machine to manage and control access to computer’s resources
- ms: hides the complexity of the hardware from the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are utility programs and why are they used? (MS)

A

Perform system maintenance tasks such as compression, encryption and defragmentation

MS:
Description : (Software that) performs a non-core / ancillary / specific management function for a computer;
Example : Virus checker, disk defragmenter, backup, compression, encryption software etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are libraries and why are they used?

A

Provide reusable code for useful functions that are frequently used by a program;
Reduce amount of programming required for standard features;

Ms:
Provides routines that can be used in code
Increase development speed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are translators? What are the different types of translators?

A

Translate source code into low-level machine code that can be executed by computer or virtual machine;
- Interpreters, compilers and assemblers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the roles of an operating system in a computer?

A
  • Hide complexity through virtual machine
  • Creates a platform for applications to be written for
  • Provide functionality to applications i.e. handle I/O (which forms API)
  • Acts as an interface between user or applications and the hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the managers in the operating system?

A

1) Memory manager - allocate memory to running applications
2) Process manager - controls allocation of CPU cycles
3) Application manager - controls installation
4) File manager - control storage of data on disks
5) Device manager - control interaction with external hardware
6) Security manager - authenticates user
7) Networking manager - provides TCP and UDP sockets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is defragmentation and when is it used and why?

A
  • Arranging data in hard disk memory
  • Improve performance
  • Not used for SSDs as no moving parts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is machine code?

A

Programs that are written in binary where the instructions are specific to each processor.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is machine code made of and what does each component do?

A

1) Operation codes - binary value for a particular instruction
2) Operand - data used in instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is assembly language?

A

Low-level programming language where programs are expressed as mnemonics that are easier to understand and recall

  • Assembly language instructions relate to machine code in a 1:1 mapping
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the low-level programming languages and what are key properties of one?

A
  • Assembly language and machine code
  • Based on instruction set
  • Close to hardware (interacts with basic hardware directly)
  • Languages are architecture-dependent and hence are not portable
20
Q

What are high-level programming languages?

A
  • Human-oriented, english like statements
  • Use abstraction (many-to-one mapping to machine code instructions)
21
Q

What are the benefits of high-level programming languages?

A
  • Use of English-like statements makes it easier to understand by humans and hence fix errors
  • Multiple machine code instructions with a single statement so it is shorter and quicker to write
  • Meaningful identifiers, reusable libraries and programming structures
  • Data structures
  • Portable (not architecture-dependent)
22
Q

What are imperative programming languages?

A

Provide instructions that are executed by computer in defined sequence in order to complete a process
- machine code and assembly are imperative

23
Q

What are logic gates?

A
  • Components that make up a computer’s processor
  • Apply logical operations to boolean inputs for a single output
24
Q

What are the logical gate symbols?

A

NOT, AND, OR, XOR, NAND, NOR

25
What is the truth table and symbol for a NOT gate?
- indicate NOT with overbar (-- above input)
26
What is the truth table and symbol for a AND gate?
- A . B
27
What is the truth table and symbol for an OR gate?
28
What is the truth table and symbol for an XOR gate?
29
What is the truth table and symbol for a NAND gate?
30
What is the truth table and symbol for a NOR gate?
31
How do we combine logic gates to produce a half-adder circuit?
32
How do we combine logic gates to produce a full-adder circuit?
33
What is an edge-trigged D-type flip-flop?
Memory unit that can be used to store the value of a single bit. Set to the value of data bit every time the clock signal alternates
34
What are compilers and what are they used for?
- Translates a high-level program’s source code in one go, directly to produce object code which is in machine code - object code is an executable file so will not need to be compiled again every time it is run - When the object code is run you do not need the compiler - customer cannot see source code, when program is distributed, so not copied - if an error is detected, compilation fails
35
High level vs low level programming
36
What is the use of a interpreter?
- translates program into machine code line by line, and then executing it - it does this by translating each statement by callings its own subroutines already translated into machine code - if it detects a runtime error the programmer is made aware of the error at that line, and the translation stops - program must be interpreted every time it is executed
37
What is the use of an assembler?
- converts assembly language into machine code - each assembly code statement translate into one machine code statement, so simple instruction
38
Interpreter vs compiler (MS)
- Compiler translates all the code in one go to produce an executable file, interpreter translates and executes one line at a time - Compiled programs execute faster as all code is already in machine code, whereas for interpreter each line is translated before executed - Compilers produce object code so when executed does not not need to be compiled every time, unlike interpreter
39
Describe how bytecode programs are executed after the bytecode has been produced. (MS)
A virtual machine; performs just in time compilation // translation; to convert the bytecode to object code and execute it; // A virtual machine; interprets bytecode an instruction at a time; and runs the necessary code/subroutine to carry out the command in the hardware’s instruction set;
40
Explain why some compilers produce bytecode as the final output instead of executable code. (MS)
The code may need to run on multiple platforms // target platform may not be known // may need to be platform independent;
41
Explain how intermediate language code is used after it has been generated. (MS)
Software must be used to finish the translation process (on the computer running the program); The (JIT compiler) compiles the intermediate language code / bytecode into machine code for the processor / platform / computer it is being executed on; Use a virtual machine // a just-in-time / JIT compiler; (The virtual machine will) interpret / translate / execute the intermediate language code / bytecode // call functions within its own code to carry out the command; Each processor instruction set / architecture will have its own virtual machine;
42
Explain why having a different processors might make it impossible for an executable file to run on a different computer. (MS)
The executable file is platform dependent / machine-specific / using the instruction set of the computer that created it; Different processors may have different instruction sets;
43
Boolean algebra cheatsheet
44
Explain the general purpose of a D-type flip-flop. (MS)
Used to store state (of data input) // used as a memory (unit);
45
Discuss the advantages and disadvantages of programming using a high-level language compared to programming using assembly language. (MS)
Advantages of high-level language (MAX 2): Program code is easier to understand/maintain/debug; Faster development time // programmers can be more productive // one line of HLL code can do the same job as many lines of assembly language; Programs are (more) portable (to other hardware platforms) Availability of flow control structures; A. Example(s) eg loops, selection Improved features for supporting modularity; A. Ability to use subroutines Built-in support for data structures; A. Example(s) eg arrays, records Language is problem-oriented; Support for different paradigms; A. Examples eg functional programming Disadvantages of high-level language (MAX 2): Assembly language code may execute more quickly; R. If response suggests that faster execution is because translation is not required Assembly language code may use less memory; Assembly language gives direct/better access to computer hardware // enables direct manipulation of memory (contents);