Paper 2

Cards (377)

  • Number Systems
    • N: Natural Numbers
    • Z: Integers
    • Q: Rational Numbers
    • R: Real Numbers
    • Ordinal Numbers
  • Natural Numbers
    Positive integer or nonnegative integer (some people choose to include zero while others do not)
  • Integers
    Numbers which can be represented without a fractional or decimal part. The natural numbers are a subset of the integers.
  • Rational Numbers
    Numbers which can be represented as a fraction. Irrational numbers such as π are numbers which cannot be represented as a fraction
  • Real Numbers
    Set including all natural, rational and irrational numbers
  • Ordinal Numbers
    Indicate the numerical position of objects – 1st, 2nd etc.
  • Number Bases
    • Denary: Base 10
    • Binary: Base 2
    • Hexadecimal: Base 16
  • Denary
    Base 10 – makes use of '0' to '9'
  • Binary
    Base 2 – makes use of '0' and '1'
  • Hexadecimal
    Base 16 – makes use of '0' to '9' and 'A' to 'F'
  • Denary to Binary conversion
    Find the largest 2^n that would fit into the number and then subtract this from the original number. From here, look at all possible 2^n-x where n-x >= 0, putting a 0 if it would not fit in what is left of the number or a 1 if it would, then subtracting this from the number.
  • Binary to Denary conversion
    Using the multipliers of each column, add up the values to find the original number
  • Binary to Hexadecimal conversion
    Look at each nibble (four bits) of the number separately, converting each into hex, (largely through converting through denary) then combining each hex equivalent of each nibble to form one complete hexadecimal number.
  • Hexadecimal to Binary conversion
    Convert each hexadecimal digit directly into a nibble, converting through denary, then recombining the value afterwards.
  • Denary to Hexadecimal conversion

    Follow the same process as for denary to binary just for 16 as opposed to 2.
  • Hexadecimal to Denary conversion
    Using the multipliers of each digit, add up the values to find the original number.
  • Hexadecimal Advantages
    • Used to represent binary since it can represent a byte in only two digits rather than the eight required if binary were to be used.
    • Easy for technicians and computer user to remember hexadecimal digits.
    • Easy to convert to and from raw values on the computer, since binary can be easily converted to hex.
  • Terminology
    • Bit
    • Byte
    • Nibble
  • Bit
    Fundamental piece of information – a single 1 or 0
  • Byte
    Set of eight bits
  • Nibble
    Set of four bits
  • Signed Integers
    Binary can represent both positive and negative numbers
  • Unsigned Integers

    Binary can only represent nonnegative integers
  • Unit Nomenclature
    • Mebi Mi 220
    • Tebi Ti 240
    • Exbi Ei 260
    • Yobi Yi 280
    • Kilo K 103
    • Giga G 109
    • Peta P 1015
    • Zetta Z 1021
  • ASCII (American Standard Code for Information Interchange) is the standard manner for representing the characters on a keyboard
  • ASCII originally only used 7 bits, but there was an increase into an 8 bit version to attempt to include more characters such as those in foreign languages
  • Unicode (UTF-16 and UTF-32) have all the possible characters that could be needed, but the first 128 characters were the same as those in ASCII to ensure there was complete compatibility
  • Important ASCII Characters

    • ''=32
    • '0'=48
    • 'A'=65
    • 'a'=97
  • Two's Complement
    A system where the most significant bit of the sum indicates whether the number is positive or negative, while the rest of the system determine the value of it. The range that can be given by a two's complement number is hence: −(2^n) to 2^(n-1) - 1 (where n is the number of bits used)
  • Converting Denary to Two's Complement
    1. Denary = -10
    2. Binary of 10 = 0000 1010
    3. FLIP the bits = 1111 0101
    4. Add one = 1111 0110
  • Converting Two's Complement to Denary
    1. Two's complement = 1110 0101
    2. FLIP the bits = 0001 1010
    3. Add one = 0001 1011
    4. Therefore, positive denary = 1+2+8+16=27
    5. Therefore, original was -27
  • The binary system continues from 2^0 to 2^-1 (0.5) etc, hence allowing us to represent decimals
  • Many decimals would require infinite bits to represent them in binary, such as 0.2 and 0.3
  • Converting decimal to fixed point binary
    Attempt to find the largest 2^n that would fit in the decimal before moving further to lower n, until the entire decimal has been represented in the binary using 2^n + 2^m...
  • Floating Point Numbers
    Another way of representing fractions
  • Rounding Error
    An important problem with both floating point and fixed point numbers is that they cannot necessarily be represented in binary. Some numbers, such as 0.1, simply cannot be represented as a string of binary numbers.
  • Absolute error

    The difference between the number to be represented and actual representation
  • Relative error

    The absolute error divided by the number, may be expressed as a percentage
  • Floating Point Binary Numbers

    Made up of three parts: the sign bit, the mantissa and the exponent
  • Converting floating point number to decimal
    The number must be translated to the correct binary, by shifting it the requisite number of places, before converting it to denary