4.5 Fundamentals of Data Representation Flashcards
Natural Numbers
All positive integers starting and including 0
Ordinal Numbers
Used to tell the position of a number that is placed in an order
Counting and Measurement
Counting = Natural Numbers
Measurement = Real Numbers
Hex vs Binary (3)
- Hex is easier to code/read/enter/spot errors/remember
- less change of human error
- less digits in hex: 2 in hex vs 8 in binary
The Bit (definition)
The fundamental unit of information
n bits can represent – values
2^n
Prefixes
- Powers of 10 prefixes:
- Kilo, K - 10^3
- Mega, M - 10^6
- Giga, G - 10^9
- Tera, T - 10^12
- Powers of 2 prefixes:
- Kibi, Ki - 2^10
- Mebi, Mi - 2^20
- Gibi, Gi - 2^30
- Tebi, Ti - 2^40
Signed vs Unsigned Binary
Unsigned = cannot represent -ve numbers
Signed = range of magnitude decreases
Binary Subtraction (3)
- Convert w/ 2’s complement (flip +1)
- Add numbers together
- Discard overflow
Decimal Numbers (2)
- Not accurate - close as possible, not over
- More bits available = greater precision
Error Calculations
- Absolute error = original - binary
- Relative error = absolute/original
- Percentage error = relative x 100%
Normalised Binary (5)
- +ve starts with
- -ve start with
- Parts
- +ve: start with 0.1
- -ve: start with 1.0
- Mantissa = main value
- Exponent = power
- Starts with 1 if -ve
Advantages of Normalised Binary (3)
- Maximise precision
- Better accuracy
- Unique representation of each number (distinguish +ve and -ve)
Character Sets (2)
- Every number, letter, symbol you can type has an ASCII code associated to it
- Globally recognised, uniform
ASCII (3)
- English alphabet
- Lower, upper, nums, some symbols
- 7 bits = 128 possibilities
Unicode (2)
- ASCII + all alphabets, symbols, emojis
- Use ASCII until character is only in Unicode
Parity Bit (3)
- Bit added to end of string of binary
- Ensures total num 1 bits is even/odd
- Simplest form of error checking
Advantages of Parity Bits (3)
- little storage
- less to process
- easy to make
Disadvantages of Parity Bits (3)
- can’t detect multiple errors
- doesn’t fix errors
- not very reliable
Majority Voting (2)
- Bits can change due to interference
- Each bit transmitted x3 - most common chosen
Advantages of Majority Voting (4)
- detects multiple errors
- fixes errors
- easier to make
- very reliable
Disadvantages of Majority Voting (2)
- more storage
- more to process
Check Sums Process (5)
- Data sent in block of several bytes
- Bytes added up
- Result transmitted with data
- Receiver works out checksum
- Data accepted if they match