Fundamentals of Data Representation Flashcards
What is the name of the number set N and what numbers does it include?
Natural Numbers are postive whole numbers, including zero
What is the name of the number set Z and what numbers does it include?
Integer Numbers are any whole positive or negative number including zero.
What is the name of the number set Q and what numbers does it include?
Rational Numbers are any number that can be expressed as a fraction or ratio of integers
What is the name of the number set Q’ and what numbers does it include?
Irrational Numbers are any numbers that cannot be expressed as a fraction or ratio, as the number is infinite or undefined
What is the name of the number set R and what numbers does it include?
Real Numbers are any positive or negative numbers with or without a fractional part
What are Ordinal Numbers?
Ordinal Numbers are numbers that are used to identify position relative to other numbers
What are Cardinal Numbers?
Cardinal Numbers are numbers that identify the size of something, for example a set.
What is a bit?
A single binary digit
What is a byte?
A group of 8 bits
Name the units in ascending order for Binary Numbers
Kibibyte (Ki) = 2^10
Mebibyte (Mi) = 2^20
Gibibyte (Gi) = 2^30
Tebibyte (Ti) = 2^40
Name the units in ascending order for Deneray (Decimal) Numbers
Kilobyte (KB) = 10^3
Megabyte (MB) = 10^6
Gigabyte (GB) = 10^9
Terabyte (TB) = 10^12
Name the bases for Decimal, Binary and Hexadecimal Numbers
Decimal = Base 10 Binary = Base 2 Hexadecimal = Base 16
What are the steps when converting a decimal number to a hexadecimal number?
1) Convert the number to binary
2) Split the binary numbers into groups of 4
3) Work out each hex digit by adding the decimal weightings together
4) Join together, with leftmost first
What are the steps when converting a hexadecimal number to a decimal number?
1) Split the hex number into each of its individual digits
2) Convert to 4 bit binary numbers
3) Join the binary numbers together
4) Convert to decimal using the new weightings
How would you add unsigned binary?
0+0 = 0 0+1 = 1 1+1 = 0 carry 1 to the left 1+1+1 = 1 carry 1 to the left
How would you multiply unsigned binary?
Same rules as normal multiplication where you start from the rightmost of the 2nd number and add 0 on the end each time you start multiplying a new digit. Then perform binary addition on the numbers you get.
E.g
11011 x
11
———-
11011 + this number is the same as 1 x anything is itself
110110 this is the same but shifted left as 1(0)x anything is itself with a 0 on the end
What is two’s complement?
A signed binary format (the MSB or rightmost bit is always a negative version of itself)
How do you add and subtract two’s complement numbers?
Adding is the same as with unsigned binary
To subtract basically add two numbers together - one of which will be negative e.g
00010100 (20)
11110011 (-13)
—————-
00000111 (7) A bit has overflown here
When is fixed point binary used?
To represent fractional values using a decimal point and the weightings 2^-n
Define character code
A binary representation of a particular letter, number or special character.
What is a Parity bit?
A method of checking binary codes by counting the number of 0s and 1s and checking if there is an odd or an even number and comparing against if either odd or even parity is used.
What is majority voting?
A method of checking for errors by producing the same data several times and checking it is the same each time. If not, it will choose the most common one (the majority).
What is a check digit?
A digit added to the end of binary data to check the data is accurate. (This is calculated through taking the digits that make up the number itself and performing an operation on them)
What is a Caesar cipher?
A substitution cipher where one character of plaintext is substituted for another, which becomes the ciphertext.
Define the term polyalphabet.
Using more than one alphabet
Define the term Frequency Analysis
In cryptography it is the study of how often different letters or phrases are used.
What does the term Transposition Cipher mean?
A type of encryption where the characters are rearranged to form an anagram.
What is a Railfence Cipher?
A type of transposition cipher that encodes the message by splitting it over rows.
What is a Route Cipher?
A type of transposition cipher that encodes the message by placing it into a grid.
What are the steps to encrypt a Vernam Cipher?
1) First create a one-time pad that is as long as the plaintext message.
2) Use a binary representation of the letters in both the key and the plaintext
3) Perform a logical XOR to produce the code for the ciphertext first letter
4) Convert from binary back to characters and repeat for each letter
What is a Vernam Cipher?
A method of encryption that uses a one-time pad (key) to create cyphertext that is mathematically impossible to decrypt without the key.
What is Baudot code?
An older character code than ASCII and Unicode that uses 5 digits.