Computer science Flashcards

1
Q

What is extreme programming?

A

A method of programming where two programmers work together in order to make sure code is written correctly and quickly.

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

What is embedded OS?

A

Embedded software is found on certain hardware devices such as printers or mice that allows them to perform their desired purpose in the best way.

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

What is real time OS?

A

Software that can react to real world inputs and quickly it is required in time sensitive cases such as the software found in driverless cars.

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

What is multi-tasking OS?

A

Multitasking OS allow the device to work on multiple separate problems simultaneously such as Windows or Linux.

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

What is a CIR and what does it do?

A

A CIR is also known as a current instruction register and stores the current instruction that is being decoded.

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

What is the MAR?

A

The MAR or memory address register stores the address of the current instruction that needs to be fetched from main memory.

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

What is the MDR?

A

The MDR or memory data register stores the piece of data found at the address stored by the MAR.

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

What is the accumulator?

A

The accumulator is a component in the CPU that holds the output of the last calculation completed it allows for quick retrieval to the appropriate location in main memory.

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

What are registers?

A

Registers are tiny components in the CPU that can temporarily hold data for retrieval.

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

What are the three main components of the CPU?

A

Cache, Control Unit and Arithmetic logic unit.

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

What main factors affect the speed of the CPU?

A

Clock speed, Cache size, Number of Cores, Ability to Pipeline or not.

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

What are the three main laws that apply to using the internet and storing data on it?

A

The main three laws are:
Data protection act 1998
Copyrights and Patents act 1988
Computer misuse act of 1990

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

What are four main parts of the Data Protection Act of 1998?

A

Data must be stored with the suitable level of security such as correct firewalls and also physical in person protection such as locking doors. Data must not be sent outside the EU where certain data protection laws don’t apply. Data must only be collected on relevant topics for example a doctors office doesn’t need to know your political beliefs etc. Incorrect data must be changed as it can have disastrous effects for example the man who got the wrong reference because they shared the same name.

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

What are Foreign Keys?

A

Primary keys in another table become foreign keys when they are used again elsewhere. However, they are still the primary key in there table but are the foreign one in the other table.

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

What is a composite key?

A

A composite key is one that is made up of the combination of two different fields in order to provide a unique identifier for each record.

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

What is a distributed operation system?

A

A distributed operation is one that has many different separate devices working together in order to solve one problem. Often used in places where a large amount of processing power is required.

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

What is an embedded operating system?

A

An OS that is found in certain specific hardware such as the ones found in printers it enables hardware to connect and communicate with the main computer.

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

What is a virtual machine and why is it used?

A

A virtual machine is one that is software based and run on a hardware based “host computers”. It uses the processing power of the host to perform different tasks including simulating another OS.

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

What is 01010101 as an integer using two bit binary?

A

85

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
What do each of these mean:
¬
∧
∨
⊻
A

Not
And
OR
Xor

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

What is iteration?

A

Iteration is where you run through code multiple times using a loop the loop can be either condition controlled or counter controlled.

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

What is recursion?

A

Recursion is where you call a function inside a function until at the end when the final results are returned. Recursion relies on a stack that uses a first in last out method.

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

What is the difference between an array and a list?

A

A list is ordered and cannot increase in size and is known as static it can store more than one data type. While an array can be unordered and can increase in size and is known as dynamic it also can only store one data type. An array can also come in many forms 1D, 2D, 3D + While a list always comes in the same format. Both lists and Arrays are mutable which means they can be changed after creation.

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

What is a tuple?

A

A tuple is a static, ordered and unmuteable so cant be changed after creation its used to store values that wont need to change it can store multiple data types.

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

What is a Field?

A

A field is a column on a table and contains one type of data about one aspect of a data subject such as all their surnames.

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

What are the two types of database?

A

Relational and Flat file

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

What are the conditions for 1.N.F?

A
  1. All data must be atomic.
  2. Each column name must be unique.
  3. Values in a table should be of the same domain.
  4. The order in which data are stored doesn’t matter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What are the conditions for 2.N.F?

A
  1. Must be in 1.N.F

2. Must not have any Partial dependencies.

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

What are the conditions for 3.N.F?

A
  1. Must be in 2.N.F

2. Must not have transitive dependencies.

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

What is A DNS?

A

Domain Name System holds website URLs and corresponding IP addresses this allows people to easily navigate to websites as instead of having to remember IP addresses you can simply remember URL’s.

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

What is the authoritative server?

A

The final layer that gets search if the websites IP cant be found this holds every IP of every website on earth.

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

What is a Bubble sort?

A

A bubble sort is a sorting method where the largest number is pushed to the end of the list each time it is iterated trhough it is quite slow compared to other methods and has the time complexity of O(n^2).

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

What is an insertion sort?

A

An insertion sort is where data is sorted by adding numbers one by one into the correct place in the list it has a time complexity of O(n).

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

what is a merge sort?

A

A merge sort involves a list being split down until only one items remain in each separate list then they are combined and compared each times until the list is sorted it has a time complexity of O(nLogn)

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

what is each stage of the TCP protocol and what does it do?

A
  1. Application this layer determines which protocols are to be used for data for example if it as email POP3 will be selected.
  2. The transport layer comes next and this is where TCP is used to form an end to end connection between two devices.
    Packets are also given a number and also a port number so when it is received by another device they know what application it refers too.
  3. The Network layer comes next and this is where packets receive both the source and destination ip address so they know where to go. Routers use this Ip to forward packets to their destination.
  4. The link layer is the final layer and this is where the mac address is added this is specific to a singular piece of hardware and is used when a packet reaches the correct network. The mac address changes after each “hop” to the Mac address of the next piece of hardware they are going to.
36
Q

What is FTP and what is it used for?

A

File transfer protocol is used to quickly transfer files between a user and a network and one common use is photographers uploading new images to a news site.

37
Q

What does TCP/IP stand for?

A

Transmission Control Protocol/ Internet Protocol.

38
Q

What protocols would be utilised if you wanted to send an email via the internet?

A

SMTP and IMAP or POP3.

39
Q

What is Circuit switching and what are its advantages and disadvantages compared with packet switching?

A

Circuit switching is where an end to end connection is formed between two separate devices for the duration of a data transfer this ensures a consistent flow of data that arrives in order unlike packet switching where packets take many different routes and packets often arrive out of order. However, Circuit switching is less bandwidth efficient and requires sole use of one channel.

40
Q

Give an example of one device each that operate on the network and link layer of the TCP/IP stack?

A

Router.

Network interface card.

41
Q

What does MAC address stand for and what is it?

A

The mac address stands for media access control protocol and is used to uniquely identify each device on a network it is hard coded into every NIC by the manufacturer.

42
Q

What is a firewall and how does it work?

A

A firewall comes in either a hardware or software format and prevents a connection between an internal trusted network and an external untrusted one. Each packet that passes through a NIC is first checked against a set of preconfigured rules called packet filters and if it is not deemed worthy or safe it is rejected.

43
Q

What is packet filtering?

A

This is how firewalls determine if a packet is safe or not they do this by analysing aspects of the packet such as the port number which is specific to certain applications and protocols. Some port numbers may be blocked by administrators such as port 23 which allows someone to remotely access your computer as this could be used for malicious purposes.

44
Q

What is a proxy server?

A

A proxy server is usually used to keep a users Ip address private when sending requests to a server this is done by sending the request first to the proxy server which then either returns the IP address of the requested web page if it is stored in cache or sends a request to the server using the proxies IP address instead and the result is then returned to the user. They can also be used to filter content that the administrator deems inappropriate.

45
Q

What is encryption?

A

This is where data or information is translated into a code in order to make it unreadable to anyone other than the intended recipitent.

46
Q

what is the difference between a worm and a virus?

A

A worm can self replicate without user interaction but a virus requires files to be opened in order to copy itself onto these files instead.

47
Q

What is a gateway?

A

A gateway is piece of hardware that can adapt data packets on different networks if they don’t share the same protocols to make them suitable for the network they are trying to connect to. This is done by stripping a packet of its header and replacing it with the one correct for the network.

48
Q

What is a router?

A

Often representing the nodes of network diagrams routers allow data to be sent between two different devices and often connect a LAN with a WAN or ISP. The job of the router is to send data down the least congested route to the recipitent.

49
Q

What happens if a packet is lost or isn’t received by the recipient?

A

It will be requested again.

50
Q

What is a mesh network topologie?

A

A mesh network topologies is when all computers on a network are connected wirelessly to all other computers this allows internet connection to be shared between devices.

51
Q

What are some advantages of Mesh network topologie?

A

Advantages include:
More reliable as if one node on the network loses its internet connection it can easily connect again via another node.
No cabling costs as it is all wireless.
The more nodes the better as this only increases reliability.
New nodes(devices) can be easily automatically connected to a network.

52
Q

What is a WAP?

A

A WAP or wireless access point is often included in a router and is how devices can wirelessly receive data via a single radio channel.

53
Q

What is the difference between physical and logical topology?

A

Physical topology is the physical layout of the cables and other hardware making up network while the logical topology is how data flows on a network regardless of hardware layout.

54
Q

What is star topology?

A

Star topology is when all devices are connected to one central node such as a switch or computer which redirects data to specific devices via their hardcoded mac adress.

55
Q

What are some advantages and disadvantages of star topology?

A

Advantages:
Easy to add devices to a network.
If a cable fails it only affects one device.
More secure as data is only sent to one device and not all of them.

Disadvantages:
If the central node fails the entire network goes down and all devices lose their connection.
Large amount of cable required.

56
Q

what is bus topology and what are the advantages/disadvantages?

A

Bus topology is when all devices are connected to one single cable.
Advantages:
No additional hardware required such as a switch.
Disadvantages:
If the main cable fails the whole network goes down.
Not very secure as all computers can see all data transfers.
Performance gets worse with a higher amount of traffic.

57
Q

What is a WAN and what is a LAN?

A

A WAN is a wide area network and contains many separate LAN’s embedded inside it an example is the internet which comprises of millions of separate LAN’s and users.

A LAN is a local area network and is made up all devices on one network in one house or site.

58
Q

What does a domain name represent?

A

A domain name represents the location that an internet resource resides at.

59
Q

what are examples of TLD?

A

.com, .uk, .fr

60
Q

What are internet registrars and registries?

A

Registrars are companies that sell available domain names and keep track of all owned internet domains allowing people and companies to buy them.

Registries are five international organizations that keep a track of all registered domain names and information about their owners for example address, phone number email etc.

61
Q

What is a URL?

A

Uniform resource locater is the full address of an internet resource similar to the path your computer takes while searching for a file via the Path.

62
Q

What is the structure of the internet?

A

The internet is made up of large trans-continent cables called backbones these are connected to by Nation ISP’s and they distribute it to local ISP’s who then distribute to households and individuals.

63
Q

What is the name of main rules that are followed when simplifying Boolean expressions?

A

De morgens Law

64
Q

What is a Karnaugh map?

A

A Karnaugh map is a method of simplifying Boolean expressions by finding the squares or rectangles in a map.

65
Q

Simplify this expression using Karnaugh maps:

AvB^C^¬A

A

AvC

66
Q

How do you change a positive binary number into a negative one using both methods?

A
  1. Twos complement you swap all numbers to their opposites and add 1.
    2, Using the sign magnitude method you just swap the first digit of the binary to 1 to make it negative.
67
Q

What type of storage is CD?
How does it store data?
Pros and Cons?

A
  1. Optical storage.
  2. It stores data by burning a series of pits and lands into the disk which correspond to certain binary pieces of data it is also read by a laser which records how the light is reflected and returns the appropriate value either a 1 or 0.
  3. They tend to be very cheap light weight and portable but they are also prone to scratches and are slow when compared to other methods of storing data.
68
Q

What type of storage is a HDD?
How is data stored and read on a HDD?
What are its pros and cons?

A
  1. Magnetic storage.
  2. Data is stored in the forms of many thousands of tiny magnets with each pole on the magnet representing a 1 or 0 it is then read by a drive head which skims over the surface and translates the charge differences into binary.
  3. They have a very large capacity and are relatively cheap but they can be damaged easily and are slow.
69
Q

What type of storage is an SSD?
How is data stored?
Pros and Cons?

A
  1. Flash/Solid state storage.
  2. Data is stored via a series of electrons being forced through an oxide layer into a floating gate this is then read as either a 1 or a 0 and data can stored.
  3. Very fast and have no moving parts so pretty difficult to damage but often much more expensive for the size of storage and also has a limited life span as the oxide layer depletes over time.
70
Q

What is RAM and What is Rom?

A

RAM or Random Access Memory is a fast memory with a small capacity often found on the motherboard near the CPU it is volatile meaning it loses all data when the power goes off. It is used to temporarily store data and instructions that the CPU needs.

ROM or Read-Only Memory is a non volatile memory that often contains the instructions on how to boot a computer it is vital in order for the computer to be able to turn on and if damaged you are in big trouble.

71
Q

What is virtual storage?

Pros and Cons?

A
  1. Virtual storage is where data is stored somewhere other than a hard drive in your computer and is often stored in a “cloud” which is a server in a different physical location to that of the user.
  2. It is basically limitless, data can be accessed from any device anywhere. Storage can become quite expensive especially if you have lots of data to store. Also bad connectivity means slow access times and no internet means you cant access any data.
72
Q

What is a DBMS?

A

A database management system is any system that allows a user to modify features of a database.

73
Q

What is the difference between white and black-box testing?

A

Black box testing is where the internal structure of the program being tested is unknown to the player but white box is when the internal structure is known to the tester.

74
Q

What is an IDE?

A

An IDE or integrated development environment is a piece of software used by the majority of programmers to make writing code much easier.

75
Q

What are three benefits of using an IDE?

A
  1. Coloured code to highlight important parts that perform a certain function such as writing to the console.
  2. Numbered lines to make bugs much easier to find if the program runs incorrectly as the line number is given to the user.
  3. Automatic indentation to save the programmer time and reduce the number of errors such as the common “Doesn’t match outer indentation level”.
76
Q

What is the waterfall methodology?

Pros Cons?

A

The waterfall methodology is where a project is completed bit by bit and the next bit is only started if the last bit is finished and checked over by the customer but you cant easily return to previous stages to make changes.
Pros:
It means high quality code is written.
Customers have a large amount of input in the project at each phase meaning they are usually satisfied.
Cons:
You cant easily go back over your work making it stressful for programmers.
May take a longer amount of time if the customer changes their mind.

77
Q

What is the RAD methodology?

Pros Cons?

A

The RAD (Rapid Application Development) methodology involves the use of many separate prototypes and keen user involvement in order to speed up the development of software.

Pros:
Much faster to create projects.
Higher levels of customer satisfaction as they are included at each step of the way.
Cons:
Very expensive because of the prototypes.
If the customer changes their mind frequently slow development can become a problem.

78
Q

What is the spiral methodology?

Pros Cons?

A

The spiral methodology is set up in a way where after each spiral a new prototype is created and the spiral is started again.

  1. It is very good for the user as it allows them to change aspects of each prototype to suite them.
  2. It can be very expensive as prototypes aren’t cheap
79
Q

What is the difference between compiling code and translating it?
Pros and Cons?

A
  1. The main difference is that a compiler executes all the source code in one go as an executable file compared with a translator which reads the source code of a program line by line.
  2. Compilers are generally quicker as they don’t have to do each line one by one and instead can near instantaneously run all code at once. But when it comes to executions per second translators win by far as they run many small lines of code in a short space of time.
80
Q

What are three features of a multi tasking operating system?

A
  1. Helps the CPU communicate between all other Hardware in the computer.
  2. Keeps the system secure and often holds an inbuilt antimalware or antivirus to prevent malicious software from entering the computer.
  3. Provides a user interface through which a user can interact with the computer in may ways such as modify or delete files or even open applications.
81
Q

Name all three types of translator software?

A
  1. Interpreters
  2. Compilers
  3. Assemblers.
82
Q

What are the three buses?

What are they used for?

A

Data bus is used to transmit data between the main memory and the CPU it is bidirectional.

Address bus is used to transmit the address of data from the CPU to the RAM it only goes one direction.

Control bus is used to send commands from the CPU to all the other hardware in the system and it can only transmit one direction.

83
Q

What is the program counter?

A

The program counter is a register that holds the address of the next instruction.

84
Q

Why is it important to normalize floating point binary?

A

To increase the number of decimal places of accuracy provided.

85
Q

What two parts of a floating point binary number are there?

A

Exponant and Mantissa.

86
Q

What is this floating point binary as an decimal?

0.1010101 0101

A

21.25

87
Q

How do you convert numbers from integers to hexadecimals?

Convert 45

A

Divide by sixteen and the use a scale from 0-9 to a-f.

2D