Binary Flashcards
Define unsigned binary:
Binary that only represents positive numbers
0+0:
0
0+1:
1
1+1:
0, carry 1
1+1+1:
1, carry 1
Binary multiplication rules:
Multiply the first number by each digit of the second, shifting one left each time. Each result will be 0 or the original number shifted by an appropriate amount. Then add all the results.
Define two’s complement:
A method of working with signed binary values
How does two’s complement work:
The most significant bit is negative, the rest are positive.
How to convert positive numbers to negative ones:
Flip all the digits, then add 1
Binary subtraction rules:
Convert the number being subtracted into a negative number, then add them
Define fixed point:
Where the decimal point is in a fixed position in a number
Where is the decimal point in a fixed point number:
It can be anywhere, it just can’t move so the size of the number is limited by where it is
Define floating point:
Where the decimal point can move within a number
What is the benefit of floating point numbers:
It means less bits are needed, and that a wider range of numbers is available
Define mantissa:
The actual number being represented in floating point, not to the actual power
Define exponent:
What power the mantissa is raised to to give the actual number
If the exponent is positive, what happens to the point:
The point shifts left - the mantissa increases in size
If the exponent is negative, what happens to the point:
The point shifts right - the mantissa becomes smaller
Where is the decimal point in a normalised floating point number:
After the most significant bit of the mantissa
What are floating point numbers equivalent to in decimal:
Standard form
What is the benefit of fixed point numbers:
Less processing is required, so it’s faster and the absolute error is always the same
Define signed binary:
Binary that can represent positive and negative numbers
Define overflow error:
When a number is too big to be represented with the allocated number of bits
Define underflow error:
When a number is too small to be represented with the allocated number of bits