Computer Science topic 1 -5 Flashcards

1
Q

2.1.2 Two’s complement

A
  • -> The MSB is a minus number as well as a sign bit.
  • -> always remember to write the + sign

negative numbers:

1) convert to the unsigned equivalent 8 bit binary
2) flip the bit
3) add 1 arithmetically

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

2.1.3 denary to binary

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

2.1.5 overflow error

A

Overflow error means that the result of the calculation is too large for the space allocated.

The way a computer handles this will depend on how its set up:
It could crash and report an overflow error.
It could truncate the answer.
It could wrap the number around back to 0.

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

2.1.6 hexadecimal to binary

convert C3 to binary

A

1100 0011

1) convert each digit to denary
2) convert denary to binary
3) combine to get binary number

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

2.1.6 binary to hexadecimal

convert 1011 0011 to hexadecimal

A

B3

1) split the byte into two nibbles
2) convert each to denary
3) add these together to get hexadecimal

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

2.2.1 ASCII

A

ASCII (American Standard Code for Information Interchange)

ASCII enables computing devices to communicate with another and to translate their communication into identical information.

Limitations:

  • ascii is only 7 bits, so can only store up to 128 unique characters.
  • other languages have characters that can be represented with only 7 bits.
  • more bits are needed to represent some alphabets.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. 2.2 - define:
    a) pixel
    b) resolution
    c) colour depth
A

a) pixel
- a picture element, a tiny square of colour

b) resolution
- describes how tightly packed the pixels are
- describes the number of pixels per inch.
- if you enlarge an image it becomes more pixelated and has a lower resolution.

c) colour depth
- the number of bits used to encode the colour of each pixel in a bitmap image.
the more bits used to encode the colour, the greater the number of actual colours that can be represented in the image so that is is more detailed.

2ⁿ

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

2.3.1 units

A

Kiss My Gross Toes

Kibibyte
Mebibyte
gibibyte
tebibyte

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

2.3.2 lossy compression

A

+ bigger reduction in file size
+ data removal is not noticeable human eye or ears

  • removes actual data
  • original cant be reconstructed

uses: image size and digital sound recording
examples: MP3 audio files and JPG image files

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

2.3.2 lossless compression

A

+ encodes data, rather than removes it
+ original can be reconstructed exactly

  • not as much reduction as lossy compression

uses: text files and graphic files with a low colour depth
examples: compressed text files, GIF and PNG image files and FLAC and ALAC audio files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. 3.2 compression
    a) reasons for compressing files
    b) advantages of file compression
A

a)

1) reduce storage requirements
2) reduce network transmission time

b)

  • less internet bandwidth is used when files are downloaded
  • transfer time is faster
  • less storage space is needed
  • smaller files reduce congestion on the internet
  • audio and video files can be streamed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

3.1.1 von Neumann

A

a MEMORY UNIT into which programs instructions and data loaded prior to being processed.

a PROCESSING UNIT to decode and execute program instructions fetched from memory one at a time.

INPUT and OUTPUT mechanisms to input programs and data and output the result of processing

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

3.1.1 main memory

A

short, term working memory
only holds the instructions and data that the CPU is currently using.

consists of a collection of storage location, each with a unique address.
a storage location and hold a program instruction or an item of data.

referred to as RAM

primary storage because the CPU had fast, direct access to it.

volatile

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

3.1.1 Central processing unit (CPU)

A

Buses, control unit, clock, ALU, registers

buses - work together to transfer data between the CPU, main memory and input/output devices.

control unit - fetches program instructions from main memory one a time and decodes them and directs the operations of the other parts of the system to execute them.

clock - synchronises the actions of the CPU

ALU - performs the actions of the CPU.

Registers (immediate access storage) - memory that is extremely fats.
some are general purpose while other are have specific functions.

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

3.1.1 Buses

A

control bus
signals are carried between the CPU and other parts of the computer system.

address bus
holds the memory address of the memory locations that the CPU needs.

data bus
transfers program instructions and data between memory and the CPU.

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

3.1.1 Fetch decode execute

A

The Fetch stage
(adress,control,data bus) abcd
1) the CPU places the memory address of the next instruction on the address bus.

2) the control unit sends a read signal along the control bus to memory.
3) the content of memory location is transferred along the data bus to the CPU, where its stored in a register.

The decode stage
- the control unit decodes the instruction by looking it up in the CPU’s instruction set

The execute stage

  • the CU then carries out the instruction.
  • it instructs the ALU if calculations need to be performed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

3.1.2 Why secondary storage is needed

A

RAM is volatile.
it loses its contents when the power of switched off.

Secondary storage provides non-volatile storage that can be used to write and rewrite data, so that it does not vanish when the power is turned off.

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

3.1.2 differences between primary and secondary storage

A

primary

  • volatile and power dependent
  • short term
  • directly accessible by CPU
  • Limited storage capacity
  • Limited scope for expansion.

Secondary:

  • non volatile
  • long term
  • programs and data must be transferred to memory in order for them to be accessed by the CPU.
  • large storage capacity
  • can be expanded by using external device (USB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

3.1.2 advantages and disadvantages of optical

A

+ cheap yo produce
+ thin and lightweight
+ portable

  • slow to access
  • low capacity
  • prone to scratches
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

3.1.2

advantages and disadvantages of magnetic

A

+ high capacity
+ quick to access, providing the disk is defragmented periodically.

  • Has moving parts that will eventually fail.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

3.1.2

advantages and disadvantages of solid state

A
\+ quick to access
\+ no moving parts so reliable
\+ quit
\+ low power requirements
\+ no need to defragment
  • expensive
  • has a limited number of read write cycles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

3.1.2

magnetic storage

A

Magnetic media are coated with a substance that can be magnetised.

Magnetic storage technology works by magnetising parts of this substance as north and south poles to represent binary 1s and 0s.

Examples include: hard disk drive, tape drive and cassette.

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

3.1.2 optical storage

A

Optical media consists of a platter with a flat reflective surface.

Optical storage technology works by using a laser to burn ‘pits’ into the flat surface.

The reflective areas between pits are known as ‘lands’.

A laser is directed onto the medium’s surface.

When it hits land, a beam reflects (this is read as binary 1).

When it hits a pit, the beam does not reflect (this is read as binary 0).

Examples: CD and DVD.

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

3.1.2 solid state storage

A

Solid state media consists of silicon chips that feature a special kind of transistor called NAND flash.

This type of media is called ‘solid state’ because it has no moving parts.

Solid state technology works by using a large electric current to force electrons through a barrier trapping them in positions called pools.

A full pool - 0.

An empty pool - 1.

Examples include: SSD card, USB, SD memory card and flash storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
embedded systems
features hardware firmware IoT
26
3.2.1 operating system (user management)
- provides a user interface to enable users to interact with the computer. access control: the OS uses log in name and passwords and or some form of biometric identification to authenticate users and control who can log in. file permissions: control who can do what with each file (read, write, execute, delete)
27
3.2.1 Main tasks
process management: overseeing the execution of programs by the CPU and allocating each of them a share of main memory and CPU time. File management: organising and keeping track of the contents of secondary storage, managing files and folders and using permissions to control user access to programs and files. user management: providing a user interface to enable users to interact with the computer peripheral management: communicating with device drivers to control peripheral devices
28
3.2.2 Data compression | purpose and how it works
purpose to reduce the size of a file so that it takes up less space in secondary storage and is quicker to transfer across networks ``` how it works it repackages (lossless) or removes (lossy) some of the files data to reduce its size. ```
29
3.2.3 code reviews purpose and how it works
purpose to a code review is: - to check that software adheres to agrees standards. - to find any instances of insufficient code - to identify potential vulnerabilities how it works: - -> carried out by other programmers or by specialised software. - -> that checks the code to make sure it meets a pre-defined set of rules - -> detect bugs and security issues - -> may suggest ways to fix them
30
3.2.3 audit trail
what is it: - helps improve accountability - by keeping track of who made what changes and when during the development process. - if a problem is discovered, it can be tracked back to its source and the code rolled back to a version before the flow was introduced. version control software - -> often used alongside audit trails, especially when a team of programmers is working on a large program. - it uses a database to keep track of every modification to the code. - if a mistake is made, programmers can revert to an earlier version
31
3.2.3 three things programmer can do to make their programs robust?
adhere to good programming practises carry out regular code reviews keep an audit trail
32
3.2.3 bad programming practises:
1) poor planning that does not take account of potential security issues 2) using a quick fix rather than taking time to solve a problem properly 3) poorly structured code that does not here to agreed standards. 4) insufficient testing
33
3.2.3 four things to look for in a code review?
errors in code code inefficiencies bad programming practises requirements are fully implemented
34
3.3.1 Low level language
Mnemonics. One line generates one instruction in machine code. Microprocessor specific. A very limited range of instructions is available. Every task, even the simplest, has to be built up from the smallest steps. There are no strings, integers or real numbers, just binary, so you have to decide how to represent your data. You also have to decide and manage where it is stored in memory.
35
3.3.1 high level language
English-like keywords. One line generates multiple instructions in machine code. Very abstracted instructions that are portable across different architectures, wherever there is a translator. Complex programming constructs (if, for) available for working at a more abstracted level. Enforced data types help manage storage.
36
3.3.2 interpreter
translates the high level code line by line into machine code. it is needed each time the program is run. + works across different platforms because the machine code is not sent, + simpler to test as it reads source and runs it. + can be easier to debug because source code is always available. - execution is slower - source code is public because you have to send it to whomever you want to run the program. - whomever wants to run the source code must have the interpreter for the language,
37
3.3.2 assembler
translates the mnemonics of assembly language machine-code instructions. very similar to machine code. there is one assembly code instruction for each machine code instruction.
38
3.3.2 compiler
translates the source code to a stand alone machine code program that can be executed by the processor. + can be optimised to run very quickly on the targeted CPU. + the source code is private because you don't have to send it to everyone you want to execute the file. + once compiled, the machine code us saved to disk in a file and its immediately ready to rum. - executable file is not portable across different platforms. - compilation is an extra step that is required each time the source file is changed - source code has to be recompiled to target each different type of CPU.
39
what is a network
A network is an arrangement of two or more computing devices connected together in order to communicate with each other and share resources.
40
reasons for connecting computers on a network
to share data and software to share printers, hard drives and other hardware peripherals. to share internet connections and services. to provide centralised support and backup services. to enable the rabid deployment of new software and updates to enable people to communicate with each other using services. to support collaborative working
41
LAN and WAN
LAN (Local Area Network) a network that covers a relatively small geographical area. WAN (Wide Area Network) a network that covers a large geographical area and connects together multiple LANs.
42
IP address
internet protocol address a unique identifier assigned to each device connected to a network. - most devices use a dynamic IP address - this is allocated to them from a communal pool when they connect to the internet and returned when they disconnect. - next time they connect, the IP address will be different. a device such as a router, is permanently connected to the internet with a static IP address that never changes.
43
Packet switching
1) the senders large file is broken up into smaller packets. 2) packets are directed to their destination by routers. routers inspect the packets and decide the most efficient path to the next router. 3) packets take different routes across the network. they may nit arrive in the correct order. 4) the receiving computer reassembles them in the correct order using information in the packet headers.
44
wired vs wireless
transmission speed is faster for wired. latency is very low for wired (good)
45
network speed
file size = time x data transfer rate time (s) = file size (bits) / data transfer rate (bps) data transfer rate = file size / time speed (data transfer rate) = size / time (time)
46
email protocol: POP
Post Office Protocol used by client to retrieve emails from a main server. all of the emails are downloaded when there is a connection between client and server. messages are deleted from the email server once they have been downloaded. - get email from a mail server - emails are removed, once downloaded to a client
47
email protocol: SMTP
Simple Mail Transfer Protocol provides the rules for sending email messages from client to server and then from server to server until it reacges its destination. - used to send email between email servers - it is not to receive emails
48
email protocol: IMAP
Internet Message Access protocol messages do not have to be deleted. they can be read and stored on the message server. - a set of rules that email client programs use to download emails from a mail server. - this protocol leaves the emails on the server so they can be accessed by a different application.
49
TCP/IP Model (simple VERY)
Application: user interface Transport: create a channel and packets Internet: addressing Link: physical transmission After Tea I Link
50
Describe the process of sending information from client A to client B
From client A, the information that needs to be sent from an application in the application layer, is sent down to the transport layer. It is then split into packets. The packets are sent to the internet layer. Addresses are added to the packets. They are sent to the link layer. There, they are converted into signals and sent across the transmission medium. At the receiving end, the signals are converted to data and sent to the internet layer. There, the addresses are removed. The data is sent up to the transport layer, where the many packets are joined back up together in the right order. The data is sent up to the corresponding application on the application layer. The data is processed for client B.
51
star topology
in a star network, each computer or client is connected individually to a central point or node, which can be a hub or switch. + data is only sent to the intended computer directly + network traffic is kept to a minimum + if one fails, all of the others will continue to operate, + it is easy to add new devices without disrupting the network. - if the central point fails, then so will the entire network. - requires a lot of cable because each computer connects individually to c central component.
52
firewalls
Firewalls are software. They are designed to monitor and block incoming and outgoing connections to a network. Firewalls protect a system from hackers. If a hacker is already inside the system, they may be prevented from doing extra damage by the firewall blocking outgoing traffic ----------------------------------------------------------------- - a firewall protects a network connected to a WAN such as the internet. it can be provided by hardware or software. firewalls can be configured to prevent communications from entering the network and also programs and users from accessing the internet from within the netwokrk.
53
TCP/IP protocols
application - HTTP, HTTPS, SMTP, POP, IMAP Transport - TCP Internet - IP Link - Ethernet, Wi-Fi
54
TCP/IP (table)
Application Contains the applications that exchange data, such as email clients and web browsers Transport Determines how the data being sent gets to its destination Splits up data and puts it into packets Internet Deals with the IP addresses Adds addresses to the packets Link Responsible for converting the packets to signals that can be sent across transmission media
55
TCP/IP (very detailed)
The sending computer used protocols in the application layer first. These protocols are responsible for how user applications, such as email and web browsers, package their data to be sent online. Then protocols in the transport layer establish a channel between the two devices and split the data into packets. In the internet layer (or network layer), addressing is carried out. The addresses of the sending and receiving devices are added to the packet header. Finally the link layer (or network interface layer) is responsible for transporting the raw data over the transmission medium. This includes generating the right type of signal for the connection type - light for fibre and electrical for ethernet. The receiving computer follows the same processes but in reverse. The signal is translated into data The addresses are taken off The packets are reconstructed The data is rendered for the application.
56
TCP/IP (very detailed)
The sending computer used protocols in the application layer first. These protocols are responsible for how user applications, such as email and web browsers, package their data to be sent online. Then protocols in the transport layer establish a channel between the two devices and split the data into packets. In the internet layer (or network layer), addressing is carried out. The addresses of the sending and receiving devices are added to the packet header. Finally the link layer (or network interface layer) is responsible for transporting the raw data over the transmission medium. This includes generating the right type of signal for the connection type - light for fibre and electrical for ethernet. The receiving computer follows the same processes but in reverse. The signal is translated into data The addresses are taken off The packets are reconstructed The data is rendered for the application.
57
consent
DPA gives data subjects the right to: - be informed about the collection and use of their data - access their data - have inaccurate data corrected - having data erased - object to how their data is processed - withdraw consent at any time - restrict the way in which their data is processed - obtain and reuse their data for their own purpose
58
data protection act 2019
- lawfulness, fairness and transparency - purpose limitation - data minimisation - accuracy - storage limitation - security - accountability
59
algorithmic bias
this results in them making prejudiced decisions that discriminate against certain individuals. Algorithmic bias can occur because: The dataset used to train the AI system is itself biased. There is a design flaw in the AI algorithm causing it to exaggerate bias rather than ignore it. The developers who design and build AI systems unintentionally incorporate their own prejudices into them.
60
backup and recovery procedure
Backing up involves making a copy of the data and storing it on a different device in a different location, offsite or in the cloud. recovery is the process of restoring data and/or systems from the backup copy. backing up is often automated. full backup - full copy is made of everything regardless of what was copied last. incremental backup - copies new files and those changed since the last backup
61
caf