Theory: Data Rep Flashcards
List and define each number system
-N is natural numbers or Z+, positive integers
-Z is all integers, positive and negative
-Q is all rational numbers, numbers that can be represented as a proper/improper fraction Q = {a/b|a,b ∈ Z , b != 0}
-R is the set of real numbers, all rational and irrational numbers, algebraic numbers
-C is complex or imaginary numbers. C ={ a+bi| a,b ∈ R , b != 0}
What set of numbers is used to describe the location of a number relative to another number?
Ordinal numbers
Which number base is used by humans for counting?
Base 10/decimal/denary
Which number base can be denoted with a subscript 16?
Hexadecimal
What is the decimal equivalent of the hexadecimal digit E?
14
Which number base is useful as a shorthand representation for binary?
Hexadecimal
What is the decimal equivalent of the binary number 0101?
5
What is the binary equivalent of the hexadecimal number A3?
10100011
What is the binary equivalent of the decimal number 14?
1110
Describe what is meant by a bit
A bit is the smallest and fundamental unit of information which can either take the value 1 or 0
How many bits are there in a byte?
8
How many bits are there in a nybble?
4
How many nybbles are there in a byte?
2
How many values can be represented with 4 bits?
16, 0-15
How many values can be represented with 20 bits?
2^20= 1048576, 0-1048575
How many bytes are there in a mebibit
2^20 = 1048576
How many bytes in a kibibyte?
2^10= 1024
Describe the uses of hexadecimals.
-third most commonly used number system, large values can be represented using fewer characters. Also easier to interpret than binary.
-colour values
-mac addresses
List the names for bit values and how many bits they represent.
-bit: smallest value, one digit
-nibble: four bits
-byte: eight bits
-(kibibyte
-
In binary multiplication, what are the respective names for the number being multiplied and what it’s being multiplied by?
-multiplicand and multiplier
Describe the concept of two’s complement
Binary numbers beginning with 1 are negative numbers, those beginning with 0 are positive
The range of possible values that can be represented:
Define the Caeser cypher and Polyalphabetic encryption.
A caeser cypher uses a given numerical key eg. 4 and each letter in a message is shifted along the alphabet by that number. Eg A becomes E.
When used with Polyalphabetic encryption, each letter of the message uses a different key.
Is 0 included in the set of natural numbers?
Yes
Every natural number greater than 1 can be written as a product of what?
Prime numbers
Calculate the highest number that can be represented with:
-16 bits
-20 bits
Where n is the number of bits, (2^n)-1
-65535
-1048575
How many bits is a hex digit equivalent to?
4 bits
eg. 1101 =13 = D
Here is an example of a MAC address; b4:f7:a1:8c:8e:d3 what is the length in bits of the mac address?
48 bits
What is the difference between a kilobyte (kB) and a kibibyte (KiB) or a gigabyte (GB) and a gibibyte (GiB)?
Kilobyte, megabyte, gigabyte etc was historically used as a less accurate representation of storage capacity. It uses base ten with the exponent increasing in powers of three to show the number of BYTES in each measurement eg. kB has 10^3 bytes, a megabyte has 10^6 bytes and a gigabyte has 10^9 bytes.
Kibibyte, mebibyte and gibibyte use base two with the exponent increasing in powers of 10 for a more accurate measurement. eg. A Kibibyte has 2^10 bytes, a mebibyte has 2^20 bytes.
How many values can be represented with
-16 bits
-20 bits
Where n is the number of bits, 2^n values can be represented
-65536
-1048576
What is word size?
The maximum number of bits that a CPU can process at one time
Add the unsigned numbers: 01001011 and 01111000
11000011
Revise subtraction with binary, borrowing
Give two situations in which overflow errors caused issues.
- 4th June 1996
A calculation for the sideways velocity of a crewless rocket carrying scientific satellites resulted in an overflow error which initiated a self destruct sequence. £240 mil damage - December 2014
Number of views on gangnam style exceeded the value that could be stored with 32 bits.
What is the place value of the MSB in a two’s complement representation?
-2^n-1 where n is the number of bits
What is 00111010 in denary (2s complement)?
Positive 58
What is 11001010 in denary (2s complement)?
Negative 54
What is 00111100 in denary?
60
Convert 11010101 into denary (2s complement).
-43
Describe the two methods of converting positive two’s complement numbers into.
- flip all bits and add 1
- flip all bits to the left of the least significant 1 (quicker)(don’t flip most significant 1)
Count up in increasing powers of 2 until 2^12
2^0 = 1
2^1 = 2
2^2 = 4
2^3= 8
2^4=16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512
2^10 = 1024
2^11 = 2048
2^12= 4096
Convert positive 25, 00011001 to -25.
11100111
How do you know the smallest number that can be stored in 2s complement?
Just the MSB place value. Eg. For eight bits the smallest number is -128
Using sign and magnitude, what number is 10011110?
-30 (first one just tells us the number is negative)
What is a downside of using sign and magnitude?
There is a positive and a negative value for 0, eg. 10000000 or 00000000
How to calculate the range of values when using two’s complement?
Both the negative and the positive values.
What is the range of denary values that can be represented using 16 bit twos complement?
-32768—–>65535
-2^15 to (2^16)–1
What does the binary weighting line look like for decimal values?
2^-1, 2^-2, 2^-3 etc
Where n is the number of bits, state what the formula is used to calculate.
2^n
(2^n)-1
2^n = number of bit patterns
(2^n)-1= highest representable number
2^n-1
Where n is the number of bits, state what the formula is used to calculate.
2^n
(2^n)-1
2^n = number of bit patterns
(2^n)-1= highest representable number
2^n-1
Define the set of natural numbers
Symbol: N , Set of numbers containing all positive whole numbers and zero
Define the set of Integers
Symbol: Z , Set of positive and negative whole numbers
Define the set of rational numbers
Symbol: Q (quotient) , Set includes positive or negative numbers that can have a fractional part (includes 0) eg 71 can be written 71/1.