GSCE Computer Science Flashcards
why do we need primary storage
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
difference between RAM and ROM
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
virtual memory
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
Virtual memory disadvantage
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
What is secondary storage
long term non-volatile storage of data/files
not constantly connected to computer and devices
isn’t directly accessible by CPU
Why is secondary storage needed
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
what are the types of secondary storage
optical
magnetic
solid state
optical storage
- 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
magnetic storage
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
Solid state storage
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
Properties you should consider when deciding on type of storage to use
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 does optical storage work?
Laser light creates marks in a pattern on a disc
laser light detects where marks are and translates it into readable format
Optical storage capacity
CVD rom- up to 720mb
DVD- up to 8.4 gb
Blu ray- up to 50gb
How does magnetic storage work?
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 do solid state storage work?
made of microchips (switches)
state of switches determine if 1 or 0 is stored
Optical storage examples
Magnetic storage examples
Solid state examples
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
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)
What is meant by a bit
the smallest representation of data, 1 or 0. Single binary digit
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
Computers consist of
Binary numbers, 1 or 0
The circuit only needs to check for the states 1 or 0
Only understands binary
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
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
Advantages of hexadecimal
Why do people use hexadecimals to represent numbers stored in computers
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
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
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.
What is used to represent characters
Each character is assigned a unique character code (binary value)
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
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
Why would Unicode be used
To use other special characters found in different languages
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
Bitmap image
Based on pixels
Each have binary value
That represents a colour
Vector image
Based on mathematical algorithms
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
Resolution
Number of pixels per inch of screen
For image: size of image. number of total pixels (image width x image height)
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
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
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
How sound is sampled and stored in digital form
Amplitude of waveform measured
Converted into binary
At regular intervals
Sample frequency
Number of samples taken per second
Bit rate
How much data is being processed per sec
Sample frequency x bit depth x channels
Bit depth (audio)
Number of bits taken per sample
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
The need for compression
- Quicker upload/download/load/transfer time
- Less storage space taken up
- less mobile data/bandwidth usage
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
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
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
How to calculate number of bits
pixel width x pixel height x colour depth (bit per pixel)
Examples of sound files and video files
sound= FLAC, MP3, WAV video= MOV, MP4, AVI
ALU (Arithmetic Logic Unit)
Performs logical and arithmetic operations (calculations and logical comparisons)
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)
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.
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.
Registers are
small fast memory storage with a set purpose
Accumulator, MAR, MDR, Program counter
Memory address register (MAR)
Stores address of
data that will be read/written/accessed/fetched/being processed/next to be processed
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
Program counter
Increments by 1
holds the address of the next instruction to be executed and copies it to MAR
Accumulator
Stores result of ALU
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
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
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
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
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
Embedded system
computer system built into another device.
embedded system examples
Microwave, washing machine, dishwasher, oven, MP3 player, digital clock, calculator, coffee maker.
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
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
What does the CPU do
Processes data and instructions
FDE cycle
Controls computer system
Software and hardware
Hardware - physical components of computer
e.g CPU, hard disk, monitor, keyboard, mouse
Software- programs that run on computer
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
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
network
set of connected computers and other devices in order to share resources
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
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
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
similarities of WAN and LAN
allow devices to communciate with eachother
allow for shared periperhals
allow for remote maintenance
Speed of a network
Bit per sec (bps) E.g Kbps Mbps Gbps
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
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
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
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
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
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.
The hardware needed to connect stand-alone computers into a local area network
Routers Switches Wireless access points Network interface card Transmission media
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
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
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)
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
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
internet
Inter-networking
giant mesh WAN
Worldwide collection of computer networks connected together
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
Hosting
Website is placed on web server - known as hosting and a suitable domain name selected
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
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
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
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
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
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
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
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
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
Wired
Ethernet/fibre optic/coaxial cables to form connections between nodes(networked devices)
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
A device not connected to a network is called
A stand-alone
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
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
Transmission errors
When two devices on a network try to communicate simultaneously along the same communication channel. Their signals collide and the transmission fails.
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
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
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.
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
Virus
malicious software embedded in a program that replicates itself and causes damage to the computer by deleting/altering files/data
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
Worms
Replicates themselves and become part of other programs and cause damage by deleting or modifying data. Often spread through emails.
Ransomware
Prevents access to your files unless a random is a paid
Prevent by: anti-malware, firewall
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
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
Phishing
Email link directs user to fake website that collects personal data when clicked
Prevent: network policy, firewall
Pharming
A piece of code installed that redirects user to fake website that collects personal data
Prevent by: anti malware, firewall
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
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
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.
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
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
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
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
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
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
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
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
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
Physical security
Not allowing physical access to a network by locking doors/key cards or any physical security procedure
Asymmetric encryption
Algorithm that generates two keys
Public key- encrypt data
Private key- decrypt data
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
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
System software
Software that governs the computer system, helps run computer
Includes operating system, drivers and utility
What is an operating system
A suite of programs that managea and controls a computer. Applications software allows a user to perform tasks
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
All operating systems have something in common
Interface that manages drivers, files and users
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
User interface
Programs/suite of programs that allow a user to interact with the computer
Examples of user interfaces
GUI
Command line interface
Mobile user interface
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
Mobile UI
Easy to use
Needs a lot of processor power
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
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
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,
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
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)
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
What does utility software do
Help for computer to maintain computer system
Utility software Includes
encryption software
defragmentation software
data compression software
backup software
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.
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
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
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)
What is software
The programs that run on the computer hardware
Application software
Help user to perform tasks
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.
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.
anti virus/malware (ultilty)
a program/set of programs that prevent, detect, and remove malware/viruses and other malicious software
Diagnostic software
attempts to detect/resolve items that are not working correctly
system information (diagnostics)
displays important data about the current state of the computer
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
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
Algorithmic thinking
- getting to a solution
- by identifying the steps needed
- break complex problem into manageable small problems
- designing simple steps to solve each
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
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
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
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
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.
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.
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
Pseudo code
Structured use of English
used to define steps needed to solve a problem
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.
Algorithm
A set of instructions for solving a problem or completing a task
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
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
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
Bubble sort worst case scenario
Max passes of worst case scenario = n-1
Disadvantages of pseudo code
- hard to see how program flows
- time consuming to produce
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
the 3 programming constructs/logic structures
selection
iteration
sequence
what are programming constructs/logic structures used for?
they control the flow of a program
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
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)
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
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
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
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
DIV and MOD
DIV gives the whole number //
MOD gives the remainder %
Data type
Integer
Real
Boolean
String/character
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
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
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
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
Procedures and functions
Function - returns a value
Procedure- doesn’t return a value
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
File appending
file=open(“filename.txt”)
file. write(“what you want to write to file”)
file. close()
2D arrays append
arrayname. append (item)
arrayname. delete (item)
File printing
file=open(“filename.txt”)
print ( file.read())
file.close()
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()
global variable
can be accessed/changed throughout program
programmer has to declare the variable is a global
Database
Persistent organised data store of related data to make it easier to search for info
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
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
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)
Verification
checking data has been entered correctly
double entry
visual check
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
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
Aunthentication
ensuring only allowed/authorised users can gain access to the system
usernames/passwords, fingerprint, iris, physical authenication, email authentication, capture, two-factor authenication
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
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.
Format check
checks data is in the right format
Length check
checks the data isn’t too short or too long by checking how many characters there are
Lookup table
Looks up acceptable values in a table
Presence check
checks data has been entered into a field
Range check
checks a value falls within a specified range
Comments
- to explain the key functions/sections
- inform of any errors/issues
- stop line of code from executing
Indentation
to show where constructs/sections start and end
e.g indenting in IF statement/loops
Naming variables sensibly
to enable programmers to understand the purpose of each variable
Using constants
so specific data isnt changed
and so numbers can be updated easily
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
iterative testing
testing during the development of code
final/terminal development
testing after the majority of development has been completed/ testing before release
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
What is a error
causes the program to run incorrectly
logic, syntax or runtime
Logic error
contains an error
but still runs/ doesnt crash
an error that results in the incorrect output/unexpected result
Syntax error
error that breaks the rules of the programming language
will not execute
Runtime error
error that occurs when program/code runs and causes program to crash
usually because of running out of memory
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
Testing tables
- to find errors in the code
- see if program outputs expected outcome
- Tests normal, invalid, erroneous, boundary data
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
Why data is represented in computer systems in binary form
Binary is representation of presence of electricity
On=1=present
Off=0=absent
Logic gates
Logic gates take inputs and covert them to an output
Digit 0 or 1 is stored in transistors in processor
Boolean operators
AND- conjunction
OR- Disjunction
NOT- Negation
An interpreter
translates code line by line
every time program is ran
A compiler
translates code in one go all at once
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
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
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
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
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
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
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
translators
Convert source code to machine(binary)
enable code to be executed
processer can understand/run only binary
Assembler
A program that translates assembly code (low level) into machine code
IDE
Integrated development environment
Includes: editors, error diagnostics, run-time environment, translator
Editor
To enable programmer to write source code to entered/edited
Run time environment
To enable to the program to be run
Check for run-time errors/test the program
Error diagnostics/debugging
To display information about errors (syntax/run-time) location of errors
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
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)
What is meant by a bit
the smallest representation of data, 1 or 0. Single binary digit
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
Computers consist of
Binary numbers, 1 or 0
The circuit only needs to check for the states 1 or 0
Only understands binary
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
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
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
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
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.
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)
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
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
Why would Unicode be used
To use other special characters found in different languages
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
Bitmap image
Based on pixels
Each have binary value
That represents a colour
Vector image
Based on mathematical algorithms
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
Resolution
Dimensions of image
Number of pixels per inch of screen
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
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
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
How sound is sampled and stored in digital form
Amplitude of waveform measured. Converted into binary
At regular intervals
Sample frequency
Number of samples taken per second
Bit rate
Amount of data per second
Sample frequency x bit depth
Bit depth for audio
Number of bits taken per sample
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
The need for compression
The need for compression
- Quicker upload/download/load/transfer time
- Less storage space taken up
- less mobile data/bandwidth usage
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
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
giveChange( money-price)
state how many parameters are passed into the giveChange() subrountine
1
when recalling subroutines in flow charts, can use subroutine shape
e.g
vendItem()
giveChange(money-price)
state what is meant by the term image resolution?
number of total pixels (in an image)
image height and image width (of an image)
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)
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
opening, writing to and closing a file -pseudocode
file=
openWrite(“file name.txt”)
file.write(variable)
file.close()
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
when to use a Real
Returned value may not be a whole number/may have a decimal point in
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
modularising is
subroutines