Cs Term 2-3 Notes
Cs Term 2-3 Notes
CHAPTER 1 :
Binary:
a type of data representation number system that consists of 1s and 0s for ons and off .
Computers consist of millions of on and off switches so binary represent that.
1=on 0=off
Denary:
a base 10 number system that has numbers 0-9 that has many combinations .
They are normal numbers
Hexadecimal system :
a base 16 number system that is close to denary and had 16 digits .
0-9 and A-F . In total 16 it is much more easier to represent larger numbers in hex .
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻— Conversions:
Binary to denary :
You use a table with numbers 1 2 4 8 16 , etc and add all the numbers that have 1 below
them .
Denary to binary :
Take your number and find which numbers from 1 2 4 8 16 , etc add up to it .
Put a 1 under those numbers and a 0 under number you are not using.
Or you can divide your number till 0 and your remainders will be the binary write in
reverse order from bottom to top
Binary to hexadecimal:
Split your binary number into groups of 4 digits .
If it is not 4 or a multiple of 4 , add 0s to it .
Convert those 4 binary into denary .
Then convert those denary into hex by the 0-9 and A-F
Hex to denary :
Take your digits and separately multiply them by the powers of 16
ACwill be = 12 x 16 to power of 0 + 10 x 16 to the power of 1
Add all the denary numbers after multiplying.
Denary to hex :
You can either convert denary to binary and then to hex or divide by 16 till you get 0 and
your remainders will be your hex .
Write in opposite order .
⸻⸻⸻⸻⸻⸻⸻
Use of hex :
error codes ,
MAC addresses ,
IPv6 addresses ,
HTML colour codes
Error codes : codes that show the location of the error in a code and is shown in hex .
Used in windows
MAC address :
media access control is a hex number that uniquely identifies a device on a network .
A device can be identified through it .
Made up of 48 bits and has 6 groups of 2 hexadecimal digits .
First half is the identity of the manufacturer and
second half is the serial number of device
IP address : internet protocol address is a address given to a device using hex or denary .
IPv4 is 32 bit but IPv6 is now 128 bit Ipv4 uses a decimal point
Ipv6 uses colon
Lowercase letters are used
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
Addition of binary numbers :
Carry forward ones when adding like 1+1 will be 0 carry forward 1 to the next digit or
you can convert numbers to denary , add denary and convert back to binary
Binary overflow:
Sometimes when you add binary numbers they carry on and exceed the number of bits
being added and the sum is too big .
This results in a binary overflow error. When the amount of bits exceeds the bit capacity .
Left=multiply by 2 Right=divide by 2
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
TEXT SOUND AND IMAGES:
ascii :
american standard code for information interchange .
Used in computer systems for information interchange
7 bit character set which is 0 to 127 .
It represented letters , numbers and characters found on a standard keyboard .
Also had control characters .
Extended Ascii :
it used an 8 bit codes which is 0-255 characters possible .
It has much more storage than ascii .
more symbols and a few other languages and a few more graphical characters.
Limitations of ascii :
It did not represent characters in non western languages eg chinese/arabic Softwares used
different characters that were not present in ascii .
Was not international and had only 7-8 bits
Unicode : a newer coding system that had was much better than ascii or extended ascii
Had 16 bits and reached all international languages with 65356 characters
Could represent many more graphical symbols for developers and translators for software
.
Known as the most complete set of characters .
Can go up to 32 bit and adapted more .
Helped with assigning codes to their own character like chinese Had emojis and modern
symbols
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
Representation of sound :
Sound-waves : vibrations in the air that humans can hear and interpret as sound .
Analogue sound :
sound waves in the air vary continuously and have curves that can only be interpreted by
human ears .
Computers cant work and store this type of sound
Digital sound :
a sound type that is compatible with computers and can be processed . Have points and
straight lines .and have regular time intervals
Sampling resolution :
This is measured in bits and shows how high or low the sound can go .
The higher the resolution , the higher or lower a sound can go. This means better range
and dynamic quality.
7 bit sound resolution can have up to 128 levels of amplitude compared to 1 which has
only 2 levels
Also known as bit depth
Sampling rate: how frequently the amplitude of a sound is sampled and measured
It is measured in hertz (hz)
One hertz means one sample per second .
The more hz , the more frequently the sound will be recorded and more detail to all the
variations will occur .
It has to be sampled at regular time intervals and the sample of the sound wave is
encoded into binary
Good=Better quality , higher and lower , less sound distortion , better effects More
similar to original sound , more details of amplitude variation
Bad=larger file size , longer to transmit and download , requires greater processing power
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻— REPRESENTATION OF BITMAP IMAGES :
Bitmap images :
images made up of pixels and a matrix of pixels .collection of bits , bitmap images have
tiny pixels . It has a matrix of individual dots . They all have their colors . Is a grid of
pixels .
When zooming in , it losses quality and pixels stretch into larger blocks .
Pixels :
known as picture element , each pixel has a binary number .
It has 2 factors. Its mixtures of colors rgb and its position in the bitmap matrix
Colour depth :
each pixel color is assigned a binary code .
If a picture needs more colors , more codes will be needed and more bits .
A black and white image needs one bit since it can only have 1 and 0 .
Others might need 8 bit which is 256 colors.
This increases file size
Modern computers have 24 bits which is 16 million colors
Image resolution : the number of pixels that make up an image . The more pixels means
more detail in the image . It is the length and breadth multiplied to find the amount of
pixel
Image resolution 3 x 3 will have 9 pixels but a resolution of 4096 x 3072 will have 12
million pixels
Drawbacks of pixel resolution : increases file size , processor requirement , download
times , loss of detail when sent to lower capacity computers ,
less storage for other images .
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻— DATA STORAGE AND COMPRESSION :
Common lossy algorithms : MPEG-3 (MP3) and MPEG-4 (MP4) and JPEG
For images we in black and white we can see the pixels row by row and show them as
black and white . Instead of 0000100000 we can write 4A 1B 5A in which a is 0 and b is
1
For images with color you can use values for rgb and mix and match it and also how
many times it is repeated in a row .
Data packets : when data is sent over long distances it is broken into data packets . It is
quite small and is easier to control than a huge stream of data
. Each packet can be sent on a different rout to its destination
.
Benefits of data packets : info can be sent much better through smaller bits and
transmission routes will not be overloaded or very busy .
Drawbacks of packets : you will have to reassemble the data from each packet and this
can result in many errors
Packet structure :
A packet consists of a packet header , the payload and a trailer
Packet header :
the header consists of the IP address of sending and receiving device Sequence number of
packet so all packets can be assembled in order Packet size
Payload : the middle segment that consists of the actual data in 64 KiB
Packet trailer :
includes some way of identifying the packet so they can be separated and reassembled .
An error checking method that can compare original vs sent data to see if there are any
errors .
Router : when data packets are separated and sent through different routes , each stage in
a route needs a router .
A router receives a data packet and decides where to send it based on the info
Packet switching :
a method of data transmission where a message is broken into many packets .
Each packet is sent separately from start to end point . At the end , packets need to be
reassembled in the correct order using info sent by header .
Nodes : they contain a router and they are in the network between computer a and b , they
decide the best route for the packet for its destination .
Hopping :
when packets get lost in the network , it clogs up the routs and is stops transmission .
Hopping is used to add a hop number to each header of a packet and this number is
reduced each time it leaves a router.
Each packet has a starting hop number and it counts down , when it reaches 0 and the
packet hasn’t reached destination , the packet is deleted
Then the missing packets will be flagged and the receiving computer will ask to resend
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
Simplex :
When data is sent in one direction only and is one way .
Uses of simplex : sending data to a printer , speaker , radio , monitor , keyboard , mouse
Half duplex :
When data is sent in both direction but not at the same time . Data can be sent from
computer a to computer b and also computer b to computer a but it cant be done
simultaneously .
Uses of half duplex :
Walkie talkie (you can talk to eachother but only one message at a time) USB
two way radio
Full duplex:
Data is sent in both ways at the same time . Info is sent and received at the same time
Uses of duplex :
Live chat Messages
Phone conversation
Zoom call and video conferencing
Serial :
Occurs when data is sent one bit at a time over a single wire and bits are sent.one after
another. It can be simplex , half duplex of full.
Benefits of serial : works well over long distances , data will arrive fully synchronized
and in correct order , mostly used for outside computer and is better at resisting outside.
Can connect computer to printer
Drawbacks of serial : slower transmission rate and is mostly used outside of the
computer..
Parallel : occurs when several bits of data are sent down several channels /wires all at the
same time .
Each channel transmits one bit . It can be simplex , half or. Full duplex .
Benefits of parallel : works well over shorter distances , faster transmission rate , used
inside that computer and works well inside
Drawbacks of parallel :
data can be skewed when traveling long distances and can become unorganized .
Becomes damaged when places out of the computer and does not work with external
parts
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻— USB :
Usb :
universal serial bus is a form of serial data transmission and is most common type of
input and output port. Allows both half and full duplex
Usb cables consist of 4 wired shielded cable .
2 wires for power (red and black) and 2 for data transmission (white and green)
USB-C:
A new type of usb cable being used in modern devices . Much smaller than usb .
Backwards compatible and has more voltage .
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
ERROR CHECKING:
Parity checks :
used to find if data has been changed or corrupted .
Data can either be odd or even . Odd means the number of 1s in a byte are an even
number . This means the parity bit will be 0 if its odd ,the parity bit will be 1 . Based on
the parity given you have to make the number of 1s even or odd
We can solve this with parity blocks , where a square of numbers is given parity and then
seen horizontally and vertically for mistakes until one bit is found
Checksum :
A method used to check if data has been changed or corrupted .
Data is sent in blocks and an additional value , the checksum is sent at the end of the
block of data .
Steps of checksum:
Sending computer adds all the data and writes the checksum at the end Data is
transmitted with checksum
Receiving computer adds all data
Then it compares sum to the checksum given
If it is different , a request is made to resend data
Echo check :
When data is sent to other device , the data is sent is sent back to sender . The sender
compares it to the original data to see if its different . If its different then an error has
taken place .
Steps of echo check :
Sent data is resent to sender
Resent data is then compared with original data If errors are found data is found
Check digits :
Check digit is the final digit in the code . It is calculated from all the other digits in the
code .
It is used to find any mistypes in passwords and extra digits in a password
.
Common check digit algorithms :
ISBN-13
Modulo-11
ISBN-13:
The check digit in isbn 13 is the 13th digit .
Add all odd digits
Add all even and multiply by 3
Add odd and even and divide by 10
Take remainder.
If remainder is 0 , check digit will be 0 , other wise , subtract the remainder from 10 .
MODULO 11:
Each number in code has been given weight of 8 ,7 ,6 ,5 ,4 .. 1 will be for the check digit
Multiply the numbers except the check digit by its weighting value separately
Add all numbers
Divide total by 11
If remainder is 10 , use 10 as the check digit , otherwise ,subtract the remainder from 11
for the check digit
How to calculate if answer is correct : do calculation with check digit .if check digit is 0 ,
then answer is correct
Uses of check digits :
Used in barcodes and passwords
ARQ:
automatic repeat requests is a way to check errors.
Receiving computer will send an acknowledgement if the data is correct .
The sending computer will resend data will resend data if the acknowledgment is not sent
in time . This is by using at timer to count down for an acknowledgement .
Plaintext:
The original way the data was sent
Cipher text:
The altered , encrypted data after it goes through an encryption algorithm
Symmetric encryption:
Uses and encryption key which is a code . This alters the numbers / letters .
Eg:
Cs is exciting
+11 11 11111111 (shifting the alphabets 1 up) =dt jt fydjujoh
This is unreadable
Disadvantages of symmetric:
Modern computers can easily decrypt the data without any key or code. It also needs to
keep the key a secret and if the key gets out , the data will easily get intercepted
Asymmetric encryption:
Uses 2 keys called public and private key
The public key can be accessed by anyone and is used to encrypt data . The private key is
only used by 1 person and is used to decrypt data
————————————————————————————————————
————
CHAPTER 3: HARDWARE
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻-
CHAPTER 4 :SOFTWARE
2 types of software :
System software and application software
Utility software:
Software that are pre installed and run in the background .
Virus checkers:
Computers use this because many systems get infected with malware . There are ways to
prevent this by not downloading from unsecured websites . But this is not reliable so this
is why anti-virus software needs to be downloaded.
How do virus checkers work :
They check files and software for traces of malware and checks for unusual behaviour .
Defragmentation software:
As an HDD becomes full , blocks used for files become scattered all over the disk surface
. This leads to slower data access time .
When removing and adding data in and hdd , the HDD stops organising the data and puts
it where ever it finds space . Then some of the game data can be misplaced into the music
file . The defragmentation software compiles all the parts of data and segregates it into
specific categories .
Advantages of defrag:
Faster data access time
Less storage required
Organized storage
Back-up software:
A separate replica of your data incase it is corrupted during an update , etc.
Security software :
A software that manages access control and user accounts (usernames and passwords) .
Links into other utilities like anti virus , etc .
Protects networks with firewalls .encrypts data .
Screensavers:
Programs that moving and still images on the screen after inactivity from the user.
Originally it was used in computers to prevent screen burns but now they are used for
customisation in OLED and LCD screens . But it is also used as a security measure .
If the user is inactive , the device will log out and put a screensaver to prevent other
people from accessing the users device.
Device drivers:
Software that communicates between the OS and translate data to communicate to
hardware peripheral devices . Otherwise hardware would not be able to work with the
computer .
Operating system:
A software that operates and manages all tasks in the computer . It provides an
environment for applications to be run and acts as a human computer interface (HCI) . It
also simplifies the complexity of computer software .
Types of OS:
MacOS
LinuxOS
AppleOS
IOS
Google android
2 types of HCI:
Command line interface (CLI)
Graphical user interface (GUI)
CLI:
A more primitive type of HCI .
User needs to memorise and input lines of code to execute actions on the computer . It is
much more slower and is very primitive . But an advantage is that it communicates
directly to the communicates to the computer .
GUI:
The modern HCI and allows the user to interact with the device using pictures or symbols
and with a mouse instead of lines of code .
You can just select an icon for an action to be executed .
The GUI simplifies the machine code and computer actions .
Post WIMP:
Tablets and phones can now use touchscreen and perform a wide amount of gestures such
as pinching and rotating . This would be difficult for a WIMP GUI
Memory management :
OS manages the primary and secondary storage (ram and rom) and allows data to be
moved between
Keeps track of memory locations
Carries out memory protections so data isnt lost and data isnt breached and apps dont
display wrong results
Security management:
● A part of OS and is the part that ensures that the data is confidential and well
protected .
● The OS has to carry out regular updates Updating antivirus software
● Prevent illegal intrusion and privacy of data
● Using password and firewalls
Buffers:
A temporary waiting area for data to be processed . Sometimes some high value data has
to be processed first so the low value one has to wait in a
buffer.
File management:
The OS has to name the file based on data
Eg: filename.docx , filename.htm , etc
It helps to open , close , delete , rename ,etc for a file and allows it to move from rom to
ram and vice versa
Maintains security for all files and organization
Multitasking:
Allows computers to do more than one task at a time . To make sure both tasks don’t
clash , the OS. Has to constantly monitor both processes under its control . Tasks are
given high or low priority , based on that , the OS can choose to multitask or etc
Booting up:
When the computer starts , part of the OS is loaded into RAM . The start up of the
motherboard is handled by the basic input/output system (BIOS) . The BIOS tells the
computer in which storage the OS is in so it can be transferred and started .
Firmware :
A type of program that provides low level control for devices . BIOS is type of firmware
as well as drivers
But the BIOS settings are stored in the CMOS (complimentary metal oxide semi
conductor) chip . The CMOS is powered at all times by a battery on the motherboard.
The BIOS setting will reset if the battery is taken out . Once the CMOS is restarted , it
will access work with the same BIOS settings in the EEPROM but the settings will be
reset to the factory default
Interrupts:
A signal sent from a software or device to the microprocessor. This makes the
microprocessor stop what its doing to service the interrupt .
Interrupt priority:
The microprocessor gets the interrupt and decides if it is a high or low priority.
A low priority will not be that important that the microprocessor has to completely stop
what its doing and the high level one will be vice versa .
Machine code:
A code in binary and numbers that computers only understand .
Computer program:
A list of instructions for a computer to do a task
Assembly language :
It assembles variables into one thing and needs to be translated by an assembler
Used to make use of special hardware
Used for special machine instructions
Used to write code that doesn’t take much space in the primary memory Performs task
very quickly
Executable file :
.exe means it does not need to be processed again and again
Translator:
A program that translates programs and codes and inputs into binary and machine code
Compilers:
A type of translator that translates the entire whole HIGH LEVEL code into machine
code all at one time .
Can be used again and again without the need to recompile and is faster than interpreters.
(Exe file)
Used for general use
Translated into 1 whole instruction
Interpreters:
A program that executes a HIGH LEVEL language one statement at a time
Once interpreted , it does not become an exe file and needs to be reinterpreted over and
over
Used when a program is being developed Translated into several instructions
Assemblers:
Translates an LOW level assembly language program into machine code so it can be
directly used for a task .
After once assembled , the code can be used again and again without any re-assembly
(exe file)
Used for general use
Usually translated into one whole instruction
Advantages of compilers:
Can be stored and ready for use
Takes up less space in memory when executed Executed in shorter time
Doesnt need to be recompiled
Disadvantages of compilers:
Takes longer to debug and write and test during development Less reliable and less
precise
Advantages of interpreters:
Easier and quicker to debug and write in development More precise and accurate
Disadvantages of interpreters:
Take longer to execute
Programs need to be interpreted again and again
Summary:
Interpreters are more precise but take more time
Compilers are quicker but are less quick in debugging and are less precise
IDE:
Integrated development environment is used by programmers to aid writing and develop
programs . Ides support different languages .
Eg: pycharm for python
Features of IDE:
Code editors
Translator
Run time environment with debugger
Error diagnostics
Auto completion
Auto correction
Auto documenter and pretty printing
Code editor:
Allows program to be written and edited without the need for an external text editor .
This speeds things up since you don’t have to switch software when you need to correct
your program
Auto-completion:
Use prompts to help the user based on context and tries to think and type what the user is
going to program.
This makes it easier to type large loops.
Internet:
A worldwide Interconnected network and is a huge collection of those networks .
Relies on physical infrastructure that allows networks and devices to connect with each
other
WWW:
World wide web is only a part of the internet that you can access using a browser
software Consists of massive webpages collection and is based on hypertext transfer
protocol
HTML:
Hypertext markup language is sent from websites to the user to display the webpages .
URL’s:
Uniform resource locators are text addresses to access websites. It uses the format
protocol://website address/path/filename
Web browsers:
A software that allows you to access and display web pages . They interpret HTML from
websites and display the result like videos , photos ,audio , text
DNS servers:
(Domain name servers) a server system for finding the IP address for websites . It
converts the website url into IP address
How webpages locations and data are found:
We search a website on the browser
Browser asks DNS for the location and ip address of the website
Dns server finds ip address and sends it back to computer
If it does not , it checks with other dns servers
Then the computer find the location of the website and downloads data
Cookies:
● Small files or code stored on a users computer that is sent from the webpage to the
browser on the users computer.
● Every time a user enters a website . It checks if the user has cookies .if it does , the
browser reads the cookies which holds key info about the user .
● Cookies maintain user preferences and shows results that are related to user
searches
2 types of cookies:
Session cookies and persistent cookies
Session cookies:
A type of cookie that is stored in temporary memory and deosnt personally identify the
user and any info from the computer .
They cease to exist after the session finishes or the browser is closed
Persistent cookies:
They remember lo in details and are stored on the hard drive of a users computer until
expiry date.
These cookies continue to exist even after the browser is closed and the session is over.
They remove the need to type in log in details .
Websites ask for permission to install these cookies and encrypt data stored
Digital currency:
A type of currency that exists in digital form . It has no physical form like conventional
fiat currency
Fiat currency:
A currency supported by governments and is directly related to physical cash and silver
and gold reserves. It can be in cash , credit and online payment like apple pay.
Cryptocurrency:
A digital currency created to solve the security and confidentiality problems faced in fiat
currency and cbs .
Before all the exchange rates are determined by the 2 banks but with crypto , the rates
and rules are determined by the community .
Unlike fiat , crypto transactions are public which means they can monitor the amount of
crypto and keep it regulated
Uses blockchain
Blockchain:
Is a decentralized database and all the transaction are stored on this database . Consists of
a number of interconnected computers but they are not connected by a central server .
When a new transaction takes place all the computers get a copy of it . This is so it cant
be changed with all of the consent of all the network .
Removes the risk of security
Uses of blockchain:
Cryptocurrency
Smart contacts
Research
Politics
Education
How does blockchain work:
When a new transaction is made a block is created.
It has data , hash value , previous hash value
Every time
a new block is created , it is chained to the previous one and has a unique hash as well as
the hash of the previous one .
The hash also includes a timestamp .
What is block 2 in a block chain called: The genesis block
Proof of work:
It takes 10 minutes to create and certify a single block which is done when miners solve a
very complex math problem. This 10 minute time stops hackers from creating a whole
new chain
Key terms:
Internet= interconnected network
WWW= worldwide web
IP= internet protocols
TCP = transmission protocols
HTTP= hypertext transfer protocol
HTTPS = hypertext transfer protocol secure URL = uniform resource locators
HTML = hypertext markup language
DNS= domain name server
Word list:
● Text file containing a collection of words.
● Can contain a million words.
Step 2 would still take several hours until the password is found.
Data Interception:
Stealing data by tapping into wired or wireless communication links . It gets your
confidential and private information.
Packet sniffers:
Used in data interception and checks for all packets being transmitted and all intercepted
data is sent back to the hacker .
Wardriving:
● Sometimes called Access Point Mapping
● Data can intercepted using a computer or phone, antenna and a GPS device, outside a
building or someone’s house.
● The intercepted wifi signal can reveal personal info to the attacker.
● The user often isn’t aware of this.
WEP:
Wired equivalency privacy is an encryption protocol that is recommended with a firewall
to stop data interception .
Wireless networks mean Wi-Fi.
DDOS attacks:
Stands for Distributed Denial of Service.
Prevents users to access a part of a network.
Usually temporary but can be very damaging act or a large breach of security.
Affects networks and individuals.
How it works:
● The attacker adds thousands of requests (spam traffic) when the user submit a request.
● Since the server can only handle a certain number of requests, it wont be able to
process the users request.
● This is a denial of service
Hacking:
The act of gaining illegal access to a computer system without the users permission.
Usually leads to identify theft or losing personal info.
Data can be deleted, passed on, changed or corrupted.
Encryption does NOT stop hacking because it does not stop them from deleting and
corrupting data
Ethical Hacking:
● A University course
● Companies authorize paid hackers to check their security measures.
● And check how good their computer systems are against hacking attacks.
Malware:
● One of the biggest risks to the integrity and security of data on a computer.
● Many forms of malware:
Viruses:
Programs that replicate themselves and delete and corrupt data .
They fill up the hard drive with useless info and delete executable files to overload and
cause the computer to malfunction
Active hosts :
Viruses need to be on an active host program that will only run and cause harm when
executed or opened . This is why viruses are sent in websites , downloads and email links
since the user activates it with an action .
This is known as a trigger
Ways to prevent:
● Don’t open unknown emails
● Don’t install non-original software
● Always run an up-to-date virus scanner.
Worms:
A type of malware that self replicates and doesnt only destroy 1 computer but aims to
spread to others and corrupt entire networks .
They dont need an active host program to start and remain inside apps so they can travel
through networks without the user activating it .
They enter when there are security failures instead of targeting 1 file like viruses
Example of worm:
I love you worm infected many windows pcs through a love letter file on email . It
overloaded phone systems and brought down networks .
To prevent it:
● Don’t open unknown emails
● Don’t uninstall unoriginal software
● Run up to date virus scanner together with an up to date anti virus program.
Botnet:
When worms take over many computers and make them bots that all create a network
and send the worm to others . It makes it hard for people to detect where the worm was
initiated
Trojan horse:
a program that is disguised as a legitimate software but hide malicious code inside .
Needs to be executed by end user and can be downloaded as email or from infected
website . It mainly does not cause damage but gives out personal info to hackers who
download spyware and ransomware into the system . Trojan horses work as a way to
allow more malware to enter .
Can surpass firewalls
Spyware:
● Software that gathers information by monitoring a user’s activities done on their
computer.
● Gathered info is sent back to the cyber criminal who sent the spyware.
● Designed to monitor and capture web browsing and other activities.
● Eg: Bank account details, passwords and credit card details etc etc.
● Can be detected and removed with an anti spyware program.
● Biggest danger is finding the method used to enter a users computer.
● This indicates a weakness in the system has been found that could be exploited by more
dangerous malware.
● Used to make way for even more malware to enter
Adware:
● Type of malware.
● Not necessarily harmful.
● Usually floods an end user with unwanted ads.
● Can highlight weaknesses in a users security defenses.and can appear in fake download
ads and redirects
● Can be hard to remove since it defeats most anti-malware software as it’s hard to
determine whether it’s harmful or not.
Ransomware:
● Programs that encrypt data on a users computer and hold the data hostage.
● The cyber criminal waits until ransom money is given and sometimes the decryption
key is given to the user.
● Can be installed through a Trojan horse or social engineering.
● When executed it either encrypts files instantly or waits a while to determine how much
the victim can pay.
● Once executed it becomes almost impossible to reverse the damage caused.
Prevention methods:
● Avoiding phishing attempts.( Unknown emails and links).
● Ensure regular back-ups of key file.
Phishing:
● When a cybercriminal sends out legitimate looking emails to victims.
● The emails may contain links or attachments that take the user to a fake website.
● Also trick the user into giving personal information.
● Non specific targeting an individual.
Prevention methods:
● Awareness behind identifying phishing scams.
● Don’t click on unknown emails unless they are confirmed to be genuine.
● Running anti-phishing toolbars on browsers.
● Always look for https or the padlock symbol because that means a website is secure.
● Regular checking of online accounts.
● Maintaining passwords regularly.
● Run a up to date browser is running on the computer.
● Run a good firewall at all times.
● Be vey wary of pop-ups and use the browser to block them.
● If the pop up gets through your defenses do not click on cancel since that usually leads
to the malicious site.
● Instead click on the small x at the top to close it.
Spear phishing:
Where the criminal targets a SPECIFIC individual or company for financial information
or industrial espionage.
Pharming:
● Mainly create websites that have same spelling so when user is typing url , if it
typed wrong it will show the fake website . The fake replicates the real one to get
all the login details of the user .
● Malicious code installed on a users computer or on an infected website.
● The code redirects the users browser to a fake website without users knowledge.
● No action needed to initiate.
● The attacker can gain personal and financial data.
● Website often appears as trusted website and lead to fraud and identity theft
Social engineering:
● Social engineering is a tactic used by cybercriminals.
● It involves creating social situations to catch victims off guard.
● The goal is to manipulate people into ignoring security procedures.
● This can lead to individuals not following best practices for security.
● Effective way to introduce malware into users system.
● No hacking involved since user is allowing the attacker to get access.
● Uses human behavior to trap people
Curiosity:
Hackers trick them into thinking they won a car or prize and make them download a
malware
Trust:
Use fake emails from trusted companies to trick people who rely on them to scam and
install malware into the system
Instant messaging:
● Instant messages often contain malicious links.
● These links may appear as important software upgrades.
● Relies on user curiosity.
“Scareware”:
Relies on users fear and makes a pop up message for a fake virus .
This makes the user download a fake antivirus that is actually a malware
Phishing scams(Emails):
● A seemingly “genuine” email is sent and contains a link.
● The link redirects the user to a fake website.
● Relies on trust of well known companies.
Baiting:
● Attacker leaves an infected memory stick in a specific location.
● The user then picks it up and plugs it in to see whose it is.
● The infected stick then downloads malware on the computer.
● Relies on user curiosity
Phone calls:
● So called “professional” calls saying their device has been compromised.
● The criminal is requested to download a software that gives access to their computer,
eg: AnyDesk.
● Relies on fear.
Steps of cybercriminal :
Step 1 - victims info is gathered and victim is selected with method of attack decided
Step 2 - victim is being targeted by email or trojan horse in phone call
Step 3 - attack is executed by hackers and criminal gets all info
Step 4 - when they got enough info , the criminal removes all traces of malware from the
system
Access levels :
This allows only certain users to have access to databases . Eg : janitor cant have access
to medical data like the nurse can . This allows info to be private and ensures not all data
can be visible to everyone
Anti spyware :
Detects and moves any spyware programs on a system . Based on rules which are criteria
that if the program doesn’t meet it is removed . Also file structures since structures
associated with potential spyware are deleted
Authentication :
Refers to ability to let the user prove who they are through PIN , something you have like
a tablet . Something unique to you like biometrics .
Biometrics :
Used in the same way as passwords and are unique to an individual .
It can be fingerprint scans , retina scans , face recognition , voice recognition
Where is it used :
In latest phones for authentication and is used in devices and transactions
Fingerprint scans :
Images and scans of your fingerprint will be checked with the saved requirement in the
database on the device . It compares ridges and valleys that are unique and have a 1 in
5000 accuracy . If they have a decent match percentage authentication is allowed
Benefits of fingerprint scanning :
It is unique and cant be brute forced and improves security .
Other authentication can be lost but this has little to no chance to being stolen or lost .
It is impossible for other people to sign in because only 1 persons fingerprint is on the
database They cant be misplaced
Drawbacks of fingerprints :
Relatively expensive to install and also is not on all devices If finger is damaged , this can
have an effect on scanning Some people think it is civil infringement
Retina scans :
Uses infrared light to scan unique pattern of blood vessels in the retina . It is unpleasant
as it takes 10 to 15 seconds to. It is very secure and accuracy is 1 in 10 million
2 step verification :
Uses a second authentication step to sign in to an account . The first is the normal
password and second is a secure digit code sent to other email or phone that should be
entered to sign in . Main use is in banking and shopping .
One time passcodes PINS are used
Firewalls:
A software or hardware that monitors and filters information coming in from the
computer to the external internet and vice versa based on a set criteria that is set by the
computer . It allows the user to not interact with harmful malware from an external
source . It protects from
malware ,phishing and pharming .
Proxy servers:
● Act as a middle intermediate between the user and the web server . Allows web
traffic to be filtered ,
● Keeps users IP address secret and improves security
● If traffic is valid , only then will it be allowed by the proxy
● Prevents direct access and information to be stolen via IP by the web servers so if
an attack launched , it hits the proxy instead of the actual user
● Directs invalid traffic away from server
Privacy setting :
Controls available on web browsers , social networks , etc that allow to limit who can see
what content and who are only allowed to see a users personal profile .
Stopping website ads - option to not allow 3rd party websites to access your personal data
● Apps - allow you to not share location and not track in applications
Steps of SSL:
When user logs into website , SSL encrypts data and only the users computer and the web
server are able to see the data . SSL is there when near the http and secure or a small
padlock . If it says i then its not useing https s and SSL
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻—
CHAPTER 7 :
Algorithms , programming and logic
Flowchart:
A diagram that shows the steps of a program algorithm and show the steps to complete
the task
Case statement:
A conditional statement that when you put in a different inputs you will get different
outputs
Nested if loop:
Having a loop being connected to another
3 loop structures: For , to , next counter Repeat until
While , do , end while
For , to next loops: always iterates a set amount It sets a counter and does a loop multiple
times
Total:
Finding a total of the sum of all the values inputted in a list
Counting:
Counting the number of variables inputed . It can count up or down
Maximum :
Finding the max value . Start by making it zero and then comparing the numbers until
you find the largest
Minimum:
Finding the smallest value . Start by make the value 100 and keep on comparing the
values until you get the smallest one
Average:
Add all the inputs into a total and then divided that by the counter.
Range check:
Checking if the number inputted is in the range
Length check:
Checking if the length of characters inputted is correct used like
is length(number) > 5
Type check:
Checking if the data type is correct
Presence check:
Checks if the input prompt has been filled and makes sure nothing is left blank
2 types of verification:
Double entry = when data is entered twice to maintain accuracy Screen/visual check =
user is asked too check if the information is correct
Extreme data:
The largest or smallest number in the normal range. Eg: from range 1 to 100 . Extreme is
1 and 100
Boundary data:
Contains the boundary of the range . It has 4 values . Eg: from 1 to 100 . Boundary is 1 ,
100 , 0 , 101
Linear searches:
Used to check for the correct values in an array . Uses boolean values and count / for loop
as well as repeat until loops that work until boolean is satisfied and then outputs the
number
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻ CHAPTER 8: if you didn’t, I’ll be better if you can, it’s better
Variable:
it is a named data store that contains a value that may change during the execution of the
program . Variables should be give meaningful names.
Constant :
a named data store that has a value that does not change during the execution of the
program
Declare : some languages require specific declarations . It is declaring that your variable
is something so it can be used properly
Integer : a positive or negative number that can be used with mathematical operators
Real : a positive or negative number with a fractional part (decimal) can be used in
operators
String : a variable or constant that has several characters and can have letters and
numbers and symbols
Boolean : variable or constant that can have only 2 values , true and false
Input / output: to enter any info into a program or output results you need an input /
output statement.
Prompt:
A message accompanied by the input statement that tells the user what to enter in .
Message:
A message accompanied by the input statement that tells the user what the output is
Sequence : the ordering of steps in an algorithm . If it is incorrect you can get a wrong
result . Eg: doing a calculation before and input or doing and output before a calculation
Pseudocode repeat until function : crates a loop
Selection : it is a technique that allows different routes through the steps of a program .
Data can be picked based on criteria . Eg: largest number will be selected
Case statements :
Used when there are more than 2 choices to be made . Different programming languages
have different ways of doing this .
Iteration :
A type of loop system that makes it easier to produce long results .
A section of many lines of similar codes can be reduced to 1 or 2 lines based on a loop
system .
3 types of loops :
Count-controlled loops =for a set of iterations Pre-condition loops=may have no
iterations
Length :
Finding the length of characters inputted
Substring:
Extracting part of a string eg = science from computer science
Arrays:
A data structure that stores many values of the same data type under the same identifier
name.position of the value in the array is shown by its index . Most programming
languages start the array with a 0 as the index instead of 1
Difference between list and array:
List holds all data types while arrays only hold 1 type.
Database:
Structured collection of online data that allows people to extract data based on needs.
Data can be numbers , text or pictures or anything that can be stored on a computer .
Uses of databases:
Patient list in hospital
Students grades
Book id in a library
Table:
Where data is stored
Fields:
Categories that are columns and stores the same data from the same category from
different people
Records:
Rows that store one persons data that has many categories and overlaps many fields
records consist of many fields . Each record has SAME NUMBER OF FIELDS
Eg of validation:
● Any dates inputted into a database will be checked to see if its valid date.
● Any numbers can be set to only input in a range so if the range is 1 to 10 , 12 will
be rejected
Primary keys:
A category (field) that has a unique number or code that uniquely identifies each record .
This number has to never repeat and is a specific fields that is important while accessing
data
Eg of primary keys:
ISBN codes or unique patient IDs to identify them
SQL:
Structured query language is a language used to obtain information from databases . It is
used for single - table databases
SQL scripts:
List of commands that obtains specific info based on criteria , ranges , characteristics and
data types
Truth tables are used to trace the output in a logic gate/circuit. A truth table lists all the
possible binary input combinations and their outputs, the number of outputs will depend
on the number of inputs, 2 inputs have 4 possible binary combinations (2 to the power of
2). 3 Inputs will have will have 8 binary combinations and so on.
NAND gate: The output of X is 1 if Input A and Input B are NOT both 1. NOR gate: The
output of X is 1 if neither input A nor Input B is 1
XOR gate: The output of X is 1 if, ( input A is 1 AND input B is 0) Or (if input A is 0
And input B is 1.)
XNOR: the output X is just like xor but the answer is reversed How to write them:
When logic gates are combined together to carry out a particular function they form a
logic circuit.
Produce a truth table for logic circuit, eg:
Look at the truth table and in each case produce a logic expression and the
corresponding logic circuit, eg:
Finding out which Boolean expression is represented by the following truth table:
————————————————————————————————————
————
CHAPTER 9 : DATABASES
Database:
Structured collection of data stored on a computer that allows that allows people to
extract information . Can store text , numbers , pictures ,etc .
Use of databases:
Student names
Patient names
Cars to be sold
Hotel bookings
Result of running race
Tables:
Databases have data stored on tables and have horizontal and verticals rows. Tables are
given names
Records:
Horizontal rows of a table and stores data of different categories
Fields:
Vertical columns that stores data from only one category . They are named by a primary
variable identifier
Eg of a database:
The table would be called patient_table
There would be fields like familyname , bednumber , consultant , etc for each patient
There would be many records for each patient that shows all the info that the fields show
.
⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻
⸻⸻⸻⸻⸻ Symbols for logic gates:
Not gate= hyphen on top
And gate = . For multiplication Or gate = ()+()
Nor gate=(-)+(-)
Xor gate=ā.b+-b.a
Nand=-a.-b
⸻⸻⸻⸻⸻⸻⸻—————
Python andpseudocode codes:
How to write linear search (using the array already made before)
● If you are using linear search , open a for loop for the array and set a boolean to
false that only becomes true if it is found
● Go through each variable in the array until it matches your value , this changes the
boolean to true
● Keep the count and position of it in the array
● Close the loop and then finish off your average and etc functions
● Output everything and finish