SLR11 - Number Bases Flashcards
(29 cards)
How is a number’s base shown using subscript?
Unsigned binary only represents positive numbers. Smallest value = 0, largest = 2ⁿ - 1
What is signed binary?
Signed binary uses the MSB as a sign bit:
0 = positive
1 = negative
Used with two’s complement.
What is the maximum value you can store in 8-bit unsigned binary?
255 (from 0 to 255)
Why is the max value in 8-bit unsigned binary 255 and not 256?
Because we start counting from 0. So 256 values, but highest number is 255.
In two’s complement, what is the range for 8 bits?
-128 to +127
Why does two’s complement allow one more negative number than positive?
Because the MSB has negative weight (e.g., -128 in 8 bits), and there’s no +128.
How do you convert a positive denary to binary?
Divide by 2, record remainders, reverse the result.
How do you convert negative denary to binary (two’s complement)?
- Convert absolute value to binary
- Invert the bits
- Add 1
How do you convert binary (two’s complement) to denary?
If MSB is 0 → convert normally
If MSB is 1 →
1. Invert the bits
2. Add 1
3. Convert to denary and add minus sign
What are the binary addition rules?
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 (carry 1)
1 + 1 + 1 = 1 (carry 1)
What are the two possible errors in binary arithmetic?
Overflow: result is too big for available bits
Underflow: result is too small to be stored
How do you detect overflow in binary addition?
If carry out of MSB ≠ carry into MSB
What is fixed point binary representation?
Binary numbers where the binary point is in a fixed position (e.g., 4 bits for integer, 4 for fraction).
Can fixed point binary represent negatives?
Yes, using two’s complement for the integer part.
What are limitations of fixed point?
- Limited range
- Limited precision
- Some fractions like 1/3 can’t be stored accurately
What is floating point binary representation?
A way to represent real numbers using two parts:
Mantissa = actual digits
Exponent = moves the binary point left/right
What is the benefit of floating point over fixed point?
Much wider range, useful for scientific or very large/small numbers.
What does a positive exponent mean in floating point?
Move binary point right → larger number
What does a negative exponent mean in floating point?
Move binary point left → smaller number
In floating point, what does accuracy depend on?
Length of the mantissa
In floating point, what does range depend on?
Length of the exponent
What is absolute error?
Actual value - stored value
What is relative error?
(Absolute error ÷ Actual value) × 100
What is hexadecimal?
Base-16 number system. Digits go from 0–9 then A–F.