Fundamentals Of Data Representation Flashcards
Natural numbers (N)
Don’t represent negative
Represents whole numbers
(0, 1, 2, 3)
Integer numbers (Z)
Represent both whole and negative numbers
-3, -2, -1, 0, 1, 2
Rational numbers (Q)
Can be written as fractions
( 7/1) =7
Irrational numbers
Cannot be written as a fraction
pie, root 2
Real numbers (R)
Set of all possible real world quantities
Any written number
Ordinal numbers
Tells the position of a list of numbers
{a, b, c, d}
A is the first position
Decimal
67(10)
Binary
10011011(2)
Hexadecimal
AE(16)
Bit
Fundamental unit of information
0, 1
Byte
8 bits
2^n
Number of different values
3 bits = 2^3 = 8 different ways
Binary prefixes
Kibi - 2^10
Mebi - 2^20
Gibi - 2^30
Tebi- 2^40
Decimal prefixes
Kilo - 10^3
Mega - 10^6
Giga - 10^9
Tera - 10^12
Signed numbers
Represents positive and negative numbers
(1001001111)
First digit is 1
Unsigned
Does not represent negative numbers
(0001100111)
First digit is 0
Minimum and maximum value for a given number of bits in unsigned binary
0 and 2^n - 1
Why can fixed point and floating point representation of decimal numbers be wrong
There is a rounding error
Advantage of floating point
Provides a large range
Disadvantage of floating point
Rounds off large numbers which is time consuming
Advantage of fixed point
Numbers are represented with precision
e.g. when money is involved
Disadvantage of fixed point
Provides a limited range