Class Tests Revision Flashcards

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

State the three key components of the CPU.

A
  • Control Unit
  • Arithmetic/logic unit
  • Immediate Access Store (IAS) or Memory Unit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain one of the key components of the CPU.

A

Immediate Access Store (IAS) or Memory Unit

An extremely fast area of memory located on, or next to the CPU, which stores the currently needed instructions and data. Usually referred to as Cache.

Arithmetic Logic Unit (ALU)

Carries out all arithmetic and logical operations in the computer. E.g. Addition, substraction, comparisons etc.

Control Unit (CU)

Controls the operation of the memory, processor and input/output devices. It contains the CURRENT INSTRUCTION REGISTER (CIR) and the PROGRAM COUNTER (PC).

CIR - Contains the current instruction being executed by the CPU.

PC - Contains the address of the next memory location for the next instruction to be fetched.

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

Explain how Von Neumann architecture differs from previous computer architectures, and it’s significance.

A

The difference between Von Neumann architecture and previous architecutes is the fact that it has the capabilities to store programs. As a result, computer no longer have to be manually rewired to run other operations and can become commercially available because this architecture is cheaper.

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

Describe the steps in the Fetch-decode-execute cycle. (5)

A

when the computer is switched on the CPU starts to perform its main function, running an endless fetch–execute cycle.
The programs that the CPU needs to process are stored in the main memory. The CPU simply fetches the next instruction it needs to process, decodes it and executes it before repeating the process.

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

Give the definition of a software.

A

Programs, a set of instructions to perform a task, in general are known as software.

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

Descibe a low-level language.

A

Assembly language
This is also a low-level language.
● As with machine language, each instruction causes just one processor
operation.
● Assembly language uses mnemonics to represent instructions.
In machine code, a programmer might write:
000010 00000 00000 00000 10000 000000

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

Describe a high-level langauge.

A

High-level languages do not have the same one-to-one correspondence between commands and machine code instructions as assembler.
A high-level language command may represent several machine code instructions:
● In a high-level language we can usually multiply two numbers together in one command.
● At machine level this is not possible and it has to be done by repeated addition.
High-level commands have to be turned into the binary instructions the machine can understand; this process is called translation.

There are two basic ways of translating high-level code to machine code:
● Compiler: converts the whole code into machine code before running it
● Interpreter: converts the code one instruction at a time, running each
instruction before translating the next.

Source code is the code written by the programmer.

A compiler translates this source code into an object code in machine
language. Object code runs independently of the source code and
translator.

An interpreter does not create object code and the source code must be
translated each time it is run. This means interpreted languages need the
source code and translator present every time the code is run.

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

What are the main advantages of a high-level language over a low-level
language?

A

High-level code uses words; machine code is in binary; high-level code is designed to be read by human programmers; high-level code is portable and can be translated for different machines; machine code is specific to a particular machine.

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

Compare an interpreter and a compiler for use by a student learning to program.

A

An interpreter translates and executes one line at a time whereas a compiler translates the whole source code; errors are identified one command at a time making it easier to debug the code whereas a compiler reports all the errors in the code at once making them hard to locate and debug; execution can be resumed once an error is identified whereas with a compiler the code must be modified and recompiled before it can be run; code can be developed and tested in stages whereas with a compiler the code needs to be compiled, executed each time the code is modified.

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

What are the advantages of compiling code for commercial distribution?

A
  • *Compiled code** runs quickly once compiled; it does not need the translator to be present when running, reducing memory requirements; compiled code is difficult for others to modify,
  • *without access to the source code**.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Discuss the need for both high and low level language. (6)

A

high level

  • portable
  • problem-oriented
  • close to English
  • one-to-many relationship
  • easier to debug/change/update
  • needs compiler/interpreter

low level

  • machine-oriented
  • can be difficult to read
  • one-to-one relationship
  • needs assembler

Alough source code written in High Level language is easier to debug and maintain than low level language, it executes more slowly and take up more space in memory than low level language.

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

Assembler translator

A

Advantages

Precise and direct instructions to the computer hardware

Disadvantages

Difficult to code Limited range of commands available

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

Compiler Translator

A

Advantages

  • Compiler not needed on target machine
  • Code runs quickly once compiled
  • Difficult for others to modify without access to the source code

Disadvantages

  • Initial compilation can be slow
  • Errors are generated for all the code at once, making it difficult to debug
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Interpreter

A

Advantages

  • Executes one statement at a time so easy to debug
  • Code can be developed and tested in stages
  • Can be more portable since the code will run on any machine with an interpreter available

Disadvantages

  • Interpreter needed on target machine
  • The interpreter takes up space in memory
  • Code executes more slowly
  • Easy to modify since source code is provided
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A user interface is a function of a typical operating system.

Write down four other functions of a typical operating system.

A

Any four functions from:
– file management/delete/copy/save/store/load files
– controls/manages software/hardware
– memory management
– I/O control
– error messages/handling
– security issues
– logging on/off
– accounting/user account management
– time slicing
– multi access
– multi tasking/task management
– JCL/job control/batch processing
– network management [4]

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

You have been asked to write a report on the use of the following communication methods:

  • mobile phones
  • video conferencing
  • emails

Describe a benefit and a drawback of each of the above communication methods.

A

mobile phones

mobile phones
benefit:
– wireless system (so can be used anywhere)
– small, portable device/always with you
– instantaneous (e.g. take photo and immediately transfer file)
– can leave messages if recipient not available

drawback:
– contracts tend to be expensive
– phone calls overseas are very expensive
– out of signal
– battery life poor
– data transfer rate can be slow
– not very large memories
– small screens/keyboards make it more difficult to type/navigate

video conferencing
benefit:

– many people can take part in conference across the world
– can see all delegates on screen (and also talk in synchronised way)
– relatively inexpensive since uses Internet for communications
– can hold meeting of several people at short notice
– no need to pay for travelling/hotels/meeting rooms
– less time wasted travelling to meetings overseas/staff not out of office
– safer – recent increased risk of terrorist attacks

drawback:
– equipment is expensive to buy initially
– quality of sound/picture can be poor (poor reception)
– problems with time zones
– fast internet connection required

emails:
benefit:

– can send at any time/recipient can open any time
– inexpensive (same cost worldwide)
– can send large multimedia files
– no need for expensive equipment
– can send to multiple recipients
– can use attachment facility

drawback:
– if recipient doesn’t have correct software, can’t open attachments
– possibility of virus infections/phishing from attachments
– need Internet connection/ISP
– may not get immediate response (ONLY IF REVERSE NOT GIVEN UNDER BENEFIT)

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

Explain, with examples where appropriate, the following computer term.

Interrupt

A
  • a signal/request generated by a device/program
  • causes a break in execution of a program/stops the program
  • e.g printer out paper, pressing break key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain the term ‘byte’

A
  • fixed number of bits/8 bits
  • represents a character
  • unit of memory/storage

e/g 11010001

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

Explain the term CD-ROM

A
  • (secondary/portable) storage medium
  • can be read only (memory)
  • cannot change data

e.g. used to store programs/data/picutres/films, etc

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

Explain the term ‘buffer

A
  • temporary store/memory
  • allows speed of CPU/devices to be matched
  • to hold data being transferred between peripherals and CPU

e.g pages stored waiting to be printed

A temporary storage area in memory, essential as storage devices run much more slowly than the CPU and data needs to be stored in memory before it is actually needed.

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

Explain the term ‘Optical media’

A

Any two points from:

  • type of non-magnetic memory
  • uses light sensitive surface to store data
  • media are very portable
  • can be write once or write many times
  • used to store large files
  • can be ROM or RAM

expample CD, DVD

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

Why does a computer have both ROM and RAM? (2 marks)

A
  • *ROM** is needed for the initial settings and boot sequence;
  • *RAM** is needed to store data and programs in use.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is in RAM when the computer is working? (3 marks)

A

Operating system; programs; data in use by programs

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

Input Device and Reason for choice of device.

  • Virtual reality application
  • Disabled person communicating with a computer system
  • Automatic stock control system at a supermarket
  • Information kiosk at an airport using a GUI interface
  • Control of a remote airborne camera drone
  • Access to a secure building based on someone’s security clearance level
A
  • Virtual reality application

Input Device: data gloves, data goggles ( allow user to interact with vr system directly)

sensor suits (system needs to get data directly from its surroundings

  • Disabled person communicating with a computer system

Input Device: microphone - allows blind person to dictate text directly to the computer

head wand - if little hand movements, allows user to select options from the screen

large keyboard - people with poor eye sight can use the keyboard to input text

  • Automatic stock control system at a supermarket

Input Device: barcode reader - automatically reads data

RFID tag reader - fewer data entry errors

  • Information kiosk at an airport using a GUI interface

Input Device: touch screen, trackerball - easier for the customers, reduces the number of possible options for the user, selection options from a screen, immovable/more secure

  • Control of a remote airborne camera drone

Input Device: Joystick - provide fine control

  • Access to a secure building based on someone’s security clearance level

Input Device: Biometric - based on unique code ??

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

Name THREE different types of storage media and give an example of each.

A

1 mark for each storage method + appropriate example

magnetic

  • e.g hard disk drive, average capacity 500GB

optical

e.g. CD (800 MB) , DVD (4.7 GB) , Blu-ray etc

solid state

e.g flash memory SD cards, in digital cameras, as storage on mobile phones, in MP3 players and in tablet computers, USB memory sticks - average capacity of SSD 250GB

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

Explain why Cache memory is an necessary component of any CPU.

A

Cache memory is a volatile memory which stores the instructions and data waiting to be processed. Extremely fast as usually positioned very close to the CPU. Makes use of SRAM technology.

The CPU cannot access main memory at the same speed as the processor clock chip; transferring data from main memory causes significant delays. Cache memory has access times similar to CPU but is very expensive. e.g a typical computer with 8GB of main memory but 2MB of cache memory.

Data that is in use is transferred to cache memory to make access to it faster.

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

State the two types of primary memory, describe their purpose and explain the key differences between them.

A

Random access memory (RAM)

  • Volatile (data is lost when the power is turned off)
  • Can be accessed and changed by the computer at any time
  • Stores programs and data being used by the computer
  • Contains the operating system
  • Large (4 GB or more in a typical computer)

Read only memory (ROM)

  • Non-volatile (data is retained when the power is turned off)
  • Programmed during computer manufacture
  • Stores instructions and data required to start up the computer
  • Contains the boot program
  • Small (1 or 2 MB required for the boot program)
28
Q

Billy sends a large document to a printer.

Explain what happens to the task the computer was performing before it received the interrupt signal, and what will happen once the signal has been dealt with. (4)

A

Before the printer receives the interrupt signal,
CPU will send all the instructions and data to the buffer waiting to be printed. When the interrupt signal is received by the operating system, the printing will be stopped and CPU’s attention will be switched to re-moving the data and instructions in the buffer.??? CHECK

29
Q

There are three key techniques used for storage of digital data. State and describe them.

A

Magnetic

Magnetic material is given a polarity. That polarity is then read and depending on the direction is output as a binary 1 or a 0

Optical

Pits and grooves in a flat surface provide a reflection for a laser, a light sensor then assigns a binary 1 or a 0 depending on the light intensity.

Solid State

Uses electrical signals to change the state of a transistor. This transistor can either be changed to binary 1 or to 0

30
Q

Input Device: Bar Code scanner

A

reads light reflected back from a pattern of thin and thick lines that represent a product code or other identification number.

31
Q

Input Device: RFID reader

A

reads data from an electronic version of a bar code; does not require line of sight; it is used:
● in shops to identify products
● in airports to track luggage
● to tag animals
● to collect payments automatically in toll booths
● to access car parks.

32
Q

Input Device: Sensor

A

detects physical conditions and automatically collects data:
● temperature sensor
● water level sensor
● light sensor
● pressure sensor
● accelerometer
● motion sensor.

33
Q

Input Devices for people with disabilities:

A

Eye-typer: can be used by people with limited physical mobility:
● A camera tracks the movement of the user’s eye and can detect which key the user is looking at.
● A slow blink is used to select the key to type commands into a computer system.

Foot mouse: can be used by people with limited hand movement; it is a track ball device that can be operated with the foot.

Puff–suck switch: can be used by people with severely limited physical mobility by blowing into or sucking on a small tube.

Braille keyboard: can be used by people with visual impairments to type text and commands into a computer system using keys with embossed patterns that match the standard Braille characters.

34
Q

Output Devices:

A

Monitor, touch screen, printer - laser, inkjet, 3D, thermal printers

Plotter - large-scale engineering or architectural drawings

Speakers - produce sound output

Actuators - create physical movements in response to a computer command to control aeroplanes, wheelchairs and robots.

35
Q

Define the term selection.

A

A comparison determines whether a block of code will be executed or not. Examples: if statement, case/switch statements

36
Q

Define the term iteration.

A

A block of code is executed repeatedly, either until a condition is met or for a set number of times.

37
Q

Define the term string.

A

A string, or text, data type is capable of holding any alphanumeric character (letters, numbers or symbols). It is also capable of storing non-printable characters, such as carriage returns, punctuation characters and spaces. The data within a string data type can consist of a combination of letters, numbers and symbols.

38
Q

What is a ‘variable’ in programming? (1 mark)

A

Variables are data entities whose values can be altered when a program is compiled. As their name implies, their values vary.

var X

X value can vary

39
Q

Variables are data entities whose values can be altered when a program
is compiled. As their name implies, their values vary.

A

A real data type contains numeric data in a decimal form. It is used in situations where more accurate information is required than an integer (a whole number) can provide.

40
Q

Give two reasons why a programmer would wish to use an integer data type rather than a real data type.

A

Storage: Real data takes up more memory than integer data; The
number has decimals.

Processing speed: Calculations using real numbers takes longer than
using whole numbers held as integers.

41
Q

Explain, using an example, the term ‘one-dimensional array’.

A

A one-dimensional array is a list of variables. To create an array, you must first define an array variable of the desired type. One-dimensional arrays in Python and PHP allow a list of items to be stored with the capability of accessing each item by pointing to its location within the array, for example:
carMakers = [“Ford”, “Land Rover”, “Vauxhall”, “Nissan”, “Toyota”]

42
Q

Explain the difference between one- and two-dimensional arrays. (2 marks)

A

Two-dimensional arrays are nothing more than an array of arrays, in other words an array in one row and another in the next row.

43
Q

State the four essential parts of a computer system. (4 marks)

A

Input, output, process and storage.

44
Q

What is an array?

A

An array contains several items of data, of the same type, grouped under one identifier. Each item in the array (element) has an index which allows that specific element to be access.

45
Q

How can algorithms be represented? (1 mark)

A

An algorithm can be represented by code or by flowcharts.

46
Q

Write an algorithm that can find the sum and product of N values. (6 marks)

A

Input num[1], num[2], num[3], …, num[N]
Set index = 1
While index <= N Do
Set Sum = Sum + num[index]
Set Prod = Prod * num[index]
Increment index
End While
Output Sum and Prod

47
Q

Write an algorithm that can find the maximum of N values entered
into a computer. (6 marks)

A

Input num[1], num[2], num[3], …, num[N]
Set Max = num[1]
Set index = 2
While index <= N Do
If num[index] > Max
Set Max = num[index]
Increment index
End While
Output Max

48
Q

Program Flow Control

Explain with simple examples the basic building blocks of coded solutions. (3 marks)

A

The basic building blocks are: sequence, selection and looping.

Sequence example: Set, Input, and Output statements
Selection example: Conditional, if and if–else statements
Looping example: Iteration, While and Do–While statements

49
Q

Represent the following code as a simple flowchart. (4 marks)
if condition is true
then
perform instructions in Block1
else
perform instructions in Block2
endif

A
50
Q

Design a simple flowchart to show the actions of a single move in a snakes and ladders game.

A
51
Q

Bandwidth

A

A measure of the capability of a data channel to transfer data.

52
Q

Full duplex

A

Data flows in both directions at the same time, usually through separate send and receive channels

53
Q

Half duplex

A

Communication between two devices whereby transmission takes place in only one direction at a time.

54
Q

Simplex

A

Can only transfer data in a single direction (broadcast radio)

55
Q

Data transmission

A

The physical transfer of data over a communications channel.

56
Q

Odd parity

A

A odd number of 1s is required, if the number of 1s in the data is even, a 1 will be added to the end.

57
Q

Parallel

A

Data is send down a multiple line bus. This can result in timing errors and requires more complex hardware. It is faster than serial, and more expensive. Typically found inside the CPU or other components.

58
Q

Parity

A

Parity is the simplest form of error detection. When sending binary the number of 1s is checked. Parity can be EVEN or ODD, this is calculated and the relevant extra bit is added to meet the parity rule.

59
Q

Even parity

A

A even number of 1s is required, if the number of 1s in the data is odd, a 1 will be added to the end.

60
Q

Serial

A

Data is send down a single line bus. This is more reliable and cheaper, but slower than parallel. Typically found in peripherals.

61
Q

Why is the first element in an array usually [0] not [1]? (2 marks)

A

0 is considered by most mathematicians to be a real number between –1 and 1 and so in languages where arrays are positively indexed, zero is the first number (negative indexes are not possible).

62
Q

What is the purpose of procedures and functions in programming languages?

A

Procedures and functions allow the repetition of certain sections of a program or calculation many times. They also assist in the modulation of code by allowing themselves to be called from any point within a program solution.

63
Q

1 kilobyte refers to: (1 mark)

a) 1000 bytes
b) 1024 bytes
c) 8000 bytes
d) 8192 bytes

A

b

64
Q

Convert the denary number 1792 to binary. (1 mark)

A

11100000000
To do the conversion, we repeatedly divide by 2:

65
Q

What meat do you get if you convert the denary number 48879
to hexadecimal? (2 marks)

A

BEEF
To do the conversion, we repeatedly divide by 16: