GSCE Computer Science Flashcards

1
Q

why do we need primary storage

A

RAM- store instructions while computer is running. CPU fetches instructions from RAM, stores operating system, currently in use programs, open applications and data in use
ROM- stores boot-up sequence for BIOS, loads operating system

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

difference between RAM and ROM

A
ROM= non-volatile, usually fixed, contents of it hardly ever changes, smaller than RAM, stores boot up sequence, stores BIOS, loads operating system
RAM= volatile, easily expandable, contents change frequently, larger than ROM, stores programs currently in use, open applications, data in use and operating system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

virtual memory

A

Part of secondary storage
Used to store data temporary’s when ram full, data moved from RAM to VM
Make space in RAM
So ram can be filled up with new data
Let’s you run applications larger than what ram can support
Let’s more memory be used than there is in the system
Allows us to open programs when RAM is full
When data in vm is needed, moved back to ram

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

Virtual memory disadvantage

A

slows down CPU performance - disk thrashing ( overuse of virtual memory)
Data has to go from virtual memory to ram to CPU and virtual memory is apart of solid state drive/hard disk/secondary storage
this transferring takes processor time

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

What is secondary storage

A

long term non-volatile storage of data/files
not constantly connected to computer and devices
isn’t directly accessible by CPU

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

Why is secondary storage needed

A

To permanently save files, data and programs when the computer is switched off
back up the data stored in ram
Need for larger storage capacity
RAM is volatile, ROM cannot be written to

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

what are the types of secondary storage

A

optical
magnetic
solid state

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

optical storage

A
  • slow
  • easily scratched - low reliability, low durability
  • small capacity 700mb -50gb
  • small
  • portability , easy to move about
  • cheap
  • no moving parts
  • can be backed up easily
  • can’t be over written, read-only
  • Can be read by other devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

magnetic storage

A

has moving parts so:

  • only reliable in a machine that doesn’t move
  • not portable though portable HDD can be get
  • has moving parts so not durable
  • slow-medium speed
  • very large capacity 1-12tb
  • cheap
  • Data could be corrupted if close enough to a magnetic field
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Solid state storage

A
No moving parts
Fast speed
Large capacity 250gb-2tb 
Portable
Durable
Reliable 
As no moving parts
Expensive cost
Can get lost
Wear out over a long time period
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Properties you should consider when deciding on type of storage to use

A

capacity
cost
speed
size
portability- physical and if data can be moved from one device to another
durability- ability to resist damage, length of time expected for data to last
reliability- whether data will be saved as expected, data is not affected when saved, no changes to file formatting
robustness

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

How does optical storage work?

A

Laser light creates marks in a pattern on a disc

laser light detects where marks are and translates it into readable format

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

Optical storage capacity

A

CVD rom- up to 720mb
DVD- up to 8.4 gb
Blu ray- up to 50gb

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

How does magnetic storage work?

A

Info is written to/read from the storage medium as it spins by read-and-write heads that changes how magnetised that part of the medium is. heads that detect/ modify the magnetism to read data. magnetism is 1, demagnetised is 0

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

How do solid state storage work?

A

made of microchips (switches)

state of switches determine if 1 or 0 is stored

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

Optical storage examples
Magnetic storage examples
Solid state examples

A

Solid state storages- USBS drives, Solid state (SD) drives, memory cards, flash memory

Magnetic storage- magnetic tape, mechanical hard disk drives, portable HDD

Optical- Blu-ray, CVD-ROM, DVD

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

Units

A
Bit (0 or 1)
Nibble (4 bits) 
Byte (8 bits)
Kilobyte (1,000 bytes or 1KB) 
Megabyte (1,000 KB)
Gigabyte (1,000 KB) 
Terabyte (1,000 GB) 
Petabyte (1,000 TB)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is meant by a bit

A

the smallest representation of data, 1 or 0. Single binary digit

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

How data needs to be converted into a binary format to be processed by a computer

A

Computers consists of transistors/switches/logic circuits/ gates which only have two values/ on or off/1 or 0/ open or closed
Circuit only needs to check for two states/ uses switches electricity flowing or not flowing/on or off/1 and 0

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

Computers consist of

A

Binary numbers, 1 or 0
The circuit only needs to check for the states 1 or 0
Only understands binary

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

What is a overflow error

A

When we add or shift a number and it becomes too big for the register , number can’t fit into 8 bits and is greater than 11111111 and there is a extra carry/bit

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

Hexadecimal

A

One hexadecimal is equal to one nibble
made up of 4 bits per hex digit

used in: defining colours in graphics software, represent MAC addresses , displays address, for checksums

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

Advantages of hexadecimal

Why do people use hexadecimals to represent numbers stored in computers

A
Straightforward to convert, easier to convert to binary as each hexadecimal digit is a nibble in binary
Shorter number to remember than binary 
Quicker to enter 
Less susceptible to errors
Easier to work with than binary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Binary shifts

A

Shift to right of binary, if u convert to denary you’ll see it has been divided by 2
Shift to left, multiply by 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Character set
The range of characters (symbols, numbers, letters) that can be represented by a computer each character has a binary value that computer understands/uses.
26
What is used to represent characters
Each character is assigned a unique character code (binary value)
27
Character set examples
ASCII: 7 bits, 128 characters Extended ASCII: 8 bits, 256, more characters it can represent and European symbols and other languages Unicode: 16 bits or up to 32 bits. Encodes set characters. All languages
28
What does ASCII stand for?
American Standard Code for Information Interchange 7 bit character system used to code the character set the computer uses System uses code to represent characters, symbols, numbers
29
Why would Unicode be used
To use other special characters found in different languages
30
A image is made up of
pixels which have a binary value to them which represents a colour Smallest element of a image The binary numbers are stored in order in the file
31
Bitmap image
Based on pixels Each have binary value That represents a colour
32
Vector image
Based on mathematical algorithms
33
Colour depth
Amounts of bits stored per colour of pixel How many colours that can be represented The bigger the colour depth=The higher the accuracy, more colours can be represented. But higher file size
34
Resolution
Number of pixels per inch of screen | For image: size of image. number of total pixels (image width x image height)
35
Increasing resolution
Only increases quality if screen is bigger Smaller images on big screens, image is stretched and lowers quality Otherwise, increasing resolution= decreases battery life /larger file size as more pixels-more data needed to be stored
36
How does reducing the number of colours in a image can reduce its file size
Colour depth decrease Fewer bits needed per colours As less colours are represented Which means fewer bits per pixel Opposite: more colours, more bits required for each pixel E.g two bits per pixel (00 to 11) - four possible colours
37
Meta data
Background information (data) of a file computer needs to know the size of the image (height, width, colour depth in bpp) Allows the computer to recreate the image from binary
38
How sound is sampled and stored in digital form
Amplitude of waveform measured Converted into binary At regular intervals
39
Sample frequency
Number of samples taken per second
40
Bit rate
How much data is being processed per sec | Sample frequency x bit depth x channels
41
Bit depth (audio)
Number of bits taken per sample
42
Larger sample frequency and bit depth
Better quality Higher file size More bit depth- more sound/ data captured More sample frequency- less time gap between each sample Sound reproduced is closer to original- accuracy
43
The need for compression
- Quicker upload/download/load/transfer time - Less storage space taken up - less mobile data/bandwidth usage
44
Lossless compression
``` Uses algorithm to compress file No data is lost (data lost is only temporary, comes back when file is uncompressed) Reduces file size less than lossy Better quality Suit for text and code as no data lost ```
45
Lossy compression
Permanent loss of data Cannot return to its original condition/not identical to original as data removed Reduces file size more/significantly Loss of quality more Unlikely to be noticed by humans For unnoticeable data / end users unlikely to notice the removal of data E.g images, videos, sound Where loss of quality is an acceptable trade off for smaller files Cannot be used for text/code, makes unreadable /unable to execute code
46
Optical storage different types
ROM- data pre-written on them by manufacturer. Cannot be overwritten. Use:Music, films, software, games. R- blank. Writes data but can only be written once. Can be ready many times. Use:Copying data. RW- can be written more than once
47
How to calculate number of bits
pixel width x pixel height x colour depth (bit per pixel)
48
Examples of sound files and video files
``` sound= FLAC, MP3, WAV video= MOV, MP4, AVI ```
49
ALU (Arithmetic Logic Unit)
Performs logical and arithmetic operations (calculations and logical comparisons)
50
Fetch decode execute cycle detailed steps.
Program counter copies address of the next instruction to be run from RAM and stores it in the MAR. Program counter increments by 1. MAR stores the address of data. CU fetches data using address and stores data in MDR. Data is decoded by CU, and executed (e.g ALU does calculation)
51
What does the fetch decode execute cycle do?
TO PROCESS DATA Instruction fetched from RAM memory. Instruction decoded. Instruction executed. Process is repeated. CPU performs continuously.
52
CU (Control unit))
Controls and monitors communications between hardware attached to the computer. Controls input + output of data.. decodes instructions Checks if signals have been delivered successfully. Makes sure data goes to the correct place at the correct time. data transfer between the registers in a CPU synchronized to the clock- co-ordinates all of the other components of the CPU.
53
Registers are
small fast memory storage with a set purpose Accumulator, MAR, MDR, Program counter
54
Memory address register (MAR)
Stores address of data that will be read/written/accessed/fetched/being processed/next to be processed
55
Memory data register (MDR)
Stores data that is fetched/written to memory/next to be processed data/data fetched from data address in the MAR
56
Program counter
Increments by 1 holds the address of the next instruction to be executed and copies it to MAR
57
Accumulator
Stores result of ALU
58
Things that can affect the performance of a computer
RAM (only if the computer runs out of memory space in ram, less reliance on VM) Cores Clock speed Cache Graphics Card Sound card Motherboard
59
Clock speed
number of FDE cycles run per sec/or given time. Measured in hertz 1 Ghz=1 billion cycles per sec Higher Clock speed=more processing it can do per sec+instructions executed faster
60
Cores
. Allows multitasking/parallel processing. Each core can simultaneously execute instructions or run different parts of the program at the same time. Can process instructions independently of eachother Double core processor eg: Processes can be split up between processors and processed faster. More processes completed per second E.G doubling the cores, doubles maximum processing the CPU can do However, only improves performance if software is designed for multiple cores/depends on task
61
Why does having multiple cores sometimes not increase performance
-If software isnt designed for it :isn't programmed to be split between more cores -Depends on the task, some tasks cannot be split across cores -Other factors besides from cores affect performance e.g a quad core may have a lower clock speed, RAM size, cache size, than dual core
62
Cache
Stores frequently, recently and next to be used data that can be accessed faster than accessing it through RAM as transferring data to and from CPU and cache is faster than data to and from CPU and RAM. Too much cache is detrimental as it will take longer for CPU to find the specific instructions in cache. Increasing the cache, more data is transferred faster, makes CPU more efficient
63
Embedded system
computer system built into another device.
64
embedded system examples
Microwave, washing machine, dishwasher, oven, MP3 player, digital clock, calculator, coffee maker.
65
What is a embedded computer
single microprocessor that includes RAM, ROM and the CPU. Its frequently used to control a device using simple controls. Has a dedicated/limited purpose Mostly designed to do one specific task Simple/no user interface
66
General purpose computer
Designed to be able to carry out many different tasks Consists of hardware and software Flow of data is input>CPU>primary memory/secondary memory> output Can have many applications E.g access the internet, play games/videos/music, email, store and retrieve data
67
What does the CPU do
Processes data and instructions FDE cycle Controls computer system
68
Software and hardware
Hardware - physical components of computer e.g CPU, hard disk, monitor, keyboard, mouse Software- programs that run on computer
69
Buses
High-speed internal connection Sends control signals and data between processor and other components(RAM memory, input/output devices) Address bus- memory address Data bus-data Control bus- clock’s pulses, control signals
70
Von Neumann architecture
Data and instructions stored as binary and both stored in one memory (RAM), instructions fetched from memory serially (in order) one at a time processor decodes+executes instruction, then cycling around to fetch next Cycle continues until no more instructions Input device> CPU (control unit, arithmetic logic unit, registers) Memory unit Output device
71
network
set of connected computers and other devices in order to share resources
72
network benefits
- can share files/ can work collaboratively on the same files - can share hardware resources - can access their files from any computer - can work together from different computers using instant messaging - centralised deployment of software to all computers
73
LAN
covers small geographical area usually located on a single site uses its/connected by own internal infrastructure/hardware uses cables and radio waves to connect Examples include home, small business, school networks Generally the router connects the devices in a LAN together
74
WAN
covers large geographical area uses external infrastructure/hardware two or more LANS connected together Uses cables. Telephone lines, satellites, radio waves to connect Examples include ATM machines, the internet, international banking systems
75
similarities of WAN and LAN
allow devices to communciate with eachother allow for shared periperhals allow for remote maintenance
76
Speed of a network
``` Bit per sec (bps) E.g Kbps Mbps Gbps ```
77
Bandwidth
How much data can be transferred over a connection in a given time Bandwidth is shared/split between connected devices E.g 54mbps per device if there’s 1 device, 27mbps per device if there’s two devices
78
Factors that affect the performance of networks
Wired/wireless connection Bandwidth available Number of users using the network at the same time Number of data collisions and transmission errors Interference (wireless) Signal strength Amount of data being transferred/applications being used Server/CPU performance Hub/switch
79
Client server model
Network relies on a central server clients (devices) request services from server (e.g print services/ file services) client is dependent on server to provide/manage the resources and info
80
Pros and cons of client server model
All files can be stored centrally -user monitoring -workers can access files from any computer -all computers can update the central database/file Backups are central -all data is backed up each time -individual computers do not need to backup their own data Upgrade software centrally -so you do not have to install on each computer individually Central security (antivirus/firewall) Centrally administered in one location ---------------------------------------------- Central point of failure Can be expensive to maintain and set up (e.g cabling costs, specialist staff.) specilised required to set up server central server needed
81
Peer to peer network model
No central server Devices on the network have equal status Files and data are shared between devices on the network
82
Pros and cons of peer to peer network
Easier to set up - simply be cabled together easier to add new devices No special software/specialist required to run less initial cost and maintenance If client goes down/fails, can connect to another peer (computers directly connected to eachother) no reliance on the company’s server and it’s connection to the internet, computers are independant and equal - decentralised no need to invest in lots of hardware and bandwidth and system likely more fault tolerant no central software installation/devices can have different software ----------------------------------------------------------------------- decentralised - no central file storage- files stored on individual machines - hard to find and located a certain version of file and files may become out of date. Performance- as the number of connected devices increases, each computer is being accessed by the other so performance decreases security problems - no central security so computer will need own security, and more vulnerable to social engineering as equal status and the malware can spread throughout the network backup recovery- data is not centrally back up/updated so data have to be backed up individually and separately by user.
83
The hardware needed to connect stand-alone computers into a local area network
``` Routers Switches Wireless access points Network interface card Transmission media ```
84
Routers
- Directs packets/data to destination in a network - Receives packets/data from network/Internet - forwards packets/data to other computers on a network/internet - connects (different) networks together e.g joins home network to Internet - Has public IP address for LAN - Designates private IP addresses to network nodes
85
Switches
- connect devices together - receives data n directs traffic only to its destination - generates list of connected devices, receives signals - uses MAC address of devices connected to it
86
Wireless access points
-allows wireless devices to connect to wired network using Wi-Fi usually connects to a router (via a wired network) as a standalone device/ integral component of router itself -the further the device is away from WAP, signal strength weakens and possible wireless interference too (obstructions e.g walls)
87
Network interface card
- Built into most devices, allows to connect to wired/wireless network - Allows data packets to travel to and from a computer - contains MAC address (physical hardware address) - allows Ethernet cable to be plugged into it
88
Transmission media
Ethernet (Cat 5e/ Cat 6) (twisted pair) -A networking standard (uses twisted pair cabling or fibre optic) -cheap, max transmission speed is up to 1gbps, max distance for reliable communication up to 100m ------------------------------------------------------------------------------------------ Fibre optic -often used with WAN or larger LANS -expensive but fast, max transmission speed is over 40tbps, max distance for reliable communication is over 2km -higher bandwidth, faster transfer speeds -data can be transmitted over long distances without any loss of signal quality and as they transmit through light, they do not suffer from electrical interference ------------------------------------------------------------------------------------------------ Coaxial cable -an older networking standard
89
internet
Inter-networking giant mesh WAN Worldwide collection of computer networks connected together
90
How a DNS (domain name server) is used in the process of accessing the website
-Allows you to type a web address into your web browser and translates it into an IP address -Domain Name Service contains many DNS(domain name servers) -DNS servers contain a database of domain names/URLs/website addresses, and their corresponding IP addresses -The domain name/website address entered by a user is looked up in the DNS database tables to find the matching IP address All packets are transmitted via IP addresses- therefore to access the server that hosts a website the IP address would be needed
91
Hosting
Website is placed on web server - known as hosting and a suitable domain name selected
92
Web servers & clients
main purpose of web server: host websites and deal with client requests When website visited on client (device), a request to the web server is sent and then the website (stored as text HTML) is sent to the client and recreated in the browser The web server is located via IP address
93
Client to web server process
- website is hosted on a web server - website/web server has an IP address - browser sends URL to DNS - URL has a linked IP - DNS finds IP - ///if DNS cannot find the IP it passes request to higher DNS - ///if not found, return error - if found, IP address sent back to the browser/computer - (Browser) sends request to IP/web server using IP - web server processes request for website/page - web server sends webpage/file/data to the user
94
The cloud/ cloud computing
Computing done outside of your local network. Network of servers Some servers run applications, some store data Data is stored on the internet and remotely in large centre data servers across the world and managed by cloud providers
95
Advantages of cloud
- efficient method of backing up data, saves time and money - Allows employees to work from anywhere - Environmentally friendly - Easy to increase availability of storage - Specialist network skills not needed, don’t need to employ more staff - Cloud third party provides security+backups, saves money on staff and software/hardware - Cheaper as don’t need own infrastructure - Increase storage - Access files anywhere in the world - Collaborate with others around the world
96
Disadvantages of cloud
- Need constant internet connection - Reliant on third party to carry out security procedures,company itself still legally responsible if things go wrong, back up connection - Data vulnerable to hacking+other threats which the company have no control over - Issues regarding data ownership - Implications of data protection act
97
Star network topologies
Each device on network has own cable that connects to a switch/hub hub sends every packet of data to every device/switch only sends packet of data to destination device
98
Advantages and disadvantages of star network topology
``` If a device fails the rest of the network is unaffected Simple to add new devices Good performance Fewer data collisions Easier to manage from a central point ------------------------------------------------------------------------------------ If switch dies, network dies Can be expensive for cables ```
99
Mesh network topology
No central connection point Each node connected to at least one other node and squally to more than one Each node is capable of sending messages to and receiving messages from other nodes The nodes act as relays, passing on a message towards its final destination
100
Mesh advantages and disadvantages
-no single point where the network can fail, if a node in the route fails the packet is sent a different way -Can handle high volumes of traffic -adding more nodes will not hinder the process as all nodes help to transmit data ----------------------------------------------------------------------------- Expensive to set up, needs lots of cables Difficult to manage and maintain
101
Wired
Ethernet/fibre optic/coaxial cables to form connections between nodes(networked devices)
102
Wireless (Wi-Fi)
medium range wireless technology used to connect devices together uses radio waves transmitted by a WAP that has a wired connection to the internet examples: 2.4Ghz - ultra high frequency 5Ghz - super-high frequency
103
Wired advantages and disadvantages
generally faster data transfer compared to wireless networks much less likely to suffer from interference than wireless networks more difficult for unauthorised users to intercept data -------------------------------------------------------------------------------- expensive to install or reconfigure users cant instantly move a device from one location to the another as there might not be a network connection available
104
Wireless advantages and disadvantages
Allows more flexibility with location as users can move around freely and still stay connected cheaper to setup new nodes can be added easily without interruption to the network ------------------------------------------------------------------------------------ wireless transmission is slower than cabled more devices/users could be connected e.g mobile phones//increase in traffic reducing bandwidth available for each user//insufficient bandwidth for users/demand wireless can be limited by interference such as wall or other wireless users that disrupt the signal radio signals pose a security risk as they can be intercepted by unauthorised users. to overcome this problem, messages need to be encrypted.
105
Bluetooth
Uses radio frequencies No physical cable connections required Designed to enable range of portable devices to connect to each other and to less portable hardware Operates over short range (10~100m) which can be affected by obstacles Devices do not need to have a direct line of sight to connect Common uses: Sharing data files between mobile phones Sending audio to Bluetooth speakers
106
Bluetooth advantages and disadvantages
-Low cost to set up -Uses relatively little power compared to other types of wireless connection -you can easily set up Bluetooth networks with other Bluetooth enabled devices ———————————————————————— Short range Low level of security Low data transmission rate
107
IP addressing and IP Address
IP addressing is data travelling on a network are sent as packets each device on the Internet has a unique IP address which is used as an "address" to send the packets ------------------------------------------------------------------------------------------ IP Address is a unique ID can be changed/allocated as needed configured by software used for routing across the internet or Network
108
IP address IPv4 system | P address IPv6 system
4 bytes long 4 sets of 8 bits Values separated by dots normally written in denary 0-255 allow for just over 4 billion unique addresses --------------------------------------------------------------------------------------------- 8 groups of 4 hexadecimal digits 8 sets of 16 bits values separated by colons allows almost 80 octillion unique IP address
109
MAC address
consists of 12 hexadecimals/normally written in hex 48 bits / 6 bytes long configured in hardware only used within a LAN fixed/cant be changed unique serial number assigned to each network interface controller unique to device, allows network to uniquely identify any device; even when a dynamic IP address is assigned using DHCP(dynamic host configuration protocol) The router assigns IP addresses based on the mac address
110
network protocol and protocol
Protocol: set of rules for data transmission and communication between hardware Network: set of rules for data transmission across a network for how computers should communicate//how data is sent/received/transmitted on a network defines standards + rules for data transmission
111
TCP/IP | internet protocol suite
set of protocols used over the internet organizes how data packets communicated,makes sure packets have: source- which computer the message came from destination- where the message should go packet sequence- the order the message data should be re-assembled data- the data of the message error check-the check to see that the message has been sent correctly -------------------------------------------------------- TCP splits data into packets, numbers them, reassembles packet and orders them at other end, resends lost messages, detects errors IP locates destination and routes the packets over the network via routers
112
Packet switching process
request split into packets each packet is given the address and a number and consists of two parts (header - IP addresses, number, total number of packets, protocols used) and payload (message itself) packets are sent across the network packets are received by the host server server checks if all packets have arrived if they have not: timeout is sent to request the packets are resent if they have: packets put in order
113
Network protocols
HTTPS (Hyper Text Transfer Protocol)-Viewing a website using a web browser. Uses secure socket layer. Encrypts data and connection itself. HTTPS (Hyper Text Transfer Protocol Secure)-Viewing a website using a web browser but Encrypts the connection FTP (File Transfer Protocol) - Used for sending or retrieving files to or from a remote server or computer. Uses a client-server model /sends from client to server, sends from server to client POP-retrieves/accesses/downloads email from a mail server removes the email from the server and transfers it to the device IMAP-Retrieves and downloads a copy of an e-mail from the server, Allows synchronisation/management of account SMTP-sends/forwards/transmits e-mail from one server to another or/and from an email client (device) to a server
114
layers (4 layer model)
a division of network functionality application layer- encodes/decodes the message in a form that is understood by the sender and the recipient. HTTP, HTTPS. SMTP, IMAP, FTP, POP transport- breaks down the message into packets. Each packet is given a packet number and total number of packets. Recipient uses this info to assemble packets together in correct order and to see if there's any missing packets. TCP, UDP network- adds the sender's IP address and that of the recipient/ The network knows where to send the message, and where it came from. DNS. IP data link - enables the transfer of packets between nodes on a network, and between one network and another. Operating system drivers and NIC, Ethernet/Wireless LAN
115
advantages of using layers to construct network protocols
splitting networking into layers means each layer is self-contained - does not need to consider what the other layers do - each layer has its own purpose and can be programmed individually allows different developers to concentrate on one aspect of a network a layer can be removed or modified without affecting other layers promotes interoperability between products from different vendors/systems individual protocols are smaller/simpler to manage different layers can interact with different hardware
116
A device not connected to a network is called
A stand-alone
117
Virtual network
Network that can securely connect Geographically unrelated computers Via the internet Virtual network servers create a network that has no direct physical connection but allows file sharing and communication Enable users at home to connect to the organisation’s data and facilities and work at home
118
Latency
How long it takes a message to travel from one device to another across a network Low latency= few transmission delays High latency- more delays, longer to transmit data
119
Transmission errors
When two devices on a network try to communicate simultaneously along the same communication channel. Their signals collide and the transmission fails.
120
Role of web client and web server
web server: Control access to a centralised resource (definition of a server) Stores content and layout data for web pages Receives+processes requests for web pages -------------------------------------------------------------------------------- web client Sends requests for web pages Sends DNS requests for IP addresses Displays the result of web requests
121
Encryption process of HTTPS
Client requests HTTPS session Certificate sent to client from the server Client creates sesshion key Encrypted session key is sent to the server Session key is decrypted with private key Session encrypted with session key
122
standard
all manufactureres/developers agreeing to follow something when working in a specific area so devices/applications are able to communicate with eachother even if created by different vendors e.g protocols. devices communicating over network must use the same protocols to allow them to understand eachother.
123
Malware
Piece of software/code/a program That replicates itself and causes damage by editing or deleting files Prevent by running anti malware software and not downloading from unknown sources or clicking on unknown links
124
Virus
malicious software embedded in a program that replicates itself and causes damage to the computer by deleting/altering files/data
125
Trojans
Programs which pretend to be legitimate but are malware. Disguised as email attachments often. Cannot spread by themselves and deceived a user into installing the program
126
Worms
Replicates themselves and become part of other programs and cause damage by deleting or modifying data. Often spread through emails.
127
Ransomware
Prevents access to your files unless a random is a paid Prevent by: anti-malware, firewall
128
Spyware/keylogger
Piece of software/code/a program That records actions/keys presses and sends this data to a third party for analysis Prevent by: running anti-spyware/malware software, firewall
129
Social engineering - people are the weak point
Person behind the weak point of the system (for example by deception) Prevent by: strong passwords, checking no validity of sources
130
Phishing
Email link directs user to fake website that collects personal data when clicked Prevent: network policy, firewall
131
Pharming
A piece of code installed that redirects user to fake website that collects personal data Prevent by: anti malware, firewall
132
Staff being the weak point
Brings in corrupted files via medium Downloading infected files from the internet Sending/sharing sensitive data with third parties —————————————————- Counter measure Not allowing/stopping external devices being used on the network Blocking/restricting access to insecure websites Blocking/restricting access to USB ports/email/internet/printing
133
Brute force attack
A program attempting all possible password combinations of characters until the correct one is obtained prevention: strong passwords: network policy, locking out after several incorrect attempts
134
Denial of service attacks
When a computer/many computers are used to prevent a server from performing its task. This is done by bombarding the server over and over again with requests. Eventually the server is tied up tying to handle all the DOS requests, making it very difficult for the server to respond to legitimate requests.
135
data interception
data transmission being read by unauthorized users/programs Where data is intercepted during transmission Done using software - packet sniffer Examines data packets as they are sent around a network/across internet and the information gathered is sent back to a hacker prevention: firewall, encryption
136
SQL injection
Where SQL code is entered as a data input. Many databases uses SQL code to interrogate the data and maintain the structure SQL code can be inputted as data which can cause errors or unintended operations
137
Penetration testing
determine how resilient a network is against an attack authorised users probe the network for potential weaknesses and attempt to exploit them Software that enables network managers to test resilience of network also available
138
Anti malware software
Prevent, detect and remove malware from the system Scans through all the files on the computer and checking them against a list database (definitions) of known malware Reactive - can only detect, prevent and remove known malware When new malware is introduced, it has to be updated. Less protection= not updated Includes anti-virus, anti-phishing tools, anti-spyware software
139
Firewalls
- protects the network by stopping unauthorised access and unwanted incoming and outgoing transmissions of packets - blocks port and monitors incoming and outgoing data packets
140
Network policies
Rules that define acceptable use E.g log in hours time and from certain computers, to ensure attempts entered in the system are likely genuine Network manager should have an acceptable use policy: - secure strong password which meets specified conditions - passwords are changed on regular basis - unauthorised equipment cannot be connected to the network EG usb sticks, smartphones, tablets - levels of access are given, allows only authorised users to access sensitive data - regular backup procedure - disaster recovery procedure - regular maintenance, software upgrades, security patches to equipment - prevent physical access to server - up-to-date anti malware software and firewalls
141
User access levels
Different levels of access, each user can only access the files they need, determines the facilities (software, mail, internet, documents and data, installing/removing software, maintaining other user’s accounts) they have access to, restriction limits the action the user can take to reduce potential threats and prevent: accidental damage, installation of software, accessing specific network drives, prevent files from being modified/deleted, making changes to system
142
Passwords
Protects user accounts, ensure only authorised people can access the network Strength set in policies to prevent brute force attack Ideal: at least 8 char, 1 uppercase, 1 number, 1 special char Not easy to guess= secure but also hard to remember
143
Encryption
Uses a algorithm to scramble up data turns text into cypher text if accessed by unauthorised user, cannot be understood. renders any intercepted data useless Keys used to encrypt and decrypt the data
144
Physical security
Not allowing physical access to a network by locking doors/key cards or any physical security procedure
145
Asymmetric encryption
Algorithm that generates two keys Public key- encrypt data Private key- decrypt data
146
Network attack forms
Active- modify/delete data on network or prevent it from operating correctly. e.g DOS Passive- monitors network to gain info External- someone outside organisation attempts to hack Internal- someone within organisation attempts to hack
147
Network forensics
Monitoring traffic on network Regular intervals- copy transmitted data packets Copy is stored for analysis, info can help identify invasive traffic or determine where data is being sent
148
System software
Software that governs the computer system, helps run computer Includes operating system, drivers and utility
149
What is an operating system
A suite of programs that managea and controls a computer. Applications software allows a user to perform tasks
150
Examples of operating systems
Windows-less secure-mainly GUI-closed source-beginners Apple IOS-secure-GUI-closed source-beginners Linux-secure- mainly CLI- open sourced- expects Android OS- less secure - GUI- open sourced- beginners Apple MacOS- secure- mainly GUI- closed sourced- for beginners
151
All operating systems have something in common
Interface that manages drivers, files and users
152
Role of operating system
``` Provide platform for software to run on Manages memory Mange’s peripherals used by system Provides interface between computer and user Determine look and feel of computer User, file management Multitasking ```
153
User interface
Programs/suite of programs that allow a user to interact with the computer
154
Examples of user interfaces
GUI Command line interface Mobile user interface
155
GUI
Graphical user interface Visual way of user interacting with computer Sometimes known as WIMP (windows, icons, menus, pointers) - easy to understand - beginners use - aesthetically nice visual - slower - takes up more memory - less flexible, does not have same level of functionality as CLI
156
Mobile UI
Easy to use | Needs a lot of processor power
157
CLI
Command line interface Using code to give instructions/interact - Complex to understand - experienced users - less appeal as it’s text - takes up less memory - greater flexibility of use
158
Multitasking
Slice of time for each programming running at a fast speed Means being able to run more than one program simultaneously Allow several programs to run side by side
159
Memory management
So more than one program can be run at the same, more than one document can be opened at the same time OS determines how much memory the program requires, and allocates enough space to hold it and it’s documents. When the program is closed, the allocated space are freed up for use by other programs. Freeing up, VM, transfer data, buffering(temporary storage area for processes to dump outputs and set aside memory so process can store temporary data. When buffer is full, processes need to wait), diffferent processes have different areas of memory so they don’t collide,
160
Peripherals and drivers
Peripherals: Output/input hardware devices connected to the computer, e,g microphone and printer ————————————————— device drivers: Computer programs that controls and operates peripherals so other programs can access the device’s functions) Contains instructions on how to control device Each connected device has its own drivers Advantages: any device can be used within the operating system as long as a driver is available for it, drivers can be updated to give better performance or to remove bugs
161
User management
Block content, admin rights, deleting creating accs, access rights to certain files or programs, set password protection Manage users. Allows individual users to be created/deleted, access levels (standard user rights and administrator rights), auditing (log of files a user creates accesses edits and deletes)
162
File management
Manage data/files File handling and maintenance E.g Place files into folders, rename folders and files, copy folders, move files, delete, search, set permissions/access rights on files, create, open, sort files
163
What does utility software do
Help for computer to maintain computer system
164
Utility software Includes
encryption software defragmentation software data compression software backup software
165
Encryption
Disguises data by using algorithm to scramble up data into cyber text So if accessed by someone other than the intended recipient, it is not understandable Keys can be used to encrypt/decrypt the data. Public key used to encrypt data The private key can be used to decrypt data.
166
Defragmentation
Files/ programs opened on hard disk are stored as series of segments. At first, segments run together in sequence. When program closed, segments are cleared up, leaving free space for next program. Over time, files become fragmented. A fragmented disk takes longer to read from/write to so makes computer run slower Defragmentation takes fragmented files and rearranged the segments so that they run contiguously. This decreases read/write time. Speeds up computer performance
167
Compression software | Lossy/lossless
Reduces the file size of files and makes smaller So less storage space used Faster transmission And to store more files Lossless will not remove data permanently Lossy is permanent deletion of unnoticeable data
168
Back up software
to prevent data loss, regular copies of data should be done full backup-all data files and software are copied(takes a significant time to back up entire system, takes up lot of storage space) incremental-only copies data that has been changed since the previous backup (less time to backup, take less memory space, needs a full backup done before incremental backups can be done)
169
What is software
The programs that run on the computer hardware
170
Application software
Help user to perform tasks
171
Auto update software (ultility)
Checks Internet for new versions of software/OS Downloads and installs without user interaction helps keep software running efficiently on new hardware, fixes bugs and adds new features.
172
firewall (ultilty)
blocks port and checks for incoming packets of data, protects a network from unauthorised access. examine ingoing and outgoing traffic, helps prevent/restrict unauthorised traffic over a network/external source.
173
anti virus/malware (ultilty)
a program/set of programs that prevent, detect, and remove malware/viruses and other malicious software
174
Diagnostic software
attempts to detect/resolve items that are not working correctly
175
system information (diagnostics)
displays important data about the current state of the computer
176
Computers in the workforce
- Improves effiency, speeds up, more confident, improve productivity - reduces labour and wage costs, lower prices for consumers + business - reduce strain on workers and reduce the need to work on repetitive and tedious environment - potential to save lives - More knowledge - Online businesss, oppourtinies for people - less people viewing the data, more secure, people are the weak point
177
Ethical issues of digital tech on wider society
- ill health, distractions, addiction - digital divide - social divide - confidential data - social pressure on parents, children, public to buy and upgrade - high cost - storing+access to personal info - rules/terms set up before people can join - consequences for misconduct e.g cyber bullying - plagiarism - communication of inappropriate materials for students/school/teacher - backing up to preserve/save data - gaining parental consent for communication online - E-safety - acceptable use policy - People lose jobs. Replaced - ethics of decisions made by algorithms, could affect people’s lives. - censorship+ pushing a certain ideology. Propaganda
178
Legal issues of digital tech on wider society
Data protection act Rules of DPA Sensitive data hacked Keeping data secure, need for firewall, anti-virus Accountability Methods of restricting access Intellectual property/copyright/liscences -Allows people to commit crimes remotely and opens up more opportunities for illegal activity
179
Cultural issues of digital tech on wider technology
Desire/need to own newest device to fit in with peers May have new features that users require for work/leisure Demand of jobs in digital tech fields Exclusively online services/businesses High dependence on computers and tech by people communication online - not real life
180
Environmental issues of digital tech on wider technology
The type of devices that are disposed of Modern phones poorly designed for durability Phones’ hardware not upgradable/replaceable e-waste shipped to third world countries with lower environmental standards -people dispose of their devices in landfill even if they are in good working order) Some equipment is also sent abroad to be disposed of Leads to excessive landfill (abroad and internal) Toxic waste released into land, ground water, air, contaminating it. Waste of resources Precious metals in phones Electricity required to power devices - using up fossil fuels + greenhouse gases + climate change
181
Digital items and physical items
``` Digital: Less/no plastic/paper/raw materials used in manufacture// no need for packaging // less waste less electrical power needed to manufacture No petrol used to distribute/collect Smaller carbon footprint Fewer dusk may need to be manufactured Fewer factory emissions //less pollution Old versions will be thrown away —————————————————— Physical items Plastic /paper are used in manufacture Increase in waste Old versions will be thrown away Uses petrol/creates emissions to distribute ```
182
Privacy issues of digital tech on wider society
Tracking of IPs/devices Social media Unwanted images and videos of people may be out online Risk of threats e.g phishing/pharming/virus -stealing/copying/transmission of private data -not all countries subjected to same privacy laws, data could be stored somewhere there
183
Legislations
Data Protection Act 1998 -control ways data of living people is stored+ processed Computer Misuse Act 1990 offence to access/modify computer material without permission Copyright, Designs and Patents Act 1988- covers the copying/use of other people’s work Regulation of Investigatory Powers Act 2000- regulates surveillance and investigation, and covers the interception of communications Freedom of Information Act 2000 -allows public access to data held by public services (e.g the council) unless data is sensitive/too costly/time consuming
184
Data protection act
Data is collected/exchanged/processed fairly and lawfully Using data only for its specific lawful purpose Collecting only adequate, relevant, needed and not excessive data Data of customer must be accurate and up to date Data should not be kept longer than necessary for its purpose. Once warranty expires, data should be rid of. Data should be processed with accordance of people’s rights and consent. Rights to request a copy of data/prevent marketing/correct data held about them/right to be forgotten. Data should be stored securely and safely. Security measures, protection and legal obligation. Data should not be transferred outside of EEA (countries in European Economic Area)
185
Computer misuse act 1990
No unauthorised access to data No illegal activity with the unauthorised accessed data or the intent to No unauthorised modification/deletion of data
186
Copyright, designs and patents act 1988
Give creator’s exclusive rights and ownership over their work and they can determine who’s allowed to use it, how it’s distributed/published/sold. Licence- copyright holder can grant permission for creation to be used
187
Creative Commons licence
-Allows free distribution -Can choose to restrict use/edit/share/distribution/copying/displaying of original -Work is still copyrighted/others cannot claim it as their own Different types: -No-derivative: can set that if others edit it, they cannot redistribute it with the edits -Attribution: having original creator’s name on it if re-used//referencing/must be credited) -Non-commercial use:others cannot sell/profit from the work //personal use only
188
Different types of Creative Commons licenses
Attribution - copyright owner must be given credit Non-commercial- no profit can be made No derivative works - cannot be modified Share-alike - must be under identical licence as original
189
Software licenses (open source and proprietary)
Open source The source code is distributed with the software Can adapt it/add features to the program The customer can redistribute the source code (with the same licence/restrictions) Free of charge ———————————————————- Closed source - proprietary Source code not made available Only compiled code is published Licence restricts the copying/modifying /distribution of the software Can charge customers to earn a profit Can restrict what users can do Protects/copyrights her source code so it can’t be copied/modified/redistributed
190
Abstraction 5
only focusing on details important to problem trying to be solved. unnecessary details are left out - simplify problem, reduce complexity - more efficient and quicker - save storage space and less resource intensive - reduce time taken to program, less developing time - key info focused on so makes product better
191
Decomposition
breaking down larger complex problems into smaller sub problems - easier to solve as smaller - can be created independent of other problems, tested independently, combine to produce full problem - can reuse in other problems
192
Algorithmic thinking
- getting to a solution - by identifying the steps needed - break complex problem into manageable small problems - designing simple steps to solve each
193
Advantages of pseudocode
- tool for algorithmic thinking, enables programmers to design/describe algorithm syntax independent (does not matter if syntax errors) - convenient way of designing algorithms to aid thinking logically as easy to understand and changes to design can be done easily
194
Trace tables
- see sequence of which program executes at to understand how it works - used in testing code to see how variable value changes as code executes to identify logic errors
195
Linear search
No need to be ordered,easier to program, less efficient Starts at the beginning of the data set and each item is inspected in sequence until a match is made If item found, search ends. Else, next element inspected until all items have been searched. If nothing found by end of algorithm, then false is returned
196
Binary search
Sorted list only, More efficient, harder to program, resource heavy of memory use, faster as half of data set is discarded after single check -Checks position of middle, sees if it’s the object being searched for -if not, discards data set of the irrelevant side (list size halved). Goes to new midpoint and process repeats. Uses divide and conquer. If item not in list, item displayed as not found
197
Bubble sort
Easy to implement, inefficient, for small data sets Sorts and orders list of items Starts at beginning of list. Compared item to next item. Swaps if out of order. Algorithm finishes when no more swaps need to be made When first pass is completed, can be sure that largest item is at end of the list.
198
Merge sort
Harder to code, more efficient, can work on multiple lists at same time. large data sets. Creates two/more identical sub problems from largest problem, solves them individually, constant running time Divide and conquer. Data set is repeatedly split in half until each item is in its own list individually. Adjacent lists are compared, sorted into order and then merged back together which repeats, ultimately recompiled into a sorted list.
199
Flow chart
- Displays an algorithm in diagram form - using symbols and arrows - to show the flow of information - show step by step solution to problem
200
Pseudo code
Structured use of English | used to define steps needed to solve a problem
201
Insertion sort
More efficient+harder to code than bubble sort, less than merge sort. Work best with smaller data sets Second value in list gets compared to value to its left. If value greater than left, no changes made. Wall to sort sorted and unsorted side. Values are compared in turn and get compared to sorted side. Value repeatedly moved left until meets a sorted value that is less than it. Repeats until end of list reached.
202
Algorithm
A set of instructions for solving a problem or completing a task
203
Structure diagram/design
Decomposition of problem into sub problems easier to change/write/test/maintain solution reached faster less prone to errors during development multiple programmers can work on program at same time
204
Bubble sort flag
Flag=false/true If there is a swap during the pass then flag changes = hasn’t been fully sorted Flag stores whether any swaps had been needed in the pass It’s a variable which stores a Boolean
205
Flowchart symbols functions
``` Process=action Subroutine=calls a subroutine Terminal=start/end of process Decision=true/false Line= represents flow of one component to the next ```
206
Bubble sort worst case scenario
Max passes of worst case scenario = n-1
207
Disadvantages of pseudo code
- hard to see how program flows | - time consuming to produce
208
Flow chart advantages and disadvantages
-easy to see how program flows -follows an international standard so it promotes interoperability. Easy for any flow diagram user to pick up a diagram and understand it ————————————————— -diagrams can become huge and difficult to follow with a large program -any changes to the design may mean a lot of the diagram has to be redrawn
209
the 3 programming constructs/logic structures
selection iteration sequence
210
what are programming constructs/logic structures used for?
they control the flow of a program
211
Nesting
When one programming construct is included within another -Reduces amount of code needed -Simpler to debug and edit E.g selection nested within condition controlled loop iteration
212
Nesting examples
Nested selection : Number of possible paths at decision point can be increased by including one selection within another Nested iteration: two count controlled loops (one within another)
213
Selection
Section of code is only ran if it meets a condition which determines which path running program takes Results of decision decided which path the program takes next
214
Sequence
The order of which statements are executed- statements are executed one after another from top to bottom Important as carrying out instructions in wrong order leads to program performing incorrectly
215
Iteration
Repetition of a execution of a section of code when the program is running - Simplifies program, fewer lines of code,less error prone - more flexible, can just change loop value to change number of iterations
216
Two types of iteration
Count-controlled iteration: repeatedly executed section of code a fixed number of predetermined times Condition- controlled iteration: repeatedly executed a section of code until condition is met
217
DIV and MOD
DIV gives the whole number // | MOD gives the remainder %
218
Data type
Integer Real Boolean String/character
219
Where might casting be useful for
convert data type of variable to another e.g for calculations, displaying ints and floats cant be concatenated numbers held in strings cant be used in mathematical operations
220
Concatenation and manipulation of strings
``` concatenation=joining strings together e.g word=sentence+"Computer" --------------------------------------------------------------------------------------- manipulation of strings topic=topic.lower topic=topic.upper sentence="NadiaIsABean" sentence[2] would give the output "d" sentence[0,3] would give out "Nad" sentence[2,3] would give out "dia" len(sentence) would give out 12 ```
221
Variable and constant
Variable- named storage location that holds a value that changes Constant- named storage location that holds a value that doesn’t change
222
Subroutines | Small section of code that performs a specific task, can be called whenever needed
- Breaks down problem/program - Structures program - Makes easier to maintain/design/create/test/read/debug as shorter - Reuse code (in different programs) -quicker to develop new programs - Build on existing work/use library of subroutines - Avoid repetition of code in the same program - Makes program shorter/smaller - Subroutine called instead of copying and pasting - Errors will not have been copied to other areas of the program - split up into a team to suit developer skill set to work on different sub program at the same time, develop/test separately - Allows for abstraction, remove complexity - Can be by programmers who do not need to understand how they work
223
Procedures and functions
Function - returns a value | Procedure- doesn’t return a value
224
SQL Structured queried language Used for interrogating a database
SELECT (variable) FROM (table) WHERE (criteria) * is the wildcard that stands for “all”/shows all fields from a table If selecting multiple then it would be separated by comma E.g SELECT ItemName, Phone
225
File appending
file=open(“filename.txt”) file. write(“what you want to write to file”) file. close()
226
2D arrays append
arrayname. append (item) | arrayname. delete (item)
227
File printing
file=open("filename.txt") print ( file.read()) file.close()
228
File search (first 8 characters of each line of file)
``` search=input("What are you looking for") file=open("filename.txt") for line in file: if line[0:8] ==search: print("item found") print("search finished") file.close() ```
229
global variable
can be accessed/changed throughout program | programmer has to declare the variable is a global
230
Database
Persistent organised data store of related data to make it easier to search for info
231
Maintainability
Making sure code is easily readable and understandable so its easier to look after, update, develop over time allow other programmers to understand code through comments, indentation, constants, modularising, sensible variable names
232
Purpose of defensive design
- anticipating every possible way user could misuse system/device - methods placed to eliminate/minimise misuse - so program continues to run correctly no matter the actions of the user -protection against unexpected user inputs/actions, maintainbility, minimising/removing bugs
233
Input sanitisation
cleaning up unwanted input data like removing suspicious or special characters to prevent SQL injection (code inputting that allows someone into a system)
234
Verification
checking data has been entered correctly double entry visual check
235
what is visual check
double checking data input by looking at it proof-reading/data is compared to source document compared by human if discrepancy is found, data is re-entered e.g looking over a CV before sending it
236
what is double-entry
data is entered twice to check both sets of data match up compared by computer, human if a discrepancy is found, the data entry operator is asked to re-enter data e.g please enter password: NADIAISABEAN confirm password: NADIAISABEAN
237
Aunthentication
ensuring only allowed/authorised users can gain access to the system usernames/passwords, fingerprint, iris, physical authenication, email authentication, capture, two-factor authenication
238
Validation
Checking whether data is allowed and follows criteria cannot ensure that it's a wrong value, only ensures data is reasonable e.g birthday date jan 1 2000
239
Check digit
Uses additional digit - check other data correct Mathematical algorithm - calculate value from other data and value is compared to check digit to check that tracking code has been entered correctly Why is a check digit used? Used to ensure a range of numbers have been entered correctly. Detects errors on identification numbers.
240
Format check
checks data is in the right format
241
Length check
checks the data isn't too short or too long by checking how many characters there are
242
Lookup table
Looks up acceptable values in a table
243
Presence check
checks data has been entered into a field
244
Range check
checks a value falls within a specified range
245
Comments
- to explain the key functions/sections - inform of any errors/issues - stop line of code from executing
246
Indentation
to show where constructs/sections start and end | e.g indenting in IF statement/loops
247
Naming variables sensibly
to enable programmers to understand the purpose of each variable
248
Using constants
so specific data isnt changed | and so numbers can be updated easily
249
purpose of testing
- finding errors so they can be fixed before use so program works as intended+does not crash - ensuring end results meet user requirements - making sure there are no problems when released so system gains user/customer confidence
250
iterative testing
testing during the development of code
251
final/terminal development
testing after the majority of development has been completed/ testing before release
252
describe the difference between iterative testing and final testing
iterative testing is testing during the development /repeatedly testing after/while making changes final testing is done after iterative testing/when development is almost complete
253
What is a error
causes the program to run incorrectly | logic, syntax or runtime
254
Logic error
contains an error but still runs/ doesnt crash an error that results in the incorrect output/unexpected result
255
Syntax error
error that breaks the rules of the programming language | will not execute
256
Runtime error
error that occurs when program/code runs and causes program to crash usually because of running out of memory
257
Test data types
normal- data program expects and accepted boundary- correct type of valid data on boundary (on the maximum or minimum range value) that should be accepted invalid-data program expects but beyond the accepted range so should be rejected erroneous data- data the program doesn't expect and should be rejected by computer system
258
Testing tables
- to find errors in the code - see if program outputs expected outcome - Tests normal, invalid, erroneous, boundary data
259
Basic authentication
make a request for a webpage by typing in URL Server responds with an error, requesting authentication details encoded in request Again the server checks the details and sends the page request or another error
260
Why data is represented in computer systems in binary form
Binary is representation of presence of electricity On=1=present Off=0=absent
261
Logic gates
Logic gates take inputs and covert them to an output | Digit 0 or 1 is stored in transistors in processor
262
Boolean operators
AND- conjunction OR- Disjunction NOT- Negation
263
An interpreter
translates code line by line | every time program is ran
264
A compiler
translates code in one go all at once
265
interpreter advantages
stops when error is found- can be used for debugging portable (only need source code and interpreter on any device to run) execution control less memory as instructions are executed as soon as they are translated and are not stored for later use
266
Compiler advantages
- creates executionable file that can be distributed - executional file executes very fast - once compiled, doesnt need to be compiled again - executionable file is in machine code, end user cannot see source code so cannot steal/modify code
267
interpreter disadvantages
- slower than the executionable file that compilers create - runs slower as processor has to wait for each instruction to be translated before it can be executed - source code and intepreter required to run - users can see source code and steal it - code is not optimised
268
Compiler disadvantages
- long compiling time - if there is a error, would need to fix the error and compile it all again as compiler only reports error at the end. - harder to test - if its stopped during the compiling time, have to restart it again
269
High level language 7
close to natural human language English-like structure and syntax needs to be translated before it can be ran easily understood/program/learn portable to different systems one high level command equates to many machine code instructions programmer can focus on problem instead of considering underlying hardware
270
Low level language 9
assembly code machine-specific Opcode and operand uses mnemonics (abbreviation of code) 1 assembly code translates to 1 machine code needs to be translated before it can be ran used in device drivers when fast execution is required can be used when there is limited memory space Harder to understand/program/learn
271
machine code 6
``` binary instructions Code for CPU to execute difficult for humans to understand has opcode (actual instruction) and operand (value instruction uses/manipulates) does not need to be translated not portable to systems ```
272
translators
Convert source code to machine(binary) enable code to be executed processer can understand/run only binary
273
Assembler
A program that translates assembly code (low level) into machine code
274
IDE
Integrated development environment | Includes: editors, error diagnostics, run-time environment, translator
275
Editor
To enable programmer to write source code to entered/edited
276
Run time environment
To enable to the program to be run | Check for run-time errors/test the program
277
Error diagnostics/debugging
To display information about errors (syntax/run-time) location of errors
278
Debugging tools
Syntax completion- suggests/corrects code - quicker to type/less errors Keyword highlighting/colour coding keywords/pretty printing- colour commands/variables - easier to read/identify errors Breakpoints- to stop/pause program execution at a specific point - easier to identify/correct logic errors Stepping- to execute program line by line - easier to identify/correct logic errors
279
Units
``` Bit (0 or 1) Nibble (4 bits) Byte (8 bits) Kilobyte (1,000 bytes or 1KB) Megabyte (1,000 KB) Gigabyte (1,000 KB) Terabyte (1,000 GB) Petabyte (1,000 TB) ```
280
What is meant by a bit
the smallest representation of data, 1 or 0. Single binary digit
281
How data needs to be converted into a binary format to be processed by a computer
Computers consists of transistors/switches/logic circuits/ gates which only have two values/ on or off/1 or 0/ open or closed Circuit only needs to check for two states/ uses switches electricity flowing or not flowing/on or off/1 and 0
282
Computers consist of
Binary numbers, 1 or 0 The circuit only needs to check for the states 1 or 0 Only understands binary
283
What is a overflow error
When we add or shift a number and it becomes too big for the register , number can’t fit into 8 bits and is greater than 11111111 and there is a extra carry/bit loss of accuracy
284
Hexadecimal
One hexadecimal is equal to one nibble made up of 4 bits per hex digit used in: defining colours in graphics software, represent MAC addresses , displays address, for checksums
285
Advantages of hexadecimal
Why do people use hexadecimals to represent numbers stored in computers Straightforward/easier to convert to binary as each hexadecimal digit is a nibble in binary Shorter number to remember than binary Quicker to enter Less susceptible to errors Easier to work with than binary
286
Binary shifts
Shift to right of binary, if u convert to denary you’ll see it has been divided by 2 Shift to left, multiply by 2
287
Character set
The range of characters (symbols, numbers, letters) that can be represented by a computer with each character having a binary value that computer understands/uses.
288
What is used to represent characters
Binary Each character is assigned a unique character code. Each letter is converted to its character code (binary number)
289
Character set examples
ASCII: 7 bits, 128 characters Extended ASCII: 8 bits, 256, more characters it can represent and European symbols and other languages Unicode: 16 bits or up to 32 bits. Encodes set characters. All languages
290
What does ASCII stand for?
American Standard Code for Information Interchange 7 bit character system codes character set computer uses uses code to represent characters, symbols, numbers
291
Why would Unicode be used
To use other special characters found in different languages
292
A image is made up of
pixels which are the smallest element in a image and have a binary value to them which represents a colour The binary numbers are stored in order in the file
293
Bitmap image
Based on pixels Each have binary value That represents a colour
294
Vector image
Based on mathematical algorithms
295
Colour depth
Amounts of bits stored per pixel How many colours that can be represented The bigger the colour depth=The higher the accuracy, more colours can be represented. But higher file size
296
Resolution
Dimensions of image | Number of pixels per inch of screen
297
Increasing resolution
Only increases quality if screen is bigger Smaller images on big screens, image is stretched and lowers quality Otherwise, increasing resolution= decreases battery life /larger file size as more pixels-more data needed to be stored
298
How does reducing the number of colours in a image can reduce its file size
Colour depth decrease Fewer bits needed per colours As less colours are represented Which means fewer bits per pixel Opposite: more colours, more bits required for each pixel E.g two bits per pixel (00 to 11) - four possible colours
299
Meta data
Background information (data) of a file Why is metadata included in a file? A computer needs to know the size of the image in terms of height, width, and colour depth in bits per pixel (bpp) Allows the computer to recreate the image from binary
300
How sound is sampled and stored in digital form
Amplitude of waveform measured. Converted into binary | At regular intervals
301
Sample frequency
Number of samples taken per second
302
Bit rate
Amount of data per second | Sample frequency x bit depth
303
Bit depth for audio
Number of bits taken per sample
304
Larger sample frequency and bit depth
Better quality Higher file size More bit depth- more sound/ data captured More sample frequency- less time gap between each sample Sound reproduced is closer to original
305
The need for compression
The need for compression - Quicker upload/download/load/transfer time - Less storage space taken up - less mobile data/bandwidth usage
306
Lossless compession
``` Uses algorithm to compress file No data is lost (data lost is only temporary, comes back when file is uncompressed) Reduces file size less than lossy Better quality Suit for text and code as no data lost ```
307
Lossy compression
Permanent loss of data Cannot return to its original condition/not identical to original as data removed Reduces file size more/significantly Loss of quality more Unlikely to be noticed by humans For unnoticeable data / end users unlikely to notice the removal of data E.g images, videos, sound Where loss of quality is an acceptable trade off for smaller files Cannot be used for text/code, makes unreadable /unable to execute code
308
giveChange( money-price) | state how many parameters are passed into the giveChange() subrountine
1
309
when recalling subroutines in flow charts, can use subroutine shape
e.g vendItem() giveChange(money-price)
310
state what is meant by the term image resolution?
number of total pixels (in an image) | image height and image width (of an image)
311
calculate the fewest number of bits that could be used to store the logo as a bitmap image. you must show your working
pixel width x pixel height x colour depth (bit per pixel)
312
give two ways that the file size of a image could be reduced
reduce number of pixels/resolution reduce number of colours use lossy compression use lossless compression
313
opening, writing to and closing a file -pseudocode
file= openWrite("file name.txt") file.write(variable) file.close()
314
name="Dru" | describe how a character set is used to represent the string value stored in the variable name
each character (in character set) has a unique (binary) number/value each character in the string/is assigned its associated number/value the binary value of each character is stored/.combined (in order) by example e.g/ The binary value for D, then for r, then for u Uses ASCII/Extended ASCII/Unicode
315
when to use a Real
Returned value may not be a whole number/may have a decimal point in
316
give reasons why computer scientists se hexademical to represent numbers instead of binary (mark scheme)
easier/quicker to communicate/enter/write/read/remember less change of input errors/easier to spot errors they are smaller/shorter easy to convert between binary and hexadecimal
317
modularising is
subroutines