4.1 Data Types (OCR A Level Computer Science) Flashcards

Exam code: H446

1/109

0Still learning

Know0

  • Define character set.

Cards in this collection (109)

  • Define character set.

    A character set is a list of all characters and their associated binary codes, used to standardise the representation of characters in computers.

  • Why are character sets important in computer systems?

    Character sets ensure that binary codes are interpreted consistently across different hardware and software, preventing misinterpretation of data.

  • What is ASCII?

    ASCII (American Standard Code for Information Interchange) is a character encoding system that uses 7 bits to represent 128 characters.

  • What is the binary representation of the character 'A' in standard ASCII?

    In standard ASCII, 'A' is represented by 1000001 in binary.

  • True or False?

    Standard ASCII can represent characters from all world languages.

    False.

    Standard ASCII is limited to 128 characters and cannot represent characters from languages other than English.

  • The extended version of ASCII uses     bits per character, allowing for     characters.

    The extended version of ASCII uses 8 bits per character, allowing for 256 characters.

  • What is Unicode?

    Unicode is a character encoding system that uses up to 32 bits per character, allowing representation of characters from many languages and scripts worldwide.

  • How does using Unicode impact storage requirements compared to ASCII?

    Unicode can require up to 32 bits per character, which uses more storage than ASCII’s 7 bits per character.

  • List one benefit and one drawback of using Unicode compared to ASCII.

    A benefit of Unicode is that it can represent characters from many languages.

    A drawback is that it uses more storage space than ASCII.

  • ASCII uses     bits and can represent     characters, while Unicode can use up to      bits and represent many more.

    ASCII uses 7 bits and can represent 128 characters, while Unicode can use up to 32 bits and represent many more.

  • True or False?

    Unicode can represent special characters such as emojis, but ASCII cannot.

    True.

    Unicode supports a wide range of characters including emojis, while ASCII is limited to 128 basic characters.

  • Define data type in computing.

    A data type is a classification that specifies which type of data a variable can hold, such as integer, real, char, string, or boolean.

  • A       is used to represent whole numbers, while a      represents numbers with fractional parts.

    A integer is used to represent whole numbers, while a real represents numbers with fractional parts.

  • What is casting in programming?

    Casting is the process of converting one data type to another in a program, such as turning a string into an integer.

  • What is sign and magnitude in binary representation?

    Sign and magnitude is a method for representing positive and negative binary numbers where the most significant bit indicates the sign and the remaining bits represent the magnitude.

  • How do you determine if a sign and magnitude binary number is positive or negative?

    The number is positive if the MSB is 0, and negative if the MSB is 1.

  • Define bit.

    A bit is the smallest unit of digital information, representing either an "off" (0) or an "on" (1) state.

  • What is the value represented by the leftmost digit in an 8-bit binary number?

    In an 8-bit binary number, the leftmost digit represents the value 128, which is 2 to the power of 7.

  • A     is made up of    bits, and groups of bits allow us to represent more        .

    A byte is made up of 8 bits, and groups of bits allow us to represent more complex information.

  • True or False?

    In computers, binary values can be interpreted as text, images, or sound through different encoding schemes.

    True.

    Encoding schemes like ASCII for text or JPEG for images allow binary values to be interpreted as different types of information.

  • Define denary numbers.

    Denary numbers are the base-10 number system, used by humans, and consist of digits 0 to 9.

  • Define binary numbers.

    Binary numbers are the base-2 number system, using only the digits 0 and 1, commonly used by computers to store data.

  • Why do computers use binary numbers to store data?

    Computers use binary numbers to store data because their circuits and switches have two states: on (1) and off (0).

  • The 8-bit binary number 01101001 can be converted into denary using place values. Its denary value is     .

    The 8-bit binary number 01101001 can be converted into denary using place values. Its denary value is 105.

  • Define denary number system.

    The denary number system is a base-10 number system that uses digits from 0 to 9.

  • What is the binary representation of the denary number 101?

    The binary representation of the denary number 101 is 01100101.

  • To convert a denary number to binary, we start by writing out the binary number system values:            ,         , 32, 16, 8, 4, 2, 1.

    To convert a denary number to binary, we start by writing out the binary number system values: 128, 64, 32, 16, 8, 4, 2, 1.

  • True or False?

    When converting from denary to binary, a 1 is placed in the binary column if the column value is greater than the current remainder.

    False.

    A 1 is placed in the binary column only if the column value is less than or equal to the current remainder when converting from denary to binary.

  • Define signed binary number.

    A signed binary number is a binary number that can represent both positive and negative values.

  • What is the purpose of the Most Significant Bit (MSB) in signed binary numbers?

    The Most Significant Bit (MSB) in signed binary numbers indicates whether the number is positive (MSB is 0) or negative (MSB is 1).

  • Unsigned binary numbers are used to represent            , while signed binary numbers can represent both         and         values.

    Unsigned binary numbers are used to represent positive, while signed binary numbers can represent both positive and negative values.

  • True or False?

    Both sign & magnitude and two's complement use the MSB to indicate the sign of a binary number.

    True.

    In both sign & magnitude and two's complement, the Most Significant Bit (MSB) represents the sign: 0 for positive and 1 for negative.

  • Define sign and magnitude binary number.

    A sign and magnitude binary number is a binary number where the most significant bit (MSB) represents the sign (0 for positive, 1 for negative) and the remaining bits represent the magnitude.

  • To convert a sign and magnitude binary number to denary, convert the magnitude as normal, then apply the       at the end.

    To convert a sign and magnitude binary number to denary, convert the magnitude as normal, then apply the sign at the end.

  • True or False?

    Using a sign bit to represent negative numbers reduces the maximum positive value that can be stored.

    True.

    The MSB is used for the sign instead of value, so the maximum positive value is halved compared to unsigned binary.

  • Define two's complement.

    Two's complement is a method for representing negative binary numbers by inverting the bits of the positive number and adding one.

  • What is the purpose of the most significant bit (MSB) in two's complement representation?

    In two's complement, the MSB represents the negative starting point of the number, and the remaining bits count upwards from that value.

  • To convert a positive binary number to its two's complement negative equivalent, you must         the bits and     one.

    To convert a positive binary number to its two's complement negative equivalent, you must invert the bits and add one.

  • True or False?

    Calculations using two's complement numbers are less computationally intensive than using sign and magnitude representation.

    True.

    Two's complement allows for simpler arithmetic operations, making calculations less computationally intensive compared to sign and magnitude.

  • Define binary addition.

    Binary addition is the process of summing numbers in base-2, using only the digits 0 and 1, moving from right to left and carrying over when the sum in a column is greater than 1.

  • What happens if the sum of a binary column is greater than 1?

    If the sum of a binary column is greater than 1, the excess is carried over to the next left column.

  • In binary addition, if the sum of a column is more than    , you must         the extra to the next column on the left.

    In binary addition, if the sum of a column is more than 1, you must carry over the extra to the next column on the left.

  • True or False?

    Overflow in binary addition can cause the sign of the result to change when using signed numbers.

    True.

    In signed number representations, overflow can flip the sign bit, incorrectly changing the sign of the result.

  • Define two's complement.

    The two's complement is a method used to represent negative binary numbers and to perform binary subtraction by adding the two's complement of the number to be subtracted.

  • What is the main advantage of using two's complement for binary subtraction?

    The main advantage of using two's complement for binary subtraction is that subtraction can be performed as an addition operation, which simplifies the design of digital circuits.

  • To subtract a binary number using two's complement, first        all the bits of the number to subtract, then add to it.

    To subtract a binary number using two's complement, first invert all the bits of the number to subtract, then add 1 to it.

  • True or False?

    When subtracting binary numbers using two's complement, the overflow bit should be included in the final answer.

    False.

    When using two's complement to subtract binary numbers, the overflow bit is ignored and not included in the final answer.

  • Define hexadecimal.

    A hexadecimal number is a base-16 system that uses the digits 0-9 and the letters A-F.

  • What is one main advantage of using hexadecimal instead of binary for humans?

    Hexadecimal is more concise and easier for humans to read and write, since each hexadecimal digit represents four binary bits.

  • True or False?

    Hexadecimal numbers use the digits 0-9 and the letters G-L.

    False.

    Hexadecimal uses the digits 0-9 and the letters A-F, not G-L.

  • Hexadecimal values are commonly used to define        because they can represent very large binary numbers more concisely.

    Hexadecimal values are commonly used to define colours because they can represent very large binary numbers more concisely.

  • Define hexadecimal lookup table.

    A hexadecimal lookup table is a reference chart used to quickly convert between denary, binary and hexadecimal values.

  • In hexadecimal, the denary number 10 is represented as     .

    In hexadecimal, the denary number 10 is represented as A.

  • True or False?

    In the hexadecimal system, after 9 the next digit is 10.

    False.

    In hexadecimal, after 9 the next digit is A, not 10.

  • Define subscript in number representation.

    A subscript in number representation indicates the base of a number, helping to differentiate between number systems such as binary, denary, and hexadecimal.

  • What is the hexadecimal equivalent of the denary number 241?

    The hexadecimal equivalent of the denary number 241 is F1.

  • To convert a denary number to hexadecimal, first convert it to      , then split it into      of 4 bits.

    To convert a denary number to hexadecimal, first convert it to binary, then split it into nibbles of 4 bits.

  • Define nibble.

    A nibble is a group of 4 bits in binary, often used when converting binary to hexadecimal.

  • True or False?

    The hexadecimal digit 'F' represents the denary value 15.

    True.

    In hexadecimal, F corresponds to the denary value 15.

  • What is the hexadecimal equivalent of the binary number 11010101?

    The hexadecimal equivalent of 11010101 is D5.

  • To convert a binary number to hexadecimal, split the binary into         of four bits each.

    To convert a binary number to hexadecimal, split the binary into nibbles of four bits each.

  • Define nibble.

    A nibble is a group of four bits in binary, often used to represent a single hexadecimal digit.

  • True or False?

    Each hexadecimal digit corresponds to exactly four binary digits.

    True.

    Each hexadecimal digit can be directly mapped to a nibble (four binary digits).

  • What is the binary equivalent of the hexadecimal number B2?

    The binary equivalent of the hexadecimal number B2 is 10110010.

  • To convert a hexadecimal number to binary, split it into two digits and convert each to a       .

    To convert a hexadecimal number to binary, split it into two digits and convert each to a nibble.

  • Define nibble.

    A nibble is a group of 4 bits in binary, often used to represent a single hexadecimal digit.

  • True or False?

    Converting hexadecimal B2 to binary involves converting each digit to a nibble and joining them to form a byte.

    True.

    Each hexadecimal digit is converted to a 4-bit nibble, and the two nibbles are joined to make a byte.

  • Define floating point binary.

    Floating point binary is a method of representing real numbers in binary form, allowing for both fractional and whole-number components, and enabling efficient representation of very large or very small values by adjusting the floating point.

  • What are the two main components of a floating point number in binary?

    The two main components of a floating point number are the mantissa, which holds the actual digits and represents precision, and the exponent, which determines the scale by moving the binary point left or right.

  • In floating point binary, the            holds the significant digits, while the         determines the scaling factor.

    In floating point binary, the mantissa holds the significant digits, while the exponent determines the scaling factor.

  • True or False?

    Negative numbers can be represented in floating point binary using two's complement.

    True.

    Negative floating point numbers use two's complement for representation, with the MSB indicating the sign and the remaining bits representing the value.

  • Define floating point binary.

    A floating point binary number is a way of representing real numbers in binary, using a mantissa and an exponent.

  • What is the first step in converting a denary number to floating point binary?

    The first step is to represent the number in fixed point binary.

  • True or False?

    The exponent in floating point binary represents how many places the decimal point is moved.

    True.

    The exponent tells you how many places and in which direction the decimal point has been moved in the mantissa.

  • When converting 6.75 to floating point binary, the         is 011011 and the     is 011.

    When converting 6.75 to floating point binary, the mantissa is 011011 and the exponent is 011.

  • Define mantissa in binary floating point representation.

    The mantissa is the part of a binary floating point number that represents the significant digits of the number.

  • What does the exponent indicate in a binary floating point number?

    The exponent in a binary floating point number shows how many places to move the binary point to get the denary value.

  • To convert a binary floating point number to denary, first write out the binary digits, then move the binary point      places to the      .

    To convert a binary floating point number to denary, first write out the binary digits, then move the binary point as many places to the right.

  • True or False?

    The example floating point number with mantissa 01100 and exponent 011 converts to denary 6.

    True.

    Moving the binary point three places to the right in 0.1100 gives 110.0, which is 6 in denary.

  • Define normalised floating point binary.

    A normalised floating point binary is a floating point number where the mantissa starts with either 01 or 10, ensuring a consistent format for representation and making arithmetic and comparisons straightforward.

  • A floating point number is normalised when the mantissa starts with     or    .

    A floating point number is normalised when the mantissa starts with 01 or 10.

  • What is the main reason for normalising floating point binary numbers?

    Normalising floating point binary numbers ensures a consistent format for representation, making arithmetic operations and comparisons more straightforward.

  • True or False?

    When normalising a floating point number, moving the decimal point to the left increases the exponent value.

    True.

    When normalising, shifting the decimal point to the left increases the exponent value, while shifting it to the right decreases the exponent.

  • Define mantissa in floating point representation.

    The mantissa is the part of a floating point number that contains its significant digits.

  • Define normalisation in the context of floating point numbers.

    Normalisation in floating point numbers means adjusting the mantissa and exponent so that the mantissa is within the allowed range (e.g., between 1.0 and 1.111... in binary).

  • A floating point number is represented using a      , mantissa, and exponent.

    A floating point number is represented using a sign, mantissa, and exponent.

  • Before adding or subtracting floating point numbers, you must make sure both numbers have the same         .

    Before adding or subtracting floating point numbers, you must make sure both numbers have the same exponent.

  • What are the three main components of a floating point number?

    A floating point number consists of a sign, mantissa, and exponent.

  • True or False?

    When adding floating point numbers, the sign of the result is always positive.

    False.

    The sign of the result depends on the signs and magnitudes of the numbers being added.

  • To normalise a floating point result, shift the         and adjust the        .

    To normalise a floating point result, shift the mantissa and adjust the exponent.

  • What must you do to the exponents before adding two floating point numbers?

    You must align the exponents by shifting the mantissa of one number and adjusting its exponent so both numbers have the same exponent.

  • Define logical binary shift.

    A logical binary shift is an operation where all the bits in a binary number are moved left or right by a specified number of positions, commonly used in computer programming and digital systems.

  • What happens to the value of a binary number each time it is shifted one place to the left using a logical shift?

    Each time a binary number is shifted one place to the left using a logical shift, its value is doubled.

  • True or False?

    Logical right shifts halve the value of a binary number for each position shifted.

    True.

    A logical right shift moves all bits to the right, and for each position shifted, the value of the binary number is halved.

  • There are two types of logical binary shifts:      and      .

    There are two types of logical binary shifts: Left and Right.

  • Define mask.

    A mask is a binary number used in bitwise operations to isolate, modify, or test specific bits in another binary value.

  • A mask is used to         specific bits in a binary number, such as extracting, setting, clearing, or toggling them.

    A mask is used to isolate specific bits in a binary number, such as extracting, setting, clearing, or toggling them.

  • What does the bitwise AND operation do when used with a mask?

    The bitwise AND operation compares each bit of the binary number with the mask, and the result is 1 only if both bits are 1. This operation is commonly used to extract specific bits from a binary number.

  • True or False?

    The bitwise OR operation only sets bits to 1 if both the binary number and the mask have 1 in that position.

    False.

    The bitwise OR operation sets a bit to 1 if either the binary number or the mask has a 1 in that position.

  • Define character set.

    A character set is a list of all characters and their associated binary codes. Character sets standardise the binary representation of each character for computers.

  • Define ASCII.

    ASCII is the American Standard Code for Information Interchange, a character set that uses 7 bits to encode 128 distinct characters.

  • Why do computers need character sets?

    Computers need character sets to standardise the binary codes for each character, ensuring compatibility between different hardware and software.

  • Each character in standard ASCII is encoded using       bits, allowing for         distinct characters.

    Each character in standard ASCII is encoded using 7 bits, allowing for 128 distinct characters.

  • True or False?

    ASCII can represent characters from all world languages.

    False.

    ASCII is limited to 128 characters and cannot represent characters from languages other than English.

  • The binary code         represents the character    in ASCII.

    The binary code 01000001 represents the character A in ASCII.

  • Define ASCII.

    ASCII is an encoding system that uses 7 bits to represent 128 characters, mainly for the English language.

  • Define Unicode.

    Unicode is a universal character encoding system that uses up to 32 bits to represent characters from many languages and scripts worldwide.

  • True or False?

    Unicode can represent more characters than ASCII, including emoji and symbols from many languages.

    True.

    Unicode supports a much larger range of characters than ASCII, including characters from different scripts and emoji.

  • ASCII uses         bits to represent characters, while Unicode can use up to             bits.

    ASCII uses 7 bits to represent characters, while Unicode can use up to 32 bits.

Sign up to unlock flashcards

or