Data Representation Flashcards
What is hex used for?
- addresses in memory
-error message codes
-machine language instructions
-HTML colour codes
Why is hex used?
- easy to convert between hex and binary
- easier to understand than a long string of binary
- numeric representation of a value is more compact
- likelihood of making an error when copying hex is lower than binary equivalent
What is unsigned binary?
Where each bit used represents another binary column
What is signed binary?
The sign bit is used to show whether the number is positive or negative
What is the MSB?
“Most Significant Bit” which is the left-most bit, also known as the sign bit
What is an overflow error?
Result of binary operation is too large to represent within the number of bits available
How do you perform 2’s compliment on a number to make it negative?
1-Write out number in binary
2-Flip all the bits
3-Add one
What is fixed point binary?
Consists of a whole part and fractional part separated by predetermined fixed binary point
What is a radix point?
Character used to separate the integer and fractional parts of a number
What two parts do floating point numbers consist of?
A mantissa and an exponent
What is normalisation of floating point numbers?
Process of maximising the precision of values that can be represented with a given number of bits in floating point binary.
What are the benefits of normalisation?
- Ensure the maximum possible accuracy for a given number of bits
- Reduces rounding errors
- Ensures only one representation of each number within a given number of bit; simplifies arithmetic operations
What is the absolute error for floating point numbers?
Difference between number and approximate value of the floating point binary representations of that number. Always positive.
What is relative error of a floating point number?
Absolute error divided by the actual number, as a percentage. This is often more useful.
What is under flow of fractional numbers?
Result of a calculation has a fractional part too small to represent in the allocated number of bits.
What are the advantages and disadvantages of floating point binary?
+ Much wider range of numbers for a given number of bits
+ More relative precision for smaller numbers
- Can result in rounding errors
- More difficult to perform calculations (slower)
What are the advantages and disadvantages of fixed-point binary?
+ processed more quickly as there is no movement of the binary point
+ Hardware required is much less complicated making it smaller and less energy intensive
- Fixed and limited precision
- Could cause rounding errors
What are the causes of overflow?
- Multiplying or adding large numbers together
- Dividing numbers by a small number less than 1
What are the causes of underflow?
- Multiplying by a number by a very small number less than 1
- Dividing a small number by a number greater than 1
What are the consequences of underflow or overflow of binary numbers?
- Erroneous calculations
- Data corruption
- Program crashes
How is underflow or overflow dealt with?
Checking the carry at the MSB and LSB (right and left) and setting a “flag” to state an overflow has occurred.
What is a number system?
Way of representing numerical values that are used in counting, measuring, and operations
What are ordinal numbers?
Adjectives that describe the numerical position or order of an item within a list (indexing). There must be an ordered set with at least 2 items.
What is a character?
Single unit of textual information
What is a character set?
Scheme of mapping that maps a set of characters to binary numbers that is recognised by a computer system
What is ASCII?
A character set created to encode alphanumeric characters as well as special characters that used 7 bits to store each character
What is Unicode?
- A character set developed with the aim of representing every possible character.
- It uses up to 48 bits to store each character
- First 128 characters are the same as ASCII making it backwards-compatible
Advantages of parity bits?
- Simplest implementation of error detection
- Very low cost system as it only involves one additional bit.
How does the parity bit work?
- The decision over odd parity or even parity is made
- The value of the parity bit is set to either 1 or 0 to satisfy the system
- The data is transmitted,parity checked, and then removed
What were the limitations of ASCII?
- Could not represent more than 128 or 256 characters
- Resulted in different version that contained different symbols for each language and were incompatible with each other
What are the advantages of the parity bit?
- Relatively easy to implement
- Does not require significant extra data to be included in the transmission or retrieval
What are the disadvantages of the parity bit?
- If and even number of transpositional errors occurs the corruption is not detected
- Not possible to identify which bit has been corrupted
- Data correction not possible
What is majority voting?
Each bit is sent multiple times (odd number greater than 2). The receiver checks the bits and if they are not all the same it assumes the one to received the most copies of is the correct value.
What are the advantages of majority voting?
- Allows for error correction as it knows exactly where the error occurred
- No need for retransmission
What are the disadvantages of majority voting?
- Triples the amount of data that is sent or stored
- Is not entirely reliable as 2 transpositional errors can cause an incorrect correction
What is a check digit?
Extra digit appended to a number in order to confirm that the number has been transmitted or retrieved correctly
What is a checksum?
Similar to a check digit except a larger sum is transmitted with the data rather than a single digit