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
- 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 error 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