5.4 Binary Number Systems Flashcards
How do you work out the range of unsigned numbers for n bits?
there are 2^n possible permutations. Giving a range of 0 to 2^n - 1.
What’s the difference between signed and unsigned binary?
Unsigned binary values can only be used to represent positive numbers whilst signed binary can be used to represent both positive and negative numbers.
How do you add 2 unsigned binary numbers?
Place the 2 binary numbers above each other so they line up. Then add the values in each column and put the value below. If the the value is more than 1 carry the digit to the next column. Then the finally result is on the bottom row.
How do you multiply 2 unsigned binary numbers?
Write out one of the two numbers starting under each occurrence of a 1 in the second number and then add the contents of the columns.
What coding scheme does AQA use for signed binary?
Two’s complement
How do you subtract using two’s complement?
You have to add the 2 numbers. Using the adding binary technique.
How do you work the range of signed binary numbers for n bits?
The range is 2^n-1 to - 2^n-1
What are the 2 ways a fraction can be represented in binary
Floating point and fixed point
how does a fixed point fractional part work?
A specified number of bits are placed before a binary point and the remaining bits fall behind that point. The columns behind the point start at 1/2.
True or false, will the mantissa and an exponent be in twos complement in floating point binary?
True
How do you convert floating point into decimal?
First convert the exponent to decimal. Next, as if there was a binary point between the first and second digits of the mantissa move point the number that the exponent gives to the right. Then treat it like a normal fixed point number.
How do you convert decimal to floating point?
First convert the number to fixed point binary. Move the binary point between the first occurrence of 0 and 1 (for positive) and 1 and 0 (for negative). The amount the decimal point has moved becomes the exponent. Calculate the final answer.
Why do rounding errors occur in binary?
Rounding errors occur because there are some decimal values that cannot be exactly represented exactly in binary
What is a relative error?
A relative error is a measure of uncertainty in a given value compared to the actual value which is relative to the size of the given value.
How do you calculate aa relative error
absolute error
Relative error = ———————– * 100
Actual value
Challenge the advantages and disadvantages of Fixed points against floating points.
Floating point allows for the representation of a greater range of numbers.
because the floating point exponent can be either positive or negative.
A large exponent and small mantissa allows for a large rand but little precision and vice-versa.
When does Underflow occur?
Underflow occurs when very small numbers are to be represented but there are not enough bits available.
When does overflow occur?
Overflow occurs when a number is too large to be represented with the available bits.