Cards (17)

  • Contents of this TOPIC
    • Representation of numbers
    • Storage of characters
    • Representation of graphics and sound
  • Denary
    Base 10 or decimal counting system
  • Binary
    Base 2: computer systems can only store and process Binary digITs, also known as BITs. A BIT is either a 1 or 0.
  • Hexadecimal
    Base 16: 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. The hexadecimal system is widely used as binary numbers can be quickly converted into hexadecimal numbers that are more convenient for humans to use.
  • Arithmetic shift functions
    1. Shifting the position of the bits stored is very fast and much faster than the actual arithmetic operation for a computer
    2. Left shift (multiplying): e.g. 0011002 (1210) shifted one place left gives 0110002 (2410), equivalent to multiplying by 2
    3. Right shift (dividing): e.g. 0011002 (1210) shifted one place right gives 0001102 (610), equivalent to dividing by 2
  • Binary addition
    1. 0 + 0 = 0
    2. 1 + 0 = 1
    3. 0 + 1 = 1
    4. 1 + 1 = 0 (carry 1 to next column)
    5. 1 + 1 (and carrying from last column) = 1 (carry 1 to next column)
  • Overflow
    If the result of an addition or shift process results in a binary number that is too large to fit in the space available then an overflow has occurred. The CPU detects the carry and sets the overflow flag to true.
  • Characters are typically represented using binary code. The most common encoding scheme is ASCII.
  • ASCII
    A basic character encoding standard using 7 or 8 bits to represent 128 or 256 characters, mainly covering English letters, numerals, and symbols.
  • Unicode
    A modern character encoding standard using 16 bits or more for a broader character set, supporting characters from various languages.
  • Common data types
    • Integer
    • Real (float)
    • Boolean
    • Character
    • String
  • Integer
    Stores whole numbers, can be positive or negative
  • Real (float)

    Stores decimal numbers
  • Boolean
    Can only store one of two values - yes/no, true/false, 0/1
  • Character
    Stores a single character - can be text, number or symbol
  • String
    Can store any sequence of alphanumeric characters including text, numbers and symbols
  • Integers are used for storage space and processing speed reasons