6 - Fundamentals of Computer Systems Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the symbol for a NOT gate?

Construct the truth table for a NOT gate.

A

─▷∘─

AQ
01
10

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

What is the symbol for an AND gate?

Construct the truth table for an AND gate.

A

═D─

ABQ
000
010
100
111
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the symbol for a NAND gate?

Construct the truth table for a NAND gate.

A

═D∘─

ABQ
001
011
101
110
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the symbol for an OR gate?

Construct the truth table for an OR gate.

A
ABQ
000
011
101
111
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the symbol for an XOR gate?

Construct the truth table for an XOR gate.

A
ABQ
000
011
101
110
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the symbol for a NOR gate?

Construct the truth table for a NOR gate.

A
ABQ
001
010
100
110
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Boolean expression for a NOT gate?

A

Q = A̅

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

What is the Boolean expression for an AND gate?

A

Q = A . B

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

What is the Boolean expression for an OR gate?

A

Q = A + B

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

What is the Boolean expression for an XOR gate?

A

Q = A ⊕ B

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

What is the Boolean expression for a NAND gate?

A

Q = A̅ ̅.̅ ̅B̅

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

What is the Boolean expression for a NOR gate?

A

Q = A̅ ̅+̅ ̅B̅

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

What are the three Boolean algebra laws?

A
• Commutative
A . B = B . A
A + B = B + A
• Associative
A . (B . C) = (A . B) . C
A + (B + C) = (A + B) + C
• Distributive
A . (B + C) = A . B + A . C
A + B . C = (A + B) . (A + C)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the Boolean identities for OR?

A

0 + A = A
1 + A = 1
A + A = A
A + A̅ = 1

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

What are the Boolean identities for AND?

A

0 . A = 0
1 . A = A
A . A = A
A . A̅ = 0

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

How do you simplify Boolean expressions using the identities?

eg.A . B + A . B̅

A
  • Factorise or expand the brackets.
  • Use identities

A . B + A . B̅
A . (B + B̅)
A . 1
A

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

What is De Morgan’s Law?

A

“Break the line, change the sign”

A̅ ̅.̅ ̅B̅ = (A̅ + B̅)
(̅A̅ ̅+̅ ̅B̅)̅ = A̅ . B̅

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

How do you simply Boolean expressions using De Morgan’s Law?

eg.A̅ + A̅ ̅+̅ ̅B̅

A
  • Use De Morgan’s Law.
  • Factorise or expand the brackets.
  • Use identities.
A̅ + A̅ ̅+̅ ̅B̅
A̅ + A̅ . B̅
A̅ . (1 + B̅)
A̅ . 1
A̅
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the role of an Operating System?

A
  • An OS forms a bridge between the physical hardware of a computer and the user or application software
    To hide the complexities of the hardware from the user so that the user is presented with a machine that is much easier to use.
  • To manage the hardware resources to give an orderly and controlled allocation of the processors, memories and I/O devices among the various processes competing for them, and manage data storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a virtual machine?

A

The apparent machine, or interface, that the OS presents to the user, achieved by hiding the complexities of the hardware behind layers of operating system software.

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

What is an Application Programming Interface (API)?

A

APIs are layers of software that allow the application programmers to call on the services of the OS when making their programs, eg. when using VB.NET to open a text file you are technically calling on a Windows API function to execute this command.

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

What types of resource management is an operating system responsible for?

A
  • Processors.
  • Input / Output Devices.
  • Main Memory.
  • Storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How does the OS manage processors?

A

The OS is responsible for scheduling processes for programs that are running and allocating them processor time.

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

How does the OS manage I/O devices?

A

The OS allocates I/O devices to different processes and manages the communication between these processes and devices.

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

How does the OS manage memory?

A

The OS keeps track of what portions of memory have been allocated; determines how much memory to allocate to each process and determines when a portion of memory should be available for a process.

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

How does the OS manage storage?

A

The OS will allocate space on a storage device to files, organise files into directories and determine where on the device to save a file. All of these features are part of a filesystem. The OS will also manage which processes / users can access different files and directories.

27
Q

State three different types of interfaces in Operating Systems. For each one, describe how the interface presents itself.

A
  • Graphical User Interface (GUI) - Presented to the user with icons and interactive components such as buttons, text boxes and windows.
  • Command Line Interface (CLI) - Presented to the user as a text-only terminal. Users can enter commands to interact with the system. There are limited visual elements.
  • Application Programming Interface (API) - Presented to the programmer as a set of functions. Can be called upon to securely access the system.
28
Q

Are Operating Systems classified as system software or application software?

A

System Software because it is required for the functioning of the system itself.

29
Q

What is a low-level language?

A

A low-level language is a language that is very similar to the instruction set of the computer.

30
Q

Describe the differences between a compiler and an interpreter.

A
  • A compiler produces object code whilst an interpreter does not.
  • A compiler translates the whole of the source code into object code whilst an interpreter translates line by line.
  • The object code produced by a compiler will execute faster, (once it is compiled) than interpreting the source code (every time the program is run).
  • An interpreter can run (syntactically correct) parts of a program whilst there are syntax errors in other parts of it, which a compiler cannot.
31
Q

Explain what intermediate bytecode is and why some compilers will produce intermediate code as the final output.

A

Intermediate code is not directly executable and will be interpreted by a virtual machine.

Intermediate code can be run on different computing platforms.

32
Q

Most computer programs are initially written in an imperative high level language rather than assembly language.
Explain why this is the case.

A
  • High level languages are problem oriented.
  • High level languages are platform independent.
  • High level languages have English like keywords.
  • High level languages are less tedious to program as there is a one to many mapping of HLL statements to machine code commands.
  • High level languages are easier to write, understand and debug the code.
  • High level languages offer extra features such as data structures.
33
Q

What are the advantages of writing a program in assembly language over writing a program in machine code?

A
  • Easier to understand.
  • Takes less time to code.
  • Fewer mistakes made in coding.
  • Ability to add comments to code.
  • Use of symbolic name for operands.
  • Use of labels.
  • Easier to maintain/debug.
34
Q

Why are there so many high level programming languages?

A
  • Languages used for a specific problem type.
  • Access to specific data types.
  • Providing different function libraries.
  • Languages developed for specific hardware.
  • Languages developed for visual applications.
  • Competition between different companies who develop languages.
35
Q

Some high level languages are imperative. Explain the term imperative.

A

Imperative high level language programs define sequences of commands for the computer to perform. Imperative high level languages describe how to solve a problem.

36
Q

Explain the advantages and disadvantages of programming using imperative high level languages compared with low level languages.

A

Advantages:
• Programs written in a high level language are machine independent.
• People find it easer to debug high level language programs.
• People find it easier to read, write and understand high level language program code.
• High level languages save time for programmers as they use fewer lines of program code.

Disadvantages:
• Programs written in a high level language may not make best use of specific features of a particular processor.
• Programs written in a high level language may not execute as quickly.
• Programs written in a high level language may use more memory.

37
Q

What features of high level programming languages make high level language programs easier to understand.

A
  • Use of meaningful identifier names.
  • Use of indentation to separate out statement blocks.
  • Use of comments to annotate the program code.
  • Use of procedure, functions and sub-routines.
  • Use of constants.
38
Q

What is meant by hardware?

A

The physical components/electrical parts of the computer.

39
Q

What is meant by software?

A

Software comprises all of the programs that make the computer function.

40
Q

What is the difference between application software and system software?

A

Application software allows the user to complete different tasks (eg word processors and internet browsers).
System software is a layer of software which enables users to operate the computer - required to run and manage the computer’s hardware and application programs. For example, allocating jobs to the processor and maintaining security.

41
Q

State one purpose of the operating system.

A
  • Serves as a middle-man for communication between the computer’s hardware and software
  • Provide an interface between the computer and the user.
  • To manage devices/files/memory.
  • Processor scheduling.
  • To provide a virtual machine.
  • To provide a software platform on which other programs can run.
  • To hide the complexity of the hardware from the user.
42
Q

State one purpose of library programs.

A
  • A library is a collection of pre-compiled routines that can be used by other programs.
  • To allow sharing of run-time code across programs.
  • To save memory as routines are only loaded when needed.
  • To provide access to procedures/functions when writing a program.
  • To reduce the time taken to write a program.
43
Q

Why is it an advantage to use as few gates as possible in a logic circuit?

A
  • Minimise cost of production
  • Speed up processing
  • Minimise heat generated
  • Reduce power consumption
44
Q

Explain the general purpose of a D-type flip-flop.

A

Used to store state of data input.

45
Q

What is a D-type flip-flop used for?

A

The state of input data is stored and the output is updated to reflect the current status of the input.

46
Q

What are the inputs of a D-type flip-flop?

A
  • Data

* Clock

47
Q

What generation of programming language is assembly?

A

Second generation

48
Q

What is meant by the term high level language?

A

A language that uses English-like keywords where one instruction maps to serval machine code instructions.

49
Q

Explain why some compilers produce bytecode as the final output instead of executable code.

A

The code may need to run on multiple platforms.

50
Q

Describe how bytecode programs are executed after the bytecode has been produced.

A

A virtual machine interprets bytecode an instruction at a time and runs the necessary
code to carry out the command in the hardware’s instruction set.

51
Q

What are the differences between machine code and assembly language?

A

Machine code is binary whereas assembly language is written using mnemonics.
Unlike machine code assembly language needs translating before it can run.

52
Q

Describe the differences and similarities between the role of an assembler and the role of a compiler.

A

Both convert source code into object code.

An assembler takes assembly code as input while a compiler takes HLL code as input.

53
Q

Why must a program written in a high level language be translated?

A

High level language instructions cannot be executed directly by the processor as the processor can only execute machine code instructions.

54
Q

What are the differences between compilation and interpreting?

A

A compiler analyses the program as a whole while an interpreter analyses the program on a line-by-line basis. An interpreter will execute each line immediately after translating it. Unlike an interpreter, a compiler produces object code. A compiler will not translate any of the program if it encounters an error, whereas an interpreter translates the program until the first error is encountered.

55
Q

What are utility programs?

A

Software that is used to support the efficient running of a computer system. Utility programs can be part of the OS or installed separately. Typically, utility programs perform maintenance, analysis, configuration, and optimisation tasks such as defragmentation, backup and restore and virus checkers.

56
Q

Describe the roles of the four types of system software.

A

Operating system - Provides a user interface between the user and the hardware, runs application programs and manages hardware resources.

Utility programs - Programs designed to help maintain the computer. Examples include virus scanner or file managers.

Library programs - Collections of resources used to develop software. They include pre-written code and subroutines.

Translators - Converts source code into machine code. An assembler converts assembly code into machine code, a compiler converts source code written in a high level language into machine code and an interpreter treats high level language source code as data and interprets that data as instructions to its own routine.

57
Q

Describe the three types of application software.

A

General purpose software - Carries out a variety of tasks, for example a word processor.

Bespoke software - Written to a particular customer’s needs, for example a stock control system for a particular company.

Special purpose software - Carries out a specific task, for example accounting software.

58
Q

What are the advantages of purchasing bespoke software?

A
  • Meets all of the end-user requirements
  • Only performs necessary functions
  • Can be fitted into existing hardware/software
59
Q

What are the disadvantages of purchasing bespoke software?

A
  • More expensive as have to cover production costs
  • Not available immediately
  • Less widely tested so more likely to contain bugs
  • Lack of third party support
60
Q

What are translators?

A

A translator is used to translate code written in assembly language or other high level code into machine-code (pure binary) as that is the only thing a computer can understand.

61
Q

What are assemblers?

A

Assemblers translate assembly language into machine code

62
Q

What are compilers?

A

Compilers translate high-level language programs into object code (machine code) which can be saved and run whenever needed, without the compiler having to be present.

63
Q

Benefits and drawbacks of off-the-shelf software

A

Benefits:
Off-the-shelf software is readily available for anyone to use
The cost is usually lower because development costs are shared among all the buyers
It is likely to be well-documented and well-tested
Drawbacks
You have little or no control over what features there are
It may not do exactly what you want