(4.6) Fundamentals of computer system Flashcards

1
Q

Definition of hardware

A

Hardware are the physical components of the computer system

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

Definition of software

A

Software is program code, sequences of instructions executed in order to perform a task

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

What is system software?

A

System software:
* Operates, controls and maintains the cs and components
* Includes the computer’s OS
* Includes untility programs, library programs, and translators

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

What is application software?

A

Application software:
* Software that complete a specific task for the user
* Ex. word processors, web browsers and speadsheet software

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

What do utility programs do?

A

complete housekeeping tasks:
* data backup
* defragmenting hard drives
* data compression
* encryption

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

What do libraries do?

A

Libraries hold useful functions that are frequently used by a program

Can be used to simplify the process of application development

Must first be imported within program code

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

What do translators do? (compiler, assembler, interpreter)

A

Translators are pieces of software that translate between different types of language

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

What is the (general) role of the operating system?
&specific roles

A

The operating system hides the complexity of the hardware by providing a virtual machine

including:
* resource management
* processor scheduling
* memory management
* I/O devices
* handles interrupts

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

How have different types of programming languages developed?

A

Early computers could only be programmed using low-level languages

low level languages are:
* directly manipulated by the processor
* require a great deal of effort from the programmer
* prone to errors

When high level languages were developed, it made programming a lot easier

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

Low level languages (definition and examples)

A
  • programs are processor specific
  • programs directly affect the processor

examples:
* machine code
* assembly language

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

What is machine code?

A
  • Uses only 1s and 0s to represent instructions
  • Directly manipulates a computer’s processor
  • Programs are very long and difficult for humans to understand, this makes them prone to errors and very difficult to debug
  • Useful for embedded systems and real-time applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is assembly language?

A
  • Developed to simplify writing programs
  • Mnemonics are used instead of binary instructions that machine code uses, which make it more compact and less error prone than machine code
  • Each instruction has a 1-to-1 correlation to a machine code instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

High level languages (definition and examples)

A
  • Not platform specific
  • Must be translated into machien code by a compiler or an interpreter before execution
  • Use english instructions and mathematical symbols in instructions
  • Easy for humans to learn, understand and debug (features like variables, indenting and commenting help)
  • Have built in functions that save time when programming
  • examples: C#. Java, Pascal, Python, VB.Net
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Imperitive high level languages

A

Imperitive high-level languages are formed from instructions that specify how the computer should complete a task, rather than what a cimputer should do

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

Advantages and disadvantages of low-level languages

A

Low-level
Advantages:
* Code is executed directly by processors (in machine code)
* Assembly language has a 1-to-1 correlation with machine code, meaning it can be translated quickly

Disadvantages:
* Not portable, programs are specific to certain processors
* Code is harder for humans to learn, understand and remember
* Debugging is very hard

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

Advantages and disadvantages of high-level languages

A

High-level
Advantages:
* Portable, programs are not specific to certain processors
* Easy to understand for humans
* Indentation, names variables and commenting make debugging easier

Disadvantages:
* A compiler or interpreter must be used to translate source code into object code before it is executed, taking more time

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

What does an assembler do?

A

Translate assembly language into machine code
* Are platform specific
* Each assembly code instruction has a 1-to-1 relationship to a machine code instruction
* Translation is fairy quick and straightfordward

18
Q

What does a compiler do?

A

Translate high-level languages into machine code
* Are platform specific
* Take a high-level program as their source code
* Check the source code for errors, line by line
* Translates entire program at once
* If the source code contains an error, it will not be translated
* Compiled programs can be run without any other software present

19
Q

What does an interpreter do?

A

Translate high-level languages into machine code
* Translate line by line
* Have procedures to translate each kind of program instruction
* Checks for errors as they translate
* Can partially translate source code containing errors
* Both program source code and the interpreter itself must be present
* This results in poor protection of the souce code

20
Q

Differences between compilation and interpretation & examples

A

Translation
* Compiler - checks source code for errors line by line before translating all at once
* Interpreter - checks source code for errors as it translates line by line

Software needed
* Compiler - Doesn’t need source code or compiler to be present for execution
* Interpreter - Both source code and interpreter must be present for execution

Safety of source code
* Compiler - Source code is protected from extraction
* Interpreter - Little protection of source code

Examples
* Compiler - faster runtime performance because the entire code is translated before execution
* Interpreter - quick testing and iteration of code and immediate feedback

21
Q

How do compilers with intermediate languages work?

A
  • Machine code is not produced straight away
  • Translate source code into an intermediate language, ex. bytecode
  • A virtual machine is used to execute the bytecode on different processors
  • Each different processor intruction set has its own virtual machine
  • Allows for platform independence
22
Q

What is the difference between source code and object (executable) code?

A

Source code: input to a translator
Object code: translator’s output

23
Q

NOT gate

A

Ā

A Ā
0 1
1 0

It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A.

(A with a bar over the top), A’, ~A, ¬A, are all common notation

24
Q

AND gate

A

A . B
A B O
1 1 1
0 1 0
1 0 0
0 0 1

A and B must both be equal to 1 for an output of 1.

25
OR gate
**A+B** A B O 1 1 1 1 0 1 0 1 1 0 0 0 A, B or both A and B must be equal to 1 for an output of 1
26
XOR gate
**A ⊕ B** A B O 1 1 0 1 0 1 0 1 1 0 0 0 Exclusively A or B must be equal to 1 for an output of 1
27
NAND gate
___ **A.B** A B O 1 1 0 1 0 1 0 1 1 0 0 1 For an output of 1, A and B cannot both be 1. (This is the opposite of the AND gate)
28
NOR gate
_____ **A + B** A B O 1 1 0 1 0 0 0 1 0 0 0 1 If either A or B are equal to 1 the output is 0. (This is the opposite of the OR gate)
29
Order of operations in boolean expressions of logic gates
NOT XOR AND OR
30
de Morgan's first law
─...─....─── A . B = A+B The inversion of the product is the same as the sum of the inversions.
31
de Morgan's second law
───....─..─ A . B = A+B The inversion of the sum is the same as the product of the inversions.
32
General boolean identities (1) X . 0 = X . 1 = X . X = X . ¬X =
X . 0 = 0 X . 1 = X X . X = X X . ¬X = 0
33
General boolean identities (2) X + 0 = X + 1 = X + X = X + ¬X = ¬¬X =
X + 0 = X X + 1 = 1 X + X = X X + ¬X = 1 ¬¬X = X
34
Boolean algebra **commutative rule**
X . Y = Y . X X + Y = Y + X
35
Boolean algebra **associative rule**
X . (Y . Z) = (X . Y) .Z X + (Y + Z) = (X + Y) + Z
36
Boolean algebra **distributive law**
X . (Y + Z) **=** X . Y + X . Z (X+ Y) (W + Z) **=** X . W + X . Z + Y . W + Y . Z
37
Boolean algebra **absorbtion rules**
X + (X . Y) = X X . (X + Y) = X **proof:** X + (X . Y) = X . 1 + (X . Y) = X . (1 + Y) = X . 1 = X
38
half-adder logic circuit
Half-adder circuit: takes a 2-bit input and produces a 2-bit output which is the correct result of a binary addition of the two inputs Digit = ¬A.B + A.¬B / A xor B Carry = A.B ex: A B D C 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
39
full-adder logic circuit combines two half adders. Uses a 3-bit input (including inputs A and B as well as carry bit C).
Full adder circuit: combines two half adders. Uses a 3-bit input (including inputs A and B as well as carry bit C). An extra OR gate outputs the carry bit. A+B+C D C 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1
40
Use of the edge-triggered D-type flip-flop' as a memory unit
What is a flip-flop? A basic circuit which can store one bit and flip it between 1 and 0. It has two inputs. Input 1: Control input (normally labelled D) Input 2: Clock signal D-type flip-flops: - Are positive edge-triggered (meaning output can only be changed from 1 to 0 or 0 to 1 when clock pulse is at a 'rising' or positive edge) -if clock is not 'rising' or at positive edge, output value is held and does not change -They can be used as a memory cell to **store the *state* of a single bit** Control Clock Output 1 0 0 1 1 1 0 0 1 0 1 0