Cypher Notes
Cypher Notes
Hexadecimal
- base 16 system
- great range easy to read 0-9 A-F
- hexadecimal is shorter so it takes less space
- easier to read and write
- easier to debug
- hexadecimal used in MAC address IPV6 HTML color codes Used in assembly language error codes
Denary
- base 10 system
- easy to read for human
- less range than hexadecimal
Overflow Error
- when a number larger than a register can store is generated overflow error occurs
- eg value greater than 255 in 8 bit register
- computer has predefined limit that it can store overflow is when value outside this limit is generated
Logical Shifts
- can be left or right
- left or right most ones are lost and places are filled with 0s
- most or least significant bits are lost
- each left shift means multiply by 2
- each right shift means divide by 2
1
- sample rate is number of samples taken per second should be decided upon
- sample resolution is number of bits per sample
- loudness and pitch depends on sample resolution
File compression
- done to reduce size
- benefits are
- less storage required
- less bandwidth required
- less time taken for transfer
- quicker to upload and download
Lossy compression
- finds unnecessary and redundant data in file and removes permanently
- usually for images and sound
- for images it can remove color humans can’t distinguish , can reduce color depth and number of pixels
ie resolution
- for sound can remove sounds that humans can't hear or soft sounds it reduces sample resolution and
sample rate
Lossless compression
- uses compression algorithms to reduce size without permanently removing any data
- common is RLE which groups together repeating patterns and indexes them
2
- payload contains the actual data
- trailer marks the end and contains error checking method
Packet switching
- data is broken in various packets
- each packet sent across a network each packet can take separate pathway
- router controls the path of the packet
- router examines each packet and sees their destination address and sends it to the fastest route when
last packet arrive they are reordered
Methods of transmission
- serial is data sent down a single wire single bit a time
- parallel is data sent down multiple wires multiple bits at the same time
- simplex is data sent only one direction
- half duplex is data sent both direction but not at same time
- full duplex is both direction same time
Advantage of serialAdvantage of parallel
less chance of interference quick
no skewing no requirement of converting to serial
cheap
parallel is usually limited to 5 meters meaning its good for short range , parallel used among pc
components
USB
- standard connection that uses serial data transmission that is designed to transmit at high speeds .
Advantage:
–industry standard port comes preinstalled
–does not need external power source
–high speed
–fits only one way so less chances of error while connecting
Disadvantages
–length of wire limited to 5m
–isn't as high speed as ethernet
Checksum
- uses a calculated value
- before transmission takes place an algorithm for calculating the value is decided such as modulus11
- the calculated value is added along the data and then data is transmitted
- receiving device uses same method to calculate the checksum
- it matches calculated checksum with the received checksum
3
- if it matches no error else error
Echo Check
- involves comparison of data
- sending device sends the data
- receiving device retransmits the data back to sender
- the sending device compares the data to what it sent
- if same data no error else error
- slow method and error can come during the retransmission as well
Positive acknowledgment
- a timer is started
- sending device sends first packet
- receiving checks for error
- once receiving knows is confirmed that there is no error
- it sends positive acknowledgment to sender
- sending receives positive acknowledgment
- sends next packet
- if no acknowledgment in a given time frame
- timeout occurs
- sending device resends the data until a timeout or positive acknowledgement received or a limit is
reached
Negative Acknowledgement
- Timer started
- sender sends first packet
- receiving checks for error
- if no error detected no action is taken
- if error detected sends negative acknowledgement
- if negative acknowledgement received data is recent
- if no acknowledgement received in time frame next data packet sent
Encryption
- encryption done to make data secure
- so if packet is hacked data becomes meaningless
- data before encryption is plain text
4
- encryption key is the algorithm used
- cipher text is name after encrypted
- can be symmetric or asymmetric
Symmetric
- encrypted using key
- cipher text and key sent separately
- same key used to decrypt back
- used at small scale
- easy for hacker to intercept both key and text across a network
- less secure
Asymmetric
- plain text encrypted using public key
- cipher text transmitted
- decrypted using private key as public key useless
- two different keys used to more secure
- used at larger scale
Chapter 3 : Hardware
Important(working of input output devices not in syllabus)
5
6
7
Role of CPU
- processes all instructions
- takes Input processes it and outputs it
Microprocessor
- integrated circuit on a single chip
- much more limited instructions than cpu
- used to do specific tasks
Embedded Systems
- do specific tasks
- run on firmware
- inside a device
- include microprocessor
- consume less power
- fast reaction
- can be hacked
- difficult to upgrade
8
Fetch Stage
- Program counter has the address of next instruction stored which is a location in the RAM
- PC sends this address to MAR using address bus
- MAR sends this address to RAM using address bus
- RAM sends the data on that address to MDR using data bus
- MDR sends that data to CIR using data bus in control unit
Decode Stage
- CU decodes using instruction set which is a set of commands that can be processed these are in
machine code
Execute Stage
- if the decoded data needs mathematical processing it is sent to ALU
- in ALU arithmetic process are done
- accumulator is a component of ALU that stores interim data
- CU tells all the components to tell their function using control bus
Clock
- clock means number of FDE per second
- 1 hz is 1 FDE per second
- usually 1Ghz which is 1 billion instructions
- overclocking can be done to make faster
Cache
- data storage in cpu which stores frequently used data so it isn't fetched again and again
- increasing can make faster
Sensor
- used in automated systems , captures different types of data to be processed by the system , analog
data from environment
- data then processed by computer usually captures data at given time intervals
- types include
- Acoustic: measures sound
- Accelerometer: measures acceleration forces
- Flow: measures amount of fluid flowing thought or around an environment
- Gas: Measures presence and concentration of gas
- Humidity: Measures level of moisture
- Infra-Red: measures infrared radiation from objects can be used to show distance used to check if
intruder present
- Level: measures if fluid at certain level or not
- Light: measures the light in an environment
- Magnetic Field: measures presence of a magnetic field
- Moisture: measure moisture level
9
Primary Storage
- directly accessible by cpu
- stores data currently being used
- temporary data
Secondary Storage
- not accessible by cpu
- stores data permanently until deleted by user
RAM
- directly accessible by cpu
- volatile means uses power to store data when power lost data erased
- stores data currently being used
- constantly changing contents
- possible to increase easily
- used in FDE
- stores currently running data
- currently running instruction
- currently running part of os
ROM
- directly accessible by cpu
- non volatile does not require power to store data even when power off retains data
- store’s instructions for initial boot like bootstrap and bios and firmware
- contents are fixed do-not change but possible to reprogram
- not easy to alter
- stores firmware part of OS bootstrap and programs
SECONDARY STORAGE
Magnetic Storage
- uses magnetism to read and write data
- has circular plates called platters that spin to allow data to be read or written
- platter is separated into tracks and sectors
- it has a read write head that moves to read or write data
- uses electromagnet to magnetize dots on each platter
- if magnetize it stores 1 demagnetised stores 0
- can get fragmented due to overuse
- examples HDD floppy disk magnetic tape
Solid State
- memory is flashed onto chips
- contains semiconductor chips
- contains cells and transistors that are laid out in a grid
- transistors can be wired together as NOR structure in which parallel wiring NAND structure in which
series structure
- intersection of rows and columns of transistors are cells
- one transistor is FLOATING gate one is CONTROL gate
- control gate sits on top of floating gate
- when first created all transistors set to 1
- electric current reached control get and flows through flowing gate
- when data stored in transistor it gets to 0
10
- examples solid state drive and USB
Optical Storage
- uses laser to read write data from circular disk
- disk spins and read write head moves across surface
- to write data laser burns pits on the surface
- pits organized in spiral tract that start at the center
- surface of disk between each pit is called land
- used to read pits and land to obtain data
- example BluRay DVD memory disk
Virtual Memory
- type of memory that is extension of ram
- created with hard drive component
- a section of hard drive partitioned and used as extra bit for RAM
- when RAM is full system sends les urgently needed data to virtual memory
- send as Page; unit of data
- once pages require again resent to Ram
Cloud Storage
- collection of server that store data in a remote location
- storage owned by third party
- stored in servers
- benefits of cloud it is cheap
- not responsible of security and maintenance
- access data anywhere
- increase decrease easily
- benefits of local storage
- available at all times
- high cost
- cheap
- may be less secure
- extra fee
NIC
- component necessary for computer to access a network
- network is when 2 or more pc joined together
- each NIC given MAC address at manufacturing
MAC
- allocated by manufacturer
- physical address of a device
- to uniquely identify a device
- hexadecimal
- contains manufacturer and serial code
- doesn’t change
- separated by columns
- uses 48 bits
IP Address
- allocated by router
- identifies global address on the internet
11
- may not be unique
- changes
- uses 32 or 128 bits
- static or dynamic
Static IP
- IP address that does not change each time a device connects to a network
Dynamic IP
- an IP address that changes each time a device connects to a network
IPV4
- older version
- denary
- 32 bits
- less combinations
- can be static dynamic
- separated by full stops
IPV6
- newer
- 128 bits
- hexadecimal
- more combinations
- can be static or dynamic
- separated by colons
Role of Router
- sends data to specific destinations
- can assign IP
- can connect local network to the internet
Chapter 4 : Software
12
TYPES OF SOFTWARE
- software is a series of instructions that perform a function
System software
- manages hardware and provides service required by computer
- operating system and utility software example
- examples of utility : defragmentation and system clean up
Application software
- allows user to perform a task or gives service to user
- examples ; word processor , spreadsheet , database and web browser
- application software runs on operating system which runs in firmware and firmware is loaded by
bootstrap and run on hardware
Firmware
- instructions stored in ROM
Bootstrap
- first commands when computer starts
- check hardware and loads firmware
managing files
- allows user to create move copy paste delete name rename files and sorting
managing memory
- manages movement of data from hardware like RAM
- check process and makes sure enough data allocated to perform the function
- also makes sure two processed don't try to access same location
- allow multitasking
managing multitasking
- allows to do multiple tasks at once by using interrupts
Managing Interrupts
- decides which interrupts to do when
13
other Uses
- provides a platform for running applications
- manages user accounts
Interrupt
- interrupt is a signal to processor to tell it something needs attention
- software interrupts are divisions by 0, data from memory , output required , two process accessing same
data , request for input
- hardware interrupts are : key click , error from hardware like printer out of paper , hardware failure , new
hardware connected
Interrupt Handler IH
- interrupts have priority level
- when interrupt generated its put in a queue according to priority
14
- produces executable file
- useful when program finished
- only translates once
- source code not needed
Interpreter
- translates line by line
- reports error as soon as spotted
- useful when writing program
- needs to retranslate
- no executable file
IDE
- provides a platform which contains editor for writing and editing code
- provides a runtime environment where you can interact with the program and outputs from executed
code
- provides error diagnostics like
- Break point in which you set a point and code stops running on that to see values and output to that
point
- stepping where user tells if next line should be run
- variable watch window where values of variable are shown while the code is running
- other features are
- Auto completion
- auto correction
- pretty print
- block minimizing
15
Internet and WWW
1. internet is infrastructure , www is collection of all websites
2. website is collection of web pages
3. URL is text based address of a web page it contains protocol domain name and web page
4. HTTP is a protocol used for transmission of web pages and related data across the internet , https
more secure involves encryption and digital certificate
5. dns is domain name server with all the website name and ip address
6. retrieving web pages:
7. process of retrieving web pages : when you enter a URL in web browser it sends it to DNS to find its ip
address , if not in one DNS it forwards to others until found if not error is given , once it has the IP address
of web server it will ask for web pages using protocol HTTP web server will then send data in HTML ,
CSS and active script which will be rendered by web browser and displayed
8. if using HTTPS Before transfer of data web browser will ask for digital certificate and verify if authentic
then encrypted data will be transferred
9. purpose of browser:
10. main purpose of web browser is to render html and display web pages
11. other purposes are storing bookmarks , history , cookies , multitasking etc
12. cookies are a text file that store our data
13. uses of cookies are login info credit card info etc
14. types are session ; deleted once browser closed and persistent; kept in hard drive until deleted
15. digital currency is one that only exists electronically and is decentralized
16. crypto currency is digital currency which is encrypted
17. blockchain is digital ledger that is time stamped series of records that cannot be altered is encrypted
and cannot be changed
CS SECURITY THREATS
Brute Force Attack
- repeatedly inputting a password until correct combination is found
- most common combinations tried first
- to steal personal data and buy products online
- solutions are strong password , limiting attempts , biometric password and two step authentication
Data Interception
- data packets are intercepted and examined by software like packet sniffer
- done to steal data for criminal purposes
- SSL , TLS encryption and using HTTPs are solutions
DDoS
- first perpetrator will create a botnet by sending malware to other computers to use them as bot when not
used computers are called zombies
- the bots are used to send multiple requests to a server to cross its limit and crash it
- it is done to crash a server as demand for money or revenge
- use of proxy to filter requests and use anti malware to avoid becoming a bot
Proxy
- hides user IP
- proxy filters out requests
- protects a server
- proxy processes client side requests whereas firewall filters packets
- it can send requests slowly if website is about to crash
16
- it can do caching in which a certain IP address can be blocked from sending request
- caching can be done to bots
Firewall
- can be hardware or software
- examines the flow of data incoming and outgoing
- rules can be set for flow of data
- the data sent is compared to those rules
- it can accept or reject the transfer of data
- it can be used to close ports or entry points to a server or computer
- stores black list
- keep a log of traffic

MALWARES
- virus
Downloaded on hdd then it replicates itself and corrupts data or use up all available data to crash or slow
down pc
- worm
It also replicates itself but it looks to find vulnerability to replicate so it can clog up band with and slow
network
- spyware
It is downloaded and then keeps a record of actions done on pc common example is keylogger then data
sent to hacker to find out patterns and personal data
- trojan horse it is used to send malware to a pc , it is designed to look normal but once downloaded
It releases other malware that it contains
- Adware
Automatically creates pop ups and banner adverts when online
- ransomware
Once downloaded it locks and encrypts all data on pc and perpetrator asks for money to decrypt the data
Solutions
- anti virus
- anti malware
- firewall to not download
- caution to download
- create a data backup
Pharming
- malicious software downloaded on hard drive that redirects to fake webpage rather then real url
- to get personal data and thinking that user will think it is on real web page
- software can be downloaded by email popup or links
- solutions are anti malware , visually checking and only downloading from trusted websites
Phishing
- in phishing the attacker will send a genuine looking bait email which will encourage the user to click on
the link
- the link will be disguised as real whereas it will be fake and attacker will steal the data
17
- prevent it by checking email if correct and professional , URL of link , checking HTTPS and checking
website or not opening random emails
Social Engineering
- attacker will try to manipulate into giving personal or confidential data by psychological means
- to get data criminal activity or hacking into a pc or identity theft and fraud
- use of access level and awareness
Access Level
- the access to specific data is limited
- employees are given different levels of access to the data
- only senior people will have access to confidential data
- if employee is targeted to social engineering it will only have thé specific data
- providing users with different permission of data
- limiting access to reading data limiting data that can be viewed
- limiting access to editing the data


18
- sensors continuously sends digitized data
- micro processor checks the data with pre stored values
- takes action using actuator for each outcome
- continues until stopped
Automation
- initial cost
- running cost
- safety
- peoples job
- continuous work
- precision
Robotics
- the design of robots to perform tasks
- the construction of robots
- operation of robots
Robot
- has mechanical structure and framework
- electrical components like sensor actuator
- programmable
- examples ; factory equipment, domestic robots , drones
AI
- branch of cs that deals with simulation of intelligent behavior by computers and make them able to think
and reason
Main characteristics of AI
- collection of data
- set of programmable rules
- ability to reason
- can adapt (only machine learning)
Machine Learning
- it can adapt its stored rules
- machine learning can be supervised or unsupervised
- in supervised user tells program what its data means
- in unsupervised the program learns from its data
- does not repeat same mistakes
Expert System
- tries to emulate human expertise
- contains
- knowledge base with list of facts
- rule base that links the facts
- inference engine that decides what to ask next
- user interface output questions and inputs answer interacts with user
Knowledge Base
19
- stores the facts
- for the inference engine to use
- used for linking the facts by rule base
Rule Base
- stores are rules for the system
- for the inference engine to use
- used to link the facts in the knowledge base
Inference Engine
- it makes decisions by applying rules to the knowledge to provide result
20