Skip to content
Marlbridge

Flashcards · 9645 · AS Topic 5

Representing data (AS Level) flashcards

10 cards on AS Topic 5. Pick a subtopic or study them all.

Study mode needs JavaScript. Every card is listed below, so you can still cover the answers and test yourself.

All 10 cards

For a quick read-through or printing. Cover the right-hand side to test yourself.

Topic 5: Representing data

What range can n bits represent unsigned and in two's complement?
Unsigned: 0 to 2ⁿ − 1. Two's complement: −2ⁿ⁻¹ to +2ⁿ⁻¹ − 1. For 8 bits: 0 to 255, or −128 to +127.
Binary vs decimal prefixes
Binary: Ki = 2¹⁰, Mi = 2²⁰, Gi = 2³⁰, Ti = 2⁴⁰. Decimal: k = 10³, M = 10⁶, G = 10⁹, T = 10¹².
How do you subtract using two's complement?
a − b = a + (the two's complement of b). Ignore any carry out of the leftmost bit.
What are the mantissa and exponent of a floating point number?
The mantissa holds the significant digits; the exponent is the power of 2 the mantissa is multiplied by. Value = mantissa × 2^exponent.
Why normalise a floating point number?
Each value then has one unique representation, and no mantissa bits are wasted on leading 0s (or 1s), so precision is as high as the format allows.
Overflow vs underflow
Overflow: a result too large to be represented in the available bits. Underflow: a result so close to zero that its closest representation is zero.
Absolute vs relative error
Absolute error: the stored value minus the true value, ignoring sign. Relative error: the absolute error divided by the true value.
What does the Nyquist theorem say?
The sampling rate must be at least twice the highest frequency in the signal.
Perfect security vs computational security
Perfect security (e.g. the Vernam cipher): nothing can be learned about the plaintext from the ciphertext. Computationally secure: cracking it takes an unfeasible time or has a very low chance of success.
Where do the ASCII codes for digits, upper-case and lower-case letters start?
Digits from 48, upper-case letters from 65 and lower-case letters from 97. ASCII is a 7-bit code with 128 characters.