0% found this document useful (0 votes)
693 views21 pages

Cypher Notes

computer science notes

Uploaded by

FoxCraft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
693 views21 pages

Cypher Notes

computer science notes

Uploaded by

FoxCraft
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Cypher{Haider}’s

O Level/IGCSE Computer Science Notes


New Syllabus

Ch No. Chapter Page


1 Data Representation 1
2 Data Transmission 3
3 Hardware 6
4 Software 13
5 The Internet and Its Uses 16
6 Automated and Emerging Technologies 19

Chapter 1 : Data Representation


Binary
- base 2 system
- only 0s are 1s
- any data needs to be converted to binary before computer can use it
- data is processed by logic gates and stored in register

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

Converting text to binary


- done using tool called character set
- can be unicode or ascii character set
- ascii represents up to 8 bit binary no
- Unicode newer version with greater range 16 bit
- each character has a set binary value
- unicode required more bits per character

Converting images to binary


- images is broken down into pixels by the computer and image is a series of pixel , each pixel is
converted to binary depending on its color which is then processed by the computer , each color has its
own binary value
- computer can store metadata along with image that is additional but includes dimension , date and time
- Resolution is the size or number of pixels in image
- color depth is number of bits used to represent each color
- file size is proportional to these

Converting Sound to Binary


- Sound sampling is done to record sound waves for set time interval
- each sound wave is converted to binary then processed by computer

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

Chapter 2 : Data Transmission


Packet
- small unit of data
- header contains sender and receiver IP and packet number

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

ERROR DETECTION METHOD


Parity check
- before transmission begins parity is decided either odd or even
- number of ones are totalled
- 8th bit / parity bit is added to achieve the set parity
- data is sent
- receiving device rechecks the parity if it matches it knows data is transferred correctly else error has
occurred
- in one case the error wont be detected if in even parity two ones are swapped the data will be changed
but parity won't change

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

Automatic Repeat Request (ARQ)


- when error has been detected need to retransmit data will occur
- ARQ is used to retransmit data if error has been detected
- can be positive or negative acknowledgment

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

DATA ENTRY ERROR DETECTION


Check Digit
- used to check error in entry of data
- a check digit value is previously calculated from data using algorithm like ISBN13
- number is stored with data
- when data is entered value is recalculated
- if same then its correct
- is not error in entry
- is a type of validation

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

Fetch Decode Execute


Registers
- hold data temporarily

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

FACTORS FOR PERFORMANCE OF CPU


Cores
- a single core contains all the components to do 1 FDE
- 1 core means 1 FDE at a time
- multiple core is faster and used for multitasking

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

ROLES OF OPERATING SYSTEM


providing interface
- allows user to enter data and outputs data to user through interface
- GUI : has windows icons pointers and menu
- CLI have to type commands
- Natural language interface : to speak or type commands

managing files
- allows user to create move copy paste delete name rename files and sorting

Managing peripherals and drivers


- OS allows installation of drivers and sending data to and from drivers to manage hardware
- driver is what translates data from computer to peripherals

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

Process of Interrupt Handling


- when FDE finishes or before next FDE processor checks interrupt queue
- checks if interrupt has higher priority than current task
- if so stores current process in stack and fetches the interrupt
- check source of interrupt
- calls relevant interrupt service routine ISR which are instructions that handle the interrupt
- when finished the process is returned to memory or next high priority interrupt is fetched
- if not another FDE is done

TYPES OF PROGRAMMING LANGUAGE


High Level Languages
- closer to english and less like machine language
- machine independent can be written on one pc and run it on other as well
- easy to debug
- one statement can represent many statement of LLL

Low Level Language


- uses mnemonics
- closer to machine language can be binary or assembly
- not portable will only run on pc that its written on
- direct manipulation of hardware
- occupy less memory
- used in embedded systems
- full control
- does not need conversion

Types of Low Level


- Machine Code: it is binary and HLL need to be converted to machine code to run
- Assembly: it used mnemonics HLL converted to assembly then converted to machine code , assembly
is mid way and assembler needed to translate
Compiler
- translates all lines before trying to execute f
- produces error report for whole code if detected
- won't execute before all errors corrected

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

Chapter 5 : The Internet and Its Uses

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


Chapter 6 : Automated and Emerging Technologies


Working of Automated System

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

You might also like