Chapter 5 Representing Data Flashcards
How many bits are used for storing ASCII characters?
7
Drawbacks of ASCII
One language
Small amount of characters
How many characters does Unicode store?
Over 120k
Why was unicode made
to store more characters across several charcters
drawbacks of unicode
uses more bits
What is a parity bit
A form of error detection which makes the number of 1’s even (for even parity) or odd (for odd parity) by changing the last bit.
The 8th ascii bit is a parity bit
Drawbacks of a parity bit
DOuble corruption
Parity bit corruption
What is a check digit
Added to the end of data to check (but not correct) the data
How is a check digit made
By find the digital root of a number (Dividing by 9 and the remainder is the check digit, unless it is 0 where 9 is then the check digit (unless the data was already 0))
Majority voting is?
A method which can correct data by trippling the data sent e.g.
101 -> 111000111
How does majority voting work?
It takes the tripled value and gets takes the most comman bit of 3. e.g.
101110001 -> 110
Drawbacks of majority voting
Triples the data being sent
What are finite state machines
Its used to recognise patterns within data
What do finite state machines do?
Takes a set of data and runs it through various checks and outputs new data, e.g. it could be used for calculating negative binary numbers
How to use a FSM
Take the first value of the data and see what path that value takes, then if the path leads to itself repeat with the next value if the path leads elsewhere start from there with the next value and so on.
What does signed binary mean?
Binary using two’s compliment
What is unsigned binary
Binary that doesnt use twos compliment
Which bit is the negative bit in tow’s compliment?
The most significant bit
How do you get a negative number?
Represent the positive number in binary, flip the bits so 1 = 0 and 0 = 1 and then add 1 e.g.
00110101
11001010
11001011
How do you do binary subtraction?
Do the positive number plus the negative number. (make the negative number negative using twos compliment then add it to the positive number, if there is an overflow ignore that bit)
What is the Hexadecimal set of numbers
First 10 numbers are the same and then
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
How to calculate Hex to decimal
Either first convert it to binary and then calculate it or take the rightm ost digit and times it by one the go to the next digit and times it by 16 and so on before adding it all together
How to do binary multiplication?
go through the 2nd binary value and if there is a 0 write nothing but if there is a 1 write the 1st binary value shift n - 1 times where n = how far along you are in the 2nd binary value
How does fixed point work?
To the left of the Dp the number count up normally, but to the right it goes 1/2, 1/4, 1/8, 1/16
What is A U B?
Every value in A and B
What is A ∩ B
Only values that are in both A and B
What is A - B
Only values that are in A not B
Give an example of an integer number:
7
Give an example of a natural number (N):
0
Give an example of a number that is an integer (Z) but not a natural number (N)
-3
Give an example of a ration number (Q) that is not an integer (Z)
6.3
Give an example of an irrational number
Pi
Give a number that is not real (R)
sqr(-3)
Which of the largest infinite sets is the largest? N, Z, R or Q
R as it contains all of the other sets
What is cardinality?
The number of elements in a set
What is countably infinite sets?
Sets where the elements can be put in a one to one with the natural numbers.
What is a subset?
A set where the elements of one set are entirely contained within another.
What is a proper subset?
Where one set is entirely contained within another, and the other set has additional elements.
What symbol is used for proper subsets?
⊂
What symbol is used for improper subsets?
⊆
What is A U B also known as?
Union or Or
What is A ∩ B also known as?
Intersection or And
What are natural numbers:
All whole numbers from 1 to infinity
What are integer numbers:
All whole number positive and negative
What are rational numbers
All numbers that can be written as a fration with a whole numberator and denominator
What are irrational numbers:
All numbers that cannot be written as a fraction with a whole numerator and denominator e.g. sqr(2) and Pi
What are real numbers:
Any number that can be placed on a number line.
What are ordinal Numbers
Ordinal numbers are “position numbers” e.g. 1st, 2nd, 3rd, 4th.
If i had a list {“Dog”, “Cat”, “Horse”, “Mouse”} House is the 3rd ordinal number.
What is the size order of the infinite sets?
All natural number are integers
All integers are rational
All rational numbers are real
What is the empty set?
The set that contains no values represented by:
∅, { }, or φ
What is a finite set?
A set that can be counted
What is an infinite set?
A set that is not finite (Can’t be counted)