Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Science (Data Types (Casting (One of the most common reasons for…
Computer Science
Data Types
Character
Letter or number
ASCII
ASCII is a 7-bit character set containing 128 characters. It contains the numbers from 0-9, the upper and lower case English letters from A to Z, and some special characters. The character sets used in modern computers, in HTML, and on the Internet, are all based on ASCII.
UNICODE
Unicode is a computing industry standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems.
-
Real
-
Logic
-
-
-
-
-
-
Inside a Computer
Underneath the surface computers are electrical devices that process information by controlling the flow of electricity through billions of wires and transistors (electrical switches) inside the central processing unit and other components.
-
-
Casting
-
Output must be formatted as a string, and so we may need to convert a certain piece of data to a string.
All input also comes as a string, and must then be converted to other data types.
Binary
-
Addition
-
-
If we add 1 + 1, then we cannot use the sym
Overflow Errors
-
If a number is carried past the last place column, then this is called an overflow error.
-
Sound
-
-
-
-
Quality of audio
-
-
Unfortunately, increasing these make the file size larger.
-
Networks
Types
PAN
A personal area network is a computer network for interconnecting devices centered on an individual person's workspace. A PAN provides data transmission among devices such as computers, smartphones, tablets and personal digital assistants.
WAN
A wide-area network (WAN) is any telecommunications network or computer network that extends over a large geographical distance/place. Wide-area networks are often established with leased telecommunication circuits. E.G the Internet
LAN
A local area network is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building.
-
-
Protocols
-
• Wi-Fi
a facility allowing computers, smartphones, or other devices to connect to the Internet or communicate with one another wirelessly within a particular area.
-
-
-
-
-
-
• email protocols:
messages distributed by electronic means from one computer user to one or more recipients via a network.
-
-
-
-
-
Searching
-
Computer systems can store and process billions of pieces of data so it is vital that computers can find the information they need efficiently.
-
-
Security
Types of Attack
-
-
social Engineering
When a person is exploited into giving away critical information that gives access to the network or accounts.
-
Password Cracking
What is it
-
-
Many hackers want to find people's passwords, so that they can gain access to accounts:
-
Brute Force.
A brute force attack tries to crack a password by trying every single combination of letters and numbers until the correct one is found.
This can take a very long time, although special software is used to do this which makes it possible to make millions of attempts per second.
Dictionary attack
-
Rather than attempting every single combination, a dictionary attack tries words from a predetermined list:
-
Protection
-
Using two-factor authentication can prevent the hacker from logging in, even if they have the password.
Restricting the number of failed password attempts before an account is 'locked' for a fixed period of time can deter hackers.
DOS
Denial of Service
A denial of service (DoS) attack tries to bring down a server by flooding it with many useless requests.
The attack aims to overload the server. This stops the server responding to legitimate requests.
Protection
To protect against DoS attacks, a server's firewall can blacklist (ban) any traffic from an IP address which is known to perform DoS attacks.
Firewalls can also monitor traffic in real time. So if a new IP address starts to send too much traffic then traffic limits can be set.
DDOS
Distributed DoS (DDos) attacks are commonly used to overcome the blacklisting of an IP address because of a high number of requests.
In a DDoS attack, the requests are sent from an army of compromised machines, known as a botnet.
Botnet machines are infected with malware which allows a hacker to send requests from their computer.
The botnet can launch a huge number of simultaneous requests. The owners of the devices in the botnet might not even realise they are taking part.
Botnet
A botnet is a large number of computer that are controlled by a single hacker. Machines join the botnet when they are infected with
-
Sorting
Bubble Sort
Concept
-
If the first two cards are in the wrong order, you swap them.
Then do the same for the second and third cards, and continue in this pattern until the end of the pack. This is known as a pass.
-
By repeating this enough times, the pack will get sorted.
Steps
-
If they are in the wrong order, swap them.
-
Repeat the whole process, until a pass with no swaps happens.
-
-
Merge Sort
Concept
If we have two packs of cards, which are both already in order and want to combine them, what can we do?
One solution is to only consider the top card of each pile, and create a new deck starting from the smaller of the two cards.
-
-
Steps
-
Merge each pair of sublists by comparing the first value of each list and putting the smaller value into the new list first.
-
-
-
-
Images
Bitmap
-
-
The resolution of an image is the number of pixels in the image. It is specified as the height \times× width of the image
-
Programming
Random
-
-
print random.randint(1,10)
Binary
Addition
The process is that we line the two numbers up (one under the other), then, starting at the far right, add each column, recording the result and possible carry as we go.
-
-
-
-
-
The carry is involved whenever we have a result larger than 1 (which is the largest amount we may represent with a single binary digit).
With binary subtraction we start to get a little more difficult (But not that difficult). Similar to binary addition, we will work through the numbers, column by column, starting on the far right. Instead of carrying forward however, we will borrow backwards (when necessary).
-
-
-
-
-
Multiplication
Binary multiplication is just about as easy as binary addition. Again it is the same process as we would do with decimal multiplication by hand. Again it is easier as binary only has 0 and 1.
We line the two numbers up (similar to addition). Then we multiply the entire top number by each individual digit of the bottom number. As we move across each digit we pad out the result with 0's to line it up. Finally we add all the results together.
-
-
-
-
-
-