what are natural numbers (set N)
a set of numbers containing all positive whole numbers and zero
what are Integer numbers (set Z)
a set of whole numbers both positive and negative
Including zero
1/49
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
what are natural numbers (set N)
a set of numbers containing all positive whole numbers and zero
what are Integer numbers (set Z)
a set of whole numbers both positive and negative
Including zero
what are Rational numbers (set Q)
A set of numbers that can be represented as a fraction or decimal
It can be both positive and negative
what are irrational numbers
numbers which cannot be written as a fraction e.g. route 2 or pie
what are Real numbers (set R)
All positive real world quantities, includes all of Rational, integer, irrational and natural
what are ordinal numbers
numbers which describe the numerical positions of objects in relation to another e.g. 1st, 2nd, 3rd
how can a bit be represented?
A bit can be represented with either 1 or 0 which can be represented by computers interpreting high or low currents
all Binary prefixes:
Binary prefixes ( 2)
Kibi = 2^10
Mebi = 2^20
Gigi = 2^30
Tebi = 2^40
all decimal prefixes
Decimal prefixes (10)
Kilo = 10^3
Mega = 10^6
Giga = 10^9
Tera = 10^12
What is the difference between unsigned and signed binary
Unsigned binary can only represent positive numbers.
Signed binary can also represent negative numbers as well as positive.
How does two's complement work?
Signed binary with twos compliment:
Allows for the representation of of both positive and negative numbers in binary
When using two's compliment the most significant bit of a number becomes negative and you add up all the less significant bits to get your negative number
Subtraction with twos compliment:
You can subtract numbers by making the second number negative and then adding it after e.g. 14 + (-8)
what is Fixed point and Floating point?
Fixed point binary:
The binary point doesn't move and a specified amount of bits are placed before and after the point
Floating point binary:
Contains a mantissa and an exponent e.g. 3.1x10^6 where 3.1 is the mantissa and 6 is the exponent (written in binary)
what are rounding errors?
some decimal numbers that cannot be represented exactly in binary even with the use of fixed or floating point notation.
We can calculate the absolute and relative errors to see how close a particular number is to an actual value
what is an absolute error?
An absolute error is the actual amount by which a value is inaccurate.
It is the difference between the intended number and the approximation.
what is an relative error?
A relative error is the measure of uncertainty in a given value compared to the actual value which is relative to the given size of the given value.
it is calculated by dividing the absolute error by the actual value (and x by 100 if a percentage is required)
Advantage/ disadvantages of floating point:
Floating point allows for the representation of a greater range of numbers with a given number of bits than fixed point, this is because floating point can take advantage of an exponent that is either positive or negative
A large exponent and small mantissa = large range but little precision
A small exponent and large mantissa = small range but good precision
Advantage/ disadvantage of fixed point:
A binary point close to the left = good precision but small range
A binary point close to the right = large range but little precision
What is floating point normalization?
Floating point numbers are normalized to provide the maximum level of precision for a given number of bits.
It involves ensuring that the floating point starts with 01(for positive) and 10(for negative)
what is underflow and overflow?
Underflow occurs when very small numbers are to be represented but there are not enough bits available
Overflow occurs when a number is too large to be represented with the available bits
This is important for signed binary
What is ASCII?
In ASCII, the symbols assigned to the characters are assigned different 7 bit binary codes
Extended ASCII uses 8 bits therefore can represent 256 characters
1 byte can represent 256 different characters
What is Unicode?
Nowadays Unicode is also used as it counters all the different languages in the world
It uses 16 bits to represent characters
What are parity bits? (error checking)
adding a single bit to a transmission that can be used to check for errors
It contains:
- even parity, the value of the parity bit is chosen so as to make the total number of 1s in the transmitted data even. For example, if the data 01101110 (which contains 5 1s) were to be t transmitted, the parity bit would be set to 1, so that the total number of 1s is even. (11101110)
- Odd parity - works in a similar way to even parity, but adds a parity bit so that the total number of 1s in the transmitted data is odd.
- when data is received a parity check is carried out. If the value of the received parity bit confirms the type of parity (odd or even) in use, then the received data will be treated as correct. Otherwise the data is re-transmitted
- however, parity bits are not good for long distances, further checking needs to be applied
what is majority voting? (error checking and correction)
each bit of the data is transmitted multiple times. When the data is received, the most commonly occurring value is taken to be correct.
No need for retransmission as it is already performed
However, the volume of data being transmitted is increased with the repetition of bits ~ inefficient
Does not guarantee absolute reliability
what are check sums? (error checking)
Checksums involve adding a value determined by the data itself to the transmitted data.
An algorithm is used to determine the value of a check sum based on the data being transmitted.
not very efficient if the algorithm is complex
What are check digits? (error checking)
A check digit is a type of check sum which only a single digit is added to the transmitted data
This reduces the number of different algorithms that could be used to calculate the value of the check digit and so reduces the variety of errors the system can detect.
It is not necessary to recalculate the check digit again hence more efficient than check digits
how are bitmap graphics represented?
an image is broken down into pixels, each of which has a binary value assigned to it.
The resolution of an image is often expressed as the no of pixels per inch or the length X the width.
The value assigned to a pixel determines the color of the pixel
What is color depth/bit depth?
no of bits assigned to a pixel
e.g. if 2 bits were used then then there will be 2^2 (4) different colors that can be represented
how to calculate file size of an image
you multiply the no of pixels (width x height) by the bit depth/ color depth
It is represented in bits
This method of calculating produces a minimum value. This is because bitmap image files contain metadata( width, height, data created, color depth)
how are vector graphics represented?
Vector graphics represent objects and shapes such as rectangles, circles and lines.
The properties (such as fill color, fill style, and dimensions) of each geometric object or shape are stored in a drawing list
Advantage and disadvantage of vector graphics
advantage:
Vector graphics use shapes rather than pixels meaning they can be enlarged without losing quality.
Vector graphics use less storage space than bitmapped graphics as info is stored for each shape rather than each pixel
disadvantage:
Not efficient for an image of varying colors
Individual pixels cannot be changed
Advantage and disadvantage of bitmapped graphics
advantage:
Great format for storing full color images taken on a phone or digital camera
Photos can be adjusted and altered
disadvantage:
Enlarging a bitmapped Image results in a blurry or even pixelated image
Takes up more memory and storage
analogue vs digital sound
Analogue data has no limits to the values it can take, in contrast, digital data can only take particular values.
Analogue and digital signals vary in a similar way. An analogue signal can take any values and can change as much as required whereas a digital signal must take a specified range of values and can only change at specific intervals.
how does a digital to analogue conversion work?
The device reads a bit pattern representing an analogue signal and outputs an analogue electrical current.
how does an analogue to digital conversion work?
When a computer needs to make use of analogue sensors (e.g. a microphone), they use an analogue to digital converter (ADC)
It works by taking a reading of an analogue signal at regular intervals and recording the value through sampling
Samples are taken at a specific frequency which determines the number of samples taken per second.
Once the value of the analogue signal has been recorded, it can be stored digitally as a bit pattern.
what is the sampling rate?
the number of samples taken per second
what is the sampling resolution?
The number of bits allocated to each sample
How can the size of a sound file be calculated?
duration of the sample in seconds X the sampling
rate in hertz X the sample resolution in bits
What is the Nyquist Theorem?
the sampling rate of a digital audio must be at least twice the frequency of the sound. If the sampling rate is below this, the sound may not be accurately represented.
What is MIDI?
stores sound as a series of event messages, each of which represents an event in a piece of music.
These can be thought as a series of instructions which could be used to create a piece of music
what can event messages contain?
could contain info such as:
duration of the note
Type of instrument used to play the note
Volume of instrument
If the note should be sustained
Advantages and disadvantages of MIDI:
advantages:
allows for allows for easy manipulation of music without the loss in quality
The instruments on which note sounds can be changed, notes can be transposed and the duration of the notes can be altered
is lossless and smaller in size than sampled audio files
disadvantages:
It can't be used for storing speech and sometimes results in a less realistic sound
why are files compressed?
Files are compressed to reduce their size
Smaller files are faster to transfer between storage devices or on the internet
What is lossy compression?
Some information is lost in reducing the file size.
What is lossless compression?
No loss of information
the size of an file can be reduced without decreasing its quality
The two methods of lossless compression are run length encoding and dictionary methods
What is run length encoding?
Run length encoding reduces the the size of the file by removing repeated info
and replacing it with one occurrence of the repeated information
followed by the number of times it is to be repeated
what are dictionary based methods?
a dictionary containing repeated data is appended to the file.
This method results in a significant reduction in size.
However the dictionary used to compress the data also has to be in the file, therefore increasing file size.
Lossy vs. Lossless
Lossy compression:
Some info is lost in the compression process
Quality of file is reduced
The extent to which the file can be reduced is not limited
Lossless compression:
No loss of info
No loss of quality
There is a limit to how much of a file can be compressed
what are ceaser cyphers and their variants?
Caesar ciphers encrypt information by replacing characters.
Shift ciphers:
All the letters in the alphabet are shifted by the same amount
The amount by which characters are shifted forms the key
Substitution ciphers:
They are a type of Caesar cipher where letters are randomly replaced
What is an Vernam cypher?
an example of a cipher where each key can only be used once.
It works by:
1) Aligning the characters of the plaintext and the key
2) Converting each character to binary (using ascii or Unicode)
3) applying a XOR operation to the two bit patterns
4) converting the result back to a character
Vernam vs ceaser cypher, pros and cons:
Since the key of the Vernam cipher is chosen at random, the cipher text is also random and the cipher is considered very secure.
The Vernam cipher is not crackable within a recent timeframe given current computing power. Ciphers that use this form of security are said to rely on computational security.
The ceaser cypher can be easily cracked due to reoccuing letters where "E" is said to be the most common letter in words.