4.5.4 Binary Number System Flashcards
What are the two kinds of binary numbers?
Signed
Unsigned
What are unsigned binary numbers?
Unsigned binary numbers can only represent positive numbers.
What does signed binary allow for?
Signed binary allows for the representation of negative numbers using binary.
What does the range of numbers that can be represented by unsigned binary number depend on?
The range of numbers that can be represented depends on the number of bits available.
What is the pattern to the range of numbers that can be represented?
For n bits, there are 2^n possible permutations of the bits, giving a range of decimal numbers from 0 to (2^n) - 1
What does twos complement allow for?
The representation of both positive and negative numbers in binary.
How does two’s complement work?
• The most significant bit of a number is given a negative place value.
What is the range of two’s complement numbers?
Given a certain number of bits, the range of two’s complement signed binary number includes both positive and negative values.
What is the range of two’s complement numbers?
The range of a two’s complement signed binary number:
2^(n-1)) - 1 to -2^(n-1
What are the two means of representing binary numbers with a fractional part?
- Fixed point form
* Floating point form
How does fixed point work?
The specified number of bits are placed before a binary point and the remaining bits fall behind the binary point.
Why may fixed point and floating point representations of decimal numbers be inaccurate?
There are many numbers that binary cannot accurately represent, there are some numbers which binary can only approximately represent.
Why may you use absolute and relative errors?
In order to see how close a particular number is to an actual value.
What is an absolute error?
Is the actual amount by which a value is inaccurate and can be calculated by finding the difference between the given value and the actual value
What is relative error?
A measure of uncertainty in a given value compared to the actual value, which is relative to the size of the given value.
What is the formula for the relative error?
Absolute error / Actual Value = Relative error
What is absolute error calculated?
The difference between the given value and the actual value.
How may you get the percentage from the relative error?
( Absolute error / Actual value ) x 100
Absolute error = difference between given value and actual value
What is the advantage of floating point?
• Representation of a greater range of numbers with a given number of bits than fixed point, floating point can take advantage of an exponent which can be either positive or negative.
What affects the number of numbers that can be represented?
The number bits allocated to each part of a floating point number.
- A large exponent and a small mantissa allows for a large range but little precision
- A small exponent and a large mantissa allows for good precision but only a small range.
What does a large exponent and a small mantissa allow for?
Large range, little precision
What does a small exponent and large mantissa allow for?
Good precision, but only a small range
What determines the range and precision of numbers that can be represented in fixed point notation?
Placement of the binary point.
What does a binary point close to the left of the number in fixed point indicate?
Good precision, but with a small range of numbers.
What does a binary point close to the right in fixed point indicate?
An increase in the range, while decreasing precision.
What is the purpose of normalisation?
- To provide the maximum level of precision for a given number of bits.
- Involves ensuring that the floating point number starts with 01 for a positive number, or 10 for a negative number.
When does underflow occur?
When very small numbers are to be represented, but there are not enough bits available.
When does overflow occur?
When the number is too large to be represented with the available bits.