Please enable JavaScript.
Coggle requires JavaScript to display documents.
computer science revision, : : - Coggle Diagram
computer science revision
number bases
base 10
the number system we use
has 10 digits which range from 0 - 9
known as denary
how to convert decimal into binary
add the header which increases in the power of two
add the digits that come up
write the bit pattern
decimal to binary conversions
make a table
start in the far right column and dee how many times it goes into the number
hexedecimal
explain why hexadecimal is often used in computer science?
long sequences can be hard to understand , so hexedecimal notation is used to simplify them.
can represent a pattern of four bits with one single hex digit so it shortens the lengths
it is a base 16 numbering system , meaning that it has 16 digits. it has the digits 0-9 as well as the decimal letters A-F.
it has 16 digits
Computers use binary in order to represent all data and instructions.
a bit pattern is an implementation of this whereby it can be used to represent different types of data including text , image , sound and an integer (whole number)
base 2
a numbering system that contains two digits : 1 and 0
binary addition
in vase 10 addition , we have to carry numbers. this concept remains when doing binary addition
for binary addition . we use the following rules.
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10
binary shifts is movements of bits to the left or the right.
the gaps are createdat the beginning or at the end. they are filled with 0's
the overall effect of binary shift results in either a multiplication of 2 or a division of 2.
because binary does not represent numbers , it is better to think of the 1's and 0's representing true or false.
it allows for Boolean algebra which uses different voltage levels eg on and off
binary values
gigabyte: 1000 megabyte
bit: the fundamental unit and is either 1 or 0
nibble : 4 bits
byte: 8 bits
kilobyte: 1000 bytes
megabyte : 1000 kilobytes
character encoding
charicters are encoded with the use of character sets. these are groups of codes that assign a character to a unique bit pattern
ascii is a character set developed in 1960 in order to attempt to solve compatibility issues.
ascii stands for the the AMERICAN STANDARD CODE FOR INFORMATION EXCHANGE.
it stored all the Latin alphabet on 7 bits. this was only useful to countries that had a simular alphabet and not languages which posessed their own scrips
extedned ASCII is not able to represent all possible charicters , so a new charicter set called as was developed.
ASCII is a subset of Unicode as they both share up to 127 bits. however , Unicode uses 16 bits for each character but has been expanded. there are over 120,000 Unicode characters.
encoding tables
in an encoding table , character codes are grouped and code is made sequential.
this is usefull becasue if you know where one value is for example A being 65 , you know that c will be 68 and so on
representing images in binary
a bit bit map is an image stared as an array of individual pixels.
a pixel is is the smallest distinguishable features that a monitor can display. commonly ,. monitors are divided into rows and columns of pixels.
the size of an image can be expressed with pixels in the form of width * height
the resolution is defined as the detail that an image can hold
increasing the resolution and color depth increases file size.
file size = width
height
depth (in bits)
file size ( in Bytes ) = width
height
depth (in bits) / 8
the resolution is also known as the number of pixels in an image.
converting an image to analogue to digital , a grid is placed over the image. then , an average color is found for each pixel and a binary value is assigned
for black and white , 0 is used for white and 1 is used for black.
for for color , every pixel is represented using multiple bits with one combination per shade. the number of bits allocated to represent each pizels color is known as the bit depth.
a pixel is the smallest distinguishable part of an image.
metadata is data about the data and is stored alongside the raw image data. it is needed to display the image properly
some examples include the file format and color depth.
sound
analogue signals : they are constantly changing and do not have a defined range. they are continues and often are represented by waves.
digital data: form discrete data values meaning that they fall within a range and can only take certain values.
generally , a sample of amplitude of the sound wave is taken at regular intervals and a binary value is given to each reading.
sample size is how many bits are allocated for each sample.
the sampleling frequency is the number of samples obtained per second and is measured in hertz
the greater sampling frequency , the truer the sampling digital signal is to the original but also means that there is greater file size.
the bit rate is defined as the number of bits used per second and a higher bit rate leads to a more detailed audio but as a result , more storage is needed.
file size = sampling frequency
sample size
time
compression
it is the reducing of file size whilst retaining information.
lossy compression) in lossy compression , some of the original data is removed from the file. this includes all the data that is not important. the only consiquence of this is the loss in quality wheather that be image or video quality.
lossless compression ) no data is removed but is rearanged to become more efficient.
one way this can be done is through RUN LENGTH ENCODUING.
RLE represents data runs with frequency pairs
Huffman compression
1)create a bide for each charicter and label each with the frequency
2)arrange these first nodes in ascending frequency
3)take these first two nodes and join them with a new parent node's labeled being combined frequency of the fist two nodes.
4) insert this node with the children into an oderd list.
Logic gates
Logic statements are can be evaluated t o either be true or false.
A truth table is a method of representing every possible output based on the input to a Boolean expression.
logical operators.
NOT
Takes one input and reverses it.
Notaton NOT A = Q
AND
Can only return true if both inputs are true. else , the result is false.
OR
it is also called disjunction
Only returns false when both values are false.
Returns True if either values are true.
Notation // OR A B = Q
XOR
Returns a value if exactly 1 value is true.
: :