1.4.1

Cards (52)

  • What are the primitive data types listed in the OCR Computer Science A Level specification?
    Integer, Real, Character, String, Boolean
  • Why is it essential to use the correct data type when writing a program?
    To ensure that the right operations can be performed on the data
  • What is an integer?
    A whole number that cannot have a fractional part
  • What are real numbers used for?
    Measuring things
  • What values can a Boolean data type take?
    True and False
  • How do computers represent whole numbers?
    Using binary
  • What is a bit?
    A single binary digit
  • How many bits are in a byte?
    Eight bits
  • What does the least significant bit represent in a binary number?
    The value of 1
  • What is the first step to convert a decimal number to binary?
    Find the largest power of two smaller than the number
  • What are the four rules for binary addition?
    0 + 0 = 0, 0 + 1 = 1, 1 + 0 = 1, 1 + 1 = 10
  • How does two's complement simplify binary arithmetic?
    It allows subtraction to be performed as addition of a negative number
  • How do you convert the binary number 0111 to two's complement?
    Flip the bits and add one to get 1001
  • What is hexadecimal?
    A base 16 number system
  • What characters are used in hexadecimal to represent values 10 to 15?
    A to F
  • How do place values in hexadecimal work?
    They start with \(16^0\) and go up in powers of 16
  • What are the methods for representing negative numbers in binary?
    • Sign Magnitude
    • Two's Complement
  • What are the steps for converting from decimal to binary?
    1. Find the largest power of two smaller than the number.
    2. Write out place values in powers of two.
    3. Place 1s and 0s to sum to the decimal number.
  • What are the steps for converting from binary to decimal?
    1. Identify the place values of each bit.
    2. Multiply each bit by its place value.
    3. Sum the results to get the decimal equivalent.
  • What are the rules for binary subtraction using two's complement?
    1. Convert the number to be subtracted to two's complement.
    2. Add the two's complement to the original number.
    3. Read the result as a binary number.
  • What is the significance of leading zeros in binary representation?
    • They do not affect the value of the number.
    • They are used to represent a whole number of bytes.
  • What is the process of normalizing floating point numbers in binary?
    1. Adjust the binary number to fit the format.
    2. Ensure the leading digit is 1.
    3. Shift the binary point to the right.
  • What are the operations that can be performed on floating point numbers?
    • Addition
    • Subtraction
    • Handling positive and negative numbers
  • What is bitwise manipulation?
    • Operations that directly manipulate bits.
    • Includes shifts and combining with AND, OR, and XOR.
  • How are character sets used to represent text?
    • ASCII: Represents characters using 7 bits.
    • Unicode: Supports a wider range of characters.
  • What is the minimum number of bits required to represent -12 in two's complement?
    Five bits
  • What base is hexadecimal?
    Base 16
  • Which characters are used in hexadecimal to represent values 10-15?
    1. F
  • What are the place values in hexadecimal?
    • Starts with 1 (16<sup>0</sup>)
    • Increases in powers of 16
  • What is a binary nybble?
    A nybble is four bits, or half a byte
  • What is one method to convert from hexadecimal to decimal?
    Convert to binary first, then to decimal
  • What are the two parts of floating point numbers in binary?
    Mantissa and exponent
  • What does the mantissa represent in floating point notation?
    The significant digits of the number
  • How is the binary point treated in the mantissa?
    It is placed after the most significant bit
  • How do you convert the exponent in floating point notation to decimal?
    Using the method explained earlier
  • What happens to the binary point when combining the mantissa and exponent?
    It is moved according to the exponent value
  • What is the purpose of normalisation in floating point numbers?
    To provide maximum precision for a given number of bits
  • How do you normalise a floating point number?
    Adjust the mantissa to start with 01 or 10
  • What must be done before adding floating point binary numbers?
    The exponents must be the same
  • How do you perform floating point addition?
    Add the mantissas after ensuring the exponents are the same