Computer Notes
Computer Notes
- Topics :
● Chapter 1
● Chapter 2
● Chapter 3
● Chapter 4
● Chapter 5
● Chapter 6
● Chapter 7
● Chapter 8
● Chapter 9
● Chapter 10
Chapter 1
- Binary System :
- It is a base 2 number system and only 0 and 1 are used to represent values
- Denary System :
- It is a base 10 number system and 0 - 9 are used to represent values
- Hexadecimal System :
- It is a base 16 number system and 0 - 15 digits are used to represent values
● A : 10
● B : 11
● C : 12
● D : 13
● E : 14
● F : 15
2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰
1 1 1 0 1 1 1 0
2 142
2 71 Remainder : 0
2 35 Remainder : 1
2 17 Remainder : 1
2 8 Remainder : 1
2 4 Remainder : 0
2 2 Remainder : 0
2 1 Remainder : 0
0 Remainder : 1
16 2004
16 125 Remainder : 4
16 7 Remainder : 13
0 Remainder : 7
- Adding Values :
● 0+0=0
● 0+1=1
● 1+0=1
● 1 + 1 = 0 ( Carry 1 )
● 0+0+0=0
● 0+1+0=1
● 0 + 1 + 1 = 0 ( Carry 1 )
● 1 + 1 + 1 = 1 ( Carry 1 )
- Overflow is known as when a 9th bit is created in the addition of 8 bit Binary numbers.
- Overflow occurs when the addition of 8 bit binary numbers results in a value exceeding 255 ( maximum
value for 8 bit )
- Computers can carry out a logical shift on a sequence of binary numbers, either left or right
128 64 32 16 8 4 2 1
0 0 0 1 0 1 0 1
- 1 + 4 + 16 = 21
128 64 32 16 8 4 2 1
0 0 1 0 1 0 1 0
- However, when Binary shifts don't give the expected outcome, that means the most significant bits are lost
-128 64 32 16 8 4 2 1
x x x x x x x x
-128 64 32 16 8 4 2 1
0 0 1 0 0 1 1 0
- Therefore, 38 is 00100110
-128 64 32 16 8 4 2 1
0 1 1 0 1 1 1 0
-128 64 32 16 8 4 2 1
1 0 0 1 0 0 1 1
- -128 + 16 + 2 + 1 = -109
- Therefore the Denary value is -109
-128 64 32 16 8 4 2 1
0 1 0 0 0 0 1 1
- Then invert 01000011
- 10111100
- Add 1 at the end
- 10111101 is Therefore the answer
- The Standard ASCII code character set consists of 7 bit codes ( 0 to 127 in Denary )
- Extended ASCII uses 8 bit codes ( 0 to 255 in Denary ), this gives another 128 codes for characters in non
English alphabets
- Disadvantages of Unicode :
● Larger file size
● Slower Processing Time
- Sampling Resolution / Bit Depth is known as the number of bits per sample.
- Pixel is derived from the term picture element, it is the smallest element used to make up an image
- The color depth is the number of bits used to represent each color.
- An 8 bit color depth means each pixel can be of 256 colors ( 2⁸ = 256 )
1 KB 1 000 Bytes
- Another system :
- The network bandwidth is the maximum rate of transfer of data across a network
Code 08 97 10 98 01 99 01 01 01 01 01 08 101
100 99 100 99 100
- This string contains 32 characters and would occupy 32 bytes of storage
- Using RLE :
255 08 97 255 10 98 99 100 99 100 99 100 255 08 101
Is Smaller Is Larger
- Chapter 2
- Data sent over long distances is usually broken up into data packets. ( 64 KiB )
- A Packet is made up of :
● Header
● Payload
● Trailer
- Header consists of :
● IP address of sender and receiver
● Hop number of packet
● Size of packet in bytes
- Payload consists of :
● Actual Data being sent in the packet ( 64 KiB )
- Trailer consists of :
● Method of identifying end of packet
● Hex value of totalled 1 bits in payload, used for Cyclic Redundancy Checks
- A router receives a data packet and based on the information in the header, decides where to send it.
- Packet switching is a method of data transmission in which a message is broken up into a number of
packets.
- When a file is sent from one device to another, the file will be split into a number of packets, each packet is
received by a router and then can be sent to the end point.
- At each stage in the transmission, there are nodes that contain a router.
- The shortest possible path available is always selected by the router to send the data to.
- It is possible for packets to get lost if they keep bouncing around from router to router and never reach their
destination.
- Because of this, the lost packets mount up and clog the system which halts the network.
- In Hopping, a hop number is added to the header of each packet, this number is reduced by 1 every time it
leaves a router.
- Each packet has a maximum number, and when this number reaches zero, the packet is deleted.
- The missing packets will then be flagged by the receiving computer and a request to resend the files will be
made.
- Simplex mode occurs when data can be sent in one direction only ( computer to printer )
- Half Duplex occurs when data can be sent in both directions, but not at the same time
- Full Duplex occurs when data can be sent in both directions, at the same time
- Serial Data transmission occurs when data is sent one bit at a time over a single channel
- Parallel Data transmission occurs when several bits of data is sent over several channels
- Serial data works well over long distances as data can not be disordered.
- It is slower
- Parallel data works well over short distances, over long distances, data can become skewed.
- It is faster
Serial Parallel
Slower Faster
Works well over long distances Works well over short distances
Benefits Drawbacks
Can only fit one way Old USBs may not be compatible
- Parity checks use the binary system of data, it can be either even or odd.
- The Parity bit is the left most bit, it is set according to whether the number of 1s are even or odd.
- Errors can be identified when the sender’s byte has an even parity and the receiver’s has an odd.
- However, errors in the byte itself can't be flagged as only the parity bit is flagged
- Parity blocks compare the parity bytes of the sender's and reciever's.
- Checksum is when an additional value is sent alongside the data during data transmission
- Echo check is when data is sent back to the sender, after being received by the receiver.
- The sender’s computer then compares the two sets of data to check errors.
- A check digit is the final digit included in a code, it is calculated from all the other digits.
- ISBN 13 :
● 123456789012
● Add Odd Digits ( 1+3+5+7+9+1 = 26 )
● Add Even and Multiply by 3 ( 3 x ( 2+4+6+8+0+2 = 66 ) )
● Add Both and Divide by 10 ( 66 + 26 / 10 = 9.2 )
● If Digit is whole number, use it as check digit
● If not, subtract the remainder with 10 ( 10 - 2 = 8 )
● 8 is Check Digit
- Modulo - 11 :
● 1234567
● Weightings are given to this value starting from left ( 8,7,6,5,4,3,2 )
● 1234567
8765432
● Multiply the digit by its weighting and add them together
● 1 x 2 + 2 x 7 + 3 x 6 + 4 x 5 + 5 x 4 + 6 x 3 + 7 x 2 = 106
● Divide the value by 11 ( 106 / 11 = 9.6 )
● Subtract remainder by 11 ( 11 - 6 = 5 )
● 5 is Check Digit
- Parity checks and Echo checks are methods to verify data that has arrived unchanged at its destination,
however ARQ is a third way.
- Acknowledgements are messages sent to the receiver indicating the data has / has not been received
correctly.
- The receiving device receives an error detection code as part of data transmission.
- This acknowledgement has to be sent within a time period ( timeout ), and if no acknowledgement is
received during this time, the sending device automatically re-sends the data until a positive
acknowledgement is received.
- When data is transmitted over any public network, there is a risk of interception by a hacker
- Encryption changes the data into a form that is unreadable by anybody for whom the data is not intended,
this way, the data doesn’t make any sense for them.
- Symmetric encryption uses an encryption key, the same key is used to encrypt and decrypt the code.
C O M P U T E R S C I E N C E I S M A N
4 2 9 1 3 6 2 8 5 6 4 2 9 1 3 6 2 8 5 5
G Q V Q X Z G Z X I M G W D H O U U F S
- By following code, we add the number to the correspondence of the alphabets (+4:A=E )
- This is the encryption key
- To get the original message, we use the decryption key, which is just reversing the number to the
correspondence of the alphabets ( -4:E=A )
- Symmetric encryption still has a security issue as it uses the same encryption and decryption key.
- Asymmetric Encryption makes use of two keys, the public key and the private key.
Chapter 3
- The von neumann architecture consists of registers, buses and system clocks
- Arithmetic and Logic units ( ALU ) allow the Required arithmetic or logic operations to be carried out.
- The Control Unit ( CU ) ensures synchronization of data flow and program instructions.
- Registers are one of the most fundamental components of a CPU, there are five :
Current Instruction Register CIR Stores Current Instruction being decoded and executed
Memory Address Register MAR Stores address of memory currently being read
Memory Data Register MDR Stores data which has just been read from memory
- The Computer Memory is made up of a number of partitions, each partition consists of an address and its
contents.
- Address Bus : Carries addresses throughout the computer system from the CPU and Memory, is
Unidirectional
- Data Bus : Carries Data From CPU to Memory and vice versa, Is Bidirectional
- Control Bus : Carries Signals from the Control Unit to all other computer components, Is Bidirectional
- The Fetch Decode Execute Cycle is used by the CPU to carry out a set of instructions
Fetch :
- Memory address is stored in MAR, data is fetched from MAR and stored in MDR, instruction is decoded and
stored in CIR, PC is incremented for next instruction, Instruction stored in CIR is executed and decoded.
Decode :
- The instruction is then decoded so that it can be interpreted in the next part
Execute :
- The CPU passes the decode instruction to the appropriate computer components
- An Instruction set is known as the limit number of opcodes that can be used
- Instruction sets are the low level language instructions that instruct the CPU how to carry out an operation.
- An embedded system is a combination of hardware and software which is designed to carry out a specific
set of functions
Benefits Drawbacks
- A computer is not an example of an embedded device because they are multi functional
- A Barcode is a series of dark and light parallel lines of varying thickness, from no. 0 to 9
- The digits on the left have an odd number of dark lines and always begin with a light bar
- The digits on right have an even number of dark lines and always begin with a dark bar
- 2D Scanners are the most common and are used to input hard copy documents (paper)
- Computers equipped with OCR ( optical character recognition ) software allow the scanned text from the
document to be converted into a text file format, which can be edited.
- The scanned image can be used in CAD ( Computer aided design ) to produce a working model
- Depending on how the image is formed, there are three other names for CT Scanners :
● CT : Uses X-Rays
● MRI : Uses Radio frequencies
● SPECT : Uses Gamma rays
- Capacitive touch screens have two types, Surface capacitive and Projective capacitive :
Better image Only work with Can be Sensitive to water Can be used with Vulnerable to
clarity finger used if or moisture gloved hand scratches
cracked
- Surface Capacitive : Sensors are placed at the corners of a screen, small voltages are applied creating an
electric field. When a finger makes contact, a microcontroller measures the decrease in capacitance and
determines the location.
- Projective Capacitive : In the form of a X-Y matrix pattern, creating a 3D electrostatic field, when the finger
makes contact, it disrupts the field thus revealing the coordinates.
- Infrared use a glass screen with an array of sensors and infrared transmitters, the sensors detect the
infrared radiation.
- Resistive is made up of two layers of electrically resistive material with voltage applied across them, these
two layers are separated by an inert gas ( argon ), when the top layer is touched, a circuit is completed with
the bottom layer since they’re both coated in resistive material.
- DLPs use millions of micro mirrors on a small digital micromirror device, the number of mirrors and the way
they are arranged determines the resolution of the image.
- When the micro mirror tilts towards the light source, they are on and when they tilt away, they are off.
- A bright white light source passes through a color filter on its way to the DMD chip, the white light is split into
the primary colors : red, green and blue.
- LCDs use a powerful beam of white light which is sent to a group of chromatic coated mirrors, these reflect
the light back at different wavelengths.
- These three coloured components pass through three LCD screens which can either block it or let it through,
this produces a monochromatic image.
- Thus three different versions of the same image are produced, each image in shades of either red, green or
blue.
- Inkjet printers are used for printing high quality images ( Quality )
- Laser printers are used for printing multiple images ( Quantity )
- 3D printers are used to produce solid objects
- Inkjet use ink droplets, there are two methods this ink is produced :
- Piezoelectric : A crystal is located at the back of the ink reservoir for each nozzle, the crystal is given a tiny
electrical charge which makes it vibrate, this vibration forces ink to be ejected onto the paper.
- Thermal Bubble : Tiny resistors create localized heat which makes the ink vaporize, this causes the ink to
form a tiny bubble, as the bubble expands, some of the ink is ejected to the paper.
- LEDs produce their own light with tiny light emitting diodes, either red, green or blue.
- LCDs use some sort of backlighting because they don’t produce their own light
- LCDs use LEDs as a form of backlighting but before that, they used CCFL
- Cold Cathode fluorescent lamps use two Fluorescent tubes behind the LCD screen which supply the light
source.
- OLED ( Organic light emitting diodes ) can bend, this ability is used in TVs
- Sensors are input devices which read or measure physical properties from their surroundings
- Data which is sensed by Sensors are converted into Digital format using ADC.
- Other types of Sensors include : Temperature, Humidity, Heat, Gas and pH.
- Sensors are used in both monitoring and control applications.
- Examples of Monitoring :
● Monitoring of a patient in a hospital
● Monitoring of Intruders
● Monitoring of Temperature
- Examples of Control :
● Street lighting systems
● Controlling Temperature
- Monitoring applications :
● Security System
● Hospital
- Control applications :
● Street lighting
● Anti lock braking system
- Primary memory is directly accessible by the CPU and contains RAM, ROM and cache.
- Secondary storage is not directly accessible by the CPU and is non-volatile.
RAM ROM
- HDDs are the most common methods used to store data on a computer.
- HDDs have a number of platters (usually two), which spin a number of times
- HDDs have slow data access time compared to SSDs
- Removable HDDs are the same as normal HDDs but they can be plugged in by a usb port and can be
removed, they are used as a backup
- HDDs store more data but are slow, HDDs suffer from latency ( delay ).
- SSDs suffer from longevity ( long life ), most SSDs are rated at only 20 GB write operations per day, this is
known as SSD Endurance
- Solid state devices store data by controlling the movement of electrons within NAND or NOR chips. The
data is stored as 0s and 1s in millions of tiny transistors within the chip.
- Floating gate and control gate are both examples of transistors, they use CMOS NAND Technology.
- Flash memories make use of a matrix, at each intersection of the matrix, there is a floating and control gate.
- Data is stored in CDs and DVDs in pits and lands, Blue rays have smaller pits and lands because they use
Blue laser.
- WNIC utilizes antennas to communicate with networks via microwaves.
- DVDs have the ability to use dual layering technology which enables them to store more data and increase
the storage capacity
- DVDs in general have more storage capacity than CDs and they both use red lasers
- The most common use of DVDs and Blu rays is the supply of movies and games
- Virtual memory is a method that computers use to manage storage space to keep systems running quickly
and efficiently.
- Virtual memory is used when storage is needed quickly and there is no space
- Disk thrashing is known as when more and more data needs to swapped in and out of virtual memory
leading to a very high rate of read / write operations
- The trash point is known as when the process of the execution comes to a halt since the system is so busy
moving data in and out of memory.
- Cloud storage is a method of data storage where data is stored on remote servers. The same data is stored
on more than one server in case of maintenance or repair. This is known as Data redundancy.
- Every device connected to a router have their own public and private IP addresses
- WNIC ( Wireless network interface card ) are the same as NICs, however they use wireless connectivity
utilizing an antenna to communicate
- A MAC, Media access control is located in the NIC, If the NIC card is replaced, the MAC address will also
change
- A MAC address is a unique, 12-character alphanumeric attribute that is used to identify individual electronic
devices on a network
- UAA is by far the most common type of MAC address, UAA is administered by the manufacturer but LAA is
used when wanting to change the address.
Chapter 4
- There are two types of Software :
● System Software
● Application Software
- Heuristic checking is the checking of software for types of behavior that could indicate a possible virus
- A disk defragmenter will rearrange the blocks of data to store files in contiguous sectors.
- Screensavers were originally made to protect older cathode ray tube monitors from phosphor burn ( screen
burn ).
- Descriptors include :
● Vendor ID
● Product ID
● Unique Serial numbers
- Another type of System software are Operating Systems ( Windows, MacOS, Android )
- Operating systems are stored on the HDD or SSD since they are very large programs, mobiles and tablets
store them in SSD since they are too small to hold HDD.
- Human Computer Interface ( HCI ) is in the form of Command Line Interface ( CLI ) or Graphical User
Interface ( GUI )
- Touch Screens use post-wimp interactions which allow them to pinch and rotate the screen
- A Programmer would use CLI Whereas a normal user would use GUI
- Bootstrap loader / Booting up the computer is when a computer starts up and part of the operating system
needs to be loaded into RAM.
- The BIOS is often referred to as firmware and is defined as a program that provides low level control for
devices.
- The BIOS is stored in a special type of ROM, EEPROM. ( Electrically Erasable Programmable ROM )
- EEPROM is a flash memory chip, which means its contents remain even when the computer is powered
down.
- The BIOS settings are however stored on a CMOS Chip. ( Complementary Metal Oxide Semiconductor )
- The CMOS is powered via a rechargeable battery, therefore the settings would be reset if the battery was
removed or disconnected.
- An interrupt is a single sent from a device or software to the microprocessor requesting its attention
- The microprocessor suspends all operations until the interrupt has been serviced.
- Interrupt Priority deals with which interrupt to be serviced first and which interrupts are to be dealt with
quickly.
- Computers only understand their own language called machine code, therefore a program needs to be
translated into machine code to be understood by a computer.
- A Computer program is a list of instructions that enable a computer to perform a specific task, they can be
written in :
● High level languages ( Most common )
● Low level languages
High Level Easier to read, write and understand Programs can be larger
Low Level Can make use of special hardware Takes longer to write programs
- Translators :
● Compilers
● Interpreters
● Assemblers
- A Compiler is a computer program that translates an entire program written in high level language into
machine code in one go.
- An Interpreter is a computer program that executes a statement from a program written in high level
language, one statement at a time
- An Assembler is a computer program that translates a program written in an assembly language into
machine code.
- Compilers :
● Are Quicker to execute programs
● Produce an Executable file
- Interpreters :
● Are Easier to edit programs during development
● Don't Produce a Executable File
- Features of IDE :
● Auto Correction
● Auto Completion
● Translators
● Error Diagnostics
Chapter 5
- The World Wide Web ( WWW ) is only a part of the internet that users can access using web browser
software.
- Web Pages are hypertext documents displayed on the world wide web.
- Browsers are software that allow users to access and display web pages on their device screens, they
interpret HTML.
- Features of Browsers :
● Store bookmarks and history, and data as cache
● Contain multiple tabs and address bars
● Make use of JavaScript, cookies and Hyperlinks.
- Uniform Resource locators ( URLs ) are text addresses used to access websites.
- Hypertext transfer protocol ( http ) is a set of rules that must be obeyed when transferring files across the
internet.
- When some form of security is used ( SSL or TLS ), then http changes to https, indicating “secure”, this
shows by the padlock next to the url.
- HTML is a language used to display content on browsers.
- All websites are written in HTML and hosted on a web server that has its own IP address.
- The Domain Name Server ( DNS ) is a system for finding IP addresses for a domain name given in a URL.
- Everytime a user visits a website, they may have previously saved cookies which hold information by the
user’s previous browsing history, currency or language.
- Session cookies are temporary and are used when making online purchases by keeping the user’s items in
a virtual shopping basket.
- Persistent cookies are permanent and remember a user’s credentials when logging in to a website.
- Digital currency can be transferred between various accounts when carrying out transactions.
- Maintaining confidentiality and security are issues with centralisation, however an example of digital
currency known as cryptocurrency overcomes these issues.
- Cryptocurrency uses cryptography to track transactions in order to deal with the problems associated with
the centralisation of digital currency.
- Traditional digital currencies rely on central banks and governments, whereas cryptocurrency is
independant.
- The Cryptocurrency system works by being within a blockchain network
- Blockchain is a decentralized database which stores all the transactions of networked members.
- Blockchain consists of a number of interconnected computers which are not connected to a central server,
all transaction data is stored on all computers in the blockchain.
- This helps remove the risk of hacking as all the networked computers get a copy of the transaction and it
can’t be changed without the consent of all.
- Blockchain is used in :
● Cryptocurrency exchanges
● Politics
● Education
- Whenever a new transaction takes place, a new block is created which consists of :
● Data
● Hash Value
● Previous Hash Value
- The Data may include the name of sender and receiver or amount of money.
- The Hash Value is a unique value given to each block by an algorithm ( usually a cryptographic algorithm
called SHA 256 ).
- The Previous Hash Value is just the previous block’s hash value in a blockchain.
- In a blockchain, the first block is referred to as the genesis block as it does not have any previous hash
value, but it has its own hash value.
- The Second block attains a new hash value and the previous block’s hash value becomes the new block’s
“previous hash value”.
- This order of this blockchain prevents any tampering with it, if the order is changed, then it can be
determined that it has been tampered with in some way.
- A hacker can't change every single block in a block chain without it being noticed.
- This is because of proof of work which makes sure it takes exactly 10 minutes to create a new block in a
blockchain.
- This is protected by miners which are special network users that get a commission for each new block
created
1. Brute Force Attack is known as when hackers get your password by trying every single possible
combination of letters, numbers and other symbols.
2. Data Interception is a form of stealing data by tapping into a wired or wireless communication link.
- When using wired networks, a packet sniffer is used which examines data packets being sent over a
network in order for interception.
- When using wireless networks, wardriving or access point mapping is used which uses a laptop, antenna
and a GPS device outside of a building in order for interception.
3. DDoS ( Distributed Denial of Service Attack ) is an attempt at preventing users from accessing part of a
network such as a website.
● In a DDoS attack, these requests are sent from many different computers.
● In a DoS attack, it's sent from the same computer.
- A website server can handle a finite number of requests when a user wishes to enter the website, so an
attacker sends out thousands of requests which makes it hard for the server to service the real request.
4. Hacking is the act of gaining illegal access to a computer system without the user’s permission.
● Malicious Hacking is when data is hacked and then changed, sent or deleted.
● Ethical Hacking is when companies authorize paid hackers to test their security.
- Worms are standalone viruses that replicate themselves to spread to other computers in a network, they
don’t need an active host program to operate.
- Trojan Horses are malicious programs disguised as legitimate software to harm the computer.
- Spyware is software that gathers information by monitoring the activity on a user’s computer.
- Adware is a software that floods a user’s computer with unwanted advertising, usually in the form of
pop-ups.
- Ransomware are programs that encrypt the data on a user’s computer and hold it hostage until payment is
received by the user.
6. Phishing is when a legitimate looking email is sent to the user asking for personal data such as bank
details. Spear phishing is when specific users are targeted.
7. Pharming is a code that redirects the user’s browser to a fake website without the user’s knowledge by
using DNS cache poisoning, it doesn’t require the user to input personal data, it can take it regardless.
- DNS cache poisoning is when an IP address is changed in the DNS to redirect users to malicious websites.
- Data often has levels of access for different people, this means that certain people have access to certain
parts of data whereas others don't.
- Anti Virus :
● Scans Documents for possible viruses
● Quarantines any possible virus if found
- Anti Spyware either :
● Identifies typical features usually associated with spyware
● Identifies certain file structures associated with spyware
- Features of Anti-Spyware :
● Detects and Removes Spyware
● Prevents User from Downloading Spyware
● Encrypts Data to make it more Secure
● Blocks Access to User’s webcam and microphone to certain apps
- Authentication refers to the ability of a user to prove who they are using three common factors :
● Something You Know ( Password or PIN )
● Something You Have ( Phone Number or Email )
● Something Which Is Unique To You ( Biometrics )
- Phone Numbers or Emails are used when carrying out Two-Step Verification :
● User Logs Into His Account
● A Code Is Sent To User’s Phone Number or Email
● User Enters the Code to Verify His Authentication
- Biometrics can be used like passwords but they rely on certain unique characteristics of human beings
such as :
● Fingerprints
● Retina Scans
● Face Recognition
● Voice Recognition
- Images of Fingerprints are compared against previously scanned fingerprint images stored in a database to
see if they match.
- Retina Scans use Infrared light to scan the unique pattern of Blood vessels in the Retina.
- Unique - Expensive
Fingerprints - Impossible To Hack - Won’t Work If Injured
- Can’t Be Misplaced
- Unique - Expensive
Retina Scans - Impossible To Hack - Slow
- Can’t Be Misplaced - Intrusive
- There are four things to look out for when emails are sent to you :
● The Email Address ( @gmail.com is never used )
● The Tone and Grammar
● Misspelling of Domain Names ( Known As Typosquatting : Amozon, Gougle, etc )
● Suspicious Links
- A Firewall can be either Software or Hardware, they are the primary defense to any computer to protect it
from hacking, malware, phishing and pharming.
- Proxy Servers Act as an Intermediate between The User and a Web Server.
- Secure Sockets Layer ( SSL ) is a set of rules used by computers to communicate with each other across a
network.
- A user can know when SSL is being applied by checking if https or the small padlock is being shown.
Chapter 6
- An Automated System is a Combination of Software and Hardware that is designed to work automatically
without the need of human interference.
- Industrial :
● Industrial Automated Systems are used to manufacture car parts, engines, etc.
- Transport :
● Transport Automated Systems are used in Autonomous Vehicles and features such as Adaptive Cruise
Control
- Agriculture :
● Agricultural Automated Systems are used to irrigate lands automatically.
- Weather :
● Weather Automated Systems are used to analyze the weather and predict upcoming hazards or rainfalls
- Gaming :
● Gaming Automated Systems are used when using accelerometers and proximity sensors.
- Lighting :
● Lighting Automated Systems are used to automatically turn lights on or off.
- Science :
● Science Automated Systems are used when conducting scientific experiments.
Faster Expensive
- Robotics is a branch of Computer Science that brings together the design, construction and operation of
Robots.
- Dependant Robots :
● Require Human Interaction
● Can Only Help Humans, Not Replace Them.
- Industry :
● Industrial Robots are used to manufacture car parts, engines, etc.
- Transport :
● Transport Robots are used when using Driverless Vehicles and other Autonomous Vehicles.
- Agriculture :
● Agricultural Robots are used to harvest products, distribute fertilizer and phenotyping.
- Medicine :
● Medical Robots are used in surgical procedures and monitoring patients.
- Domestic :
● Domestic Robots are used to cut grass, vacuum or be personal assistants.
- Entertainment :
● Entertainment Robots are used in theme parks when disguised as cartoon characters.
More Productive
- Phenotyping is the process of observing physical characteristics of a plant in order to assess its health and
growth.
- Artificial Intelligence is another branch of Computer Science which deals with the simulation of intelligent
human behavior by a computer.
- Examples of AI :
● Smart Home Devices ( Alexa, Siri, Cortana )
● Chatbots
● Autonomous Cars
- In an Expert System, AI is used to mimic the judgment and behavior of a human or organization that has
expert knowledge.
- In Machine Learning, Computers are trained with sample data so they can make predictions about new
unseen data.
Aim is to make machines think like humans Aim is to make machines learn to solve new problems
Aim is to build machines that think like humans Aim is to make machines that learn through practice so they
can solve future problems.
Chapter 7
- The Analysis stage uses abstraction and decomposition tools to identify what is required
- Abstraction keeps the key elements and discards any unnecessary details
- Decomposition breaks down a complex problem into smaller parts, which can then be subdivided into even
smaller parts
- When the Design stage is complete, the programmer should know what is to be done
- Each module of the program is written using a suitable programming language in the Coding Stage
- Iterative testing means that modular tests are conducted and tests repeated until the module performs as
required
- The complete program or set of programs is run many times with different sets of test data in the Testing
stage
- Top down design is the decomposition of a computer system into a set of subsystems.
- The process of breaking down into smaller subsystems is called stepwise refinement
- ( Structure Charts ) ( Structure Diagrams ) ( Top Down Design ) ( Stepwise Refinement ) Are All Breaking
down into subsystems
- Structure diagrams can be used to show top down design in a diagrammatic form
- A flowchart shows diagrammatically the steps required to complete the task and the order that they are to
be performed.
- Flowchart :
● Oval : Start / Stop
● Rectangle : Process
● Parallelogram : Input / Output
● Rhombus : Decision
● Lines : Show direction of flow
- IF..THEN.. ELSE..ENDIF :
● IF is used to show the conditions
● THEN is used to show what would happen if the IF condition is true
● ELSE is used to show what would happen if the IF condition is false
● ENDIF is used to end the statement
- CASE-OF..OTHERWISE.. ENDCASE :
● CASE-OF is used to show the conditions
● OTHERWISE is used to show what would happen to the conditions not included in CASE-OF
● ENDCASE is used to end the statement
- FOR..TO..NEXT LOOP :
● Used when set number of repetitions is known
- REPEAT..UNTIL LOOP :
● Used when set number of repetitions is unknown but will happen until given condition becomes true
- WHILE..DO..ENDWHILE LOOP :
● Used when set number of repetitions is unknown but will happen until given condition is no longer
true
- Totalling :
● Totalling means keeping a total that values are added to
- Counting :
● Counting means keeping a count of the number of times an action is performed
- Linear Search :
● Linear Search inspects each item in a list to find the value searched for by the user
- Bubble Sort :
● Bubble Sort sorts elements in an order
- Validation is the automated checking by a program that data is reasonable before it is accepted, the types
include :
● Range checks
● Length checks
● Type checks
● Presence checks
● Format checks
● Check digits
- A range check checks that the value of a number is between a given range
● IF Number < 0 OR > 100
THEN
OUTPUT "Invalid"
- A length check checks that data contains an exact number of characters or a reasonable amount.
● IF LENGTH (Password) <> 8
THEN
OUTPUT "Invalid Amount"
- A type check checks that the data entered is of a suitable given data type.
● IF Number <> DIV(Number, 1)
● THEN
● OUTPUT "Must be a whole number“
- A presence check checks to ensure that some data has been entered and not entirely left blank.
● IF Email = ““
● THEN
● OUTPUT "*=Required"
- A format check checks that the characters entered conform to a pre-defined pattern.
- Verification is checking that data has been accurately copied from one source to another, methods include :
● Double Entry
● Visual Manual Check
- For double entry, the data is entered twice, and the computer system compares both entries, and if they are
different, an error message is displayed.
- A trace table is used to record the results from each step in the algorithm.
- The manual exercise of working through an algorithm step by step is called a dry run.
Operator Meaning
= Equal to
OR Either
NOT Neither
Chapter 8
- A Variable is a named data storage that contains a value which may change during the execution of a
program
- A Constant is a named data storage that contains a value which does not change during the execution of a
program
- Declaring in Pseudocode :
● DECLARE FirstVar : INTEGER ( Explicit Declaration )
● CONSTANT FirstConst = 500 ( Implicit Declaration )
- A Prompt is known as the output that states a user to do something ( "PLEASE ENTER NAME" )
- A message is known as the actual output shown to the user ( "YOUR NAME IS", Name )
- Sequence :
● The sequence or order of steps must be correct
- Selection :
● Selecting which type of conditional statement to use
- Iteration :
● Count Controlled Loops : Set Number of Repetitions ( FOR.. TO.. NEXT )
● Pre-Condition Loops : May Have no Iterations ( WHILE.. DO.. ENDWHILE )
● Post-Condition Loops : At least One Iteration ( REPEAT.. UNTIL )
- String Handling :
● Every data value is automatically assigned a string, until it is declared something else.
- Finding Length :
● LENGTH ( "Computer Science" )
LENGTH ( MyString )
- Extracting Substring :
● SUBSTRING ( "Computer Science ", 10, 7 )
● SUBSTRING ( MyString, 10, 7 )
● First Parameter : String
● Second Parameter : Position of start of Desired Substring
● Third Parameter : Length of Desired Substring
- Converting To UpperCase :
● UCASE ( "Computer Science" )
● UCASE ( MyString )
- Converting To Lowercase :
● LCASE ( "Computer Science" )
● LCASE ( MyString )
- Use Of Operators :
- Mathematical Operators
+ Add
- Subtract
* Multiply
/ Divide
^ To The Power Of
- Logical Operators
> Greater Than
= Equal
- Boolean Operators
AND Both True
OR Either True
- When writing a program, there are often similar tasks to perform that make use of the same group of
statements.
- Subroutines include :
● Procedures
● Functions
- A Procedure is a set of programming statements grouped together that can be called at any time during the
program.
- A Function is a set of programming statements grouped together that can be called at any time during the
program, which returns a value back.
- Parameters are the variables that store values of arguments passed to a procedure or function.
● CALL Stars
- When Procedures and Functions are defined, the first statement in the definition is a header.
- A Header contains :
● The name of Procedure or Function
● Any Parameters given to Procedure or Function, and their data type
● The Data Type of the return value for a Function
- A Global Variable can be used by any part of the program, its scope covers the whole program.
- A Local Variable can be used by the part of the program it was declared in, its scope is restricted.
- An Array is a data structure containing several elements of the same data type.
- The position of each element in an array is identified using the array's index.
- The first element of an array can have an index of zero or one, some programming languages automatically
set the first index to zero.
Chapter 9
- A database is a structured collection of data that allows people to extract information out of it.
- In a Database :
● Data is stored in tables
● These tables consist of records and fields
- These are the basic data types that can be stored in a Database :
● Text ( Short / Long Text )
● Character
● Boolean ( Yes / No )
● Integer ( Whole Number )
● Real ( Decimal Number )
● Date/Time
- In order to identify an item from the data stored about it in a record, primary keys are used.
- Primary keys are fields that uniquely identify an individual item ( 6 digit code, etc )
- Structured Query Language ( SQL ) is the standard language to obtain information from a Database.
- SQL Statements :
SELECT Fetches specified fields from a table.
SUM Returns the sum of all values in a field, used with SELECT
COUNT Counts the number of records where the field matches a specified condition, used with SELECT
- An SQL command :
Starts with SELECT ( Identifies fields )
FROM ( Identifies table )
:
:
Ends with ;
- SELECT Statement :
● SELECT FirstName, FamilyName
● SELECT * ( Specifies all fields )
- FROM Statement :
● FROM TableName
- WHERE Statement :
● WHERE TableNumber = 80
- ORDER BY Statement :
● ORDER BY FamilyName ( Sorts in Ascending order )
● ORDER BY FamilyName DESC ( Sorts in Descending order )
- SUM Statement :
● SELECT SUM ( Field )
- COUNT Statement :
● SELECT COUNT ( Field )
Chapter 10
- Truth Tables are used to trace the output from a logic gate or circuit.
- The Gate with the higher precedence will get drawn first in a Logic Circuit.