Binary Numbers (College Board AP® Computer Science Principles): Flashcards

1/37

0Still learning

Know0

Cards in this collection (37)

  • Define bit.

    A bit (binary digit) is the smallest unit of data in computing, representing a single 0 or 1.

  • Define byte.

    A byte is a group of 8 bits.

  • Why do digital devices use binary?

    Digital devices use binary because electronic circuits have two states: on (1) and off (0).

  • Define abstraction.

    Abstraction is the process of reducing complexity by hiding unnecessary detail and focusing on essential features.

  • What does a data type define?

    A data type defines how a bit sequence should be interpreted.

  • True or False?

    A particular sequence of bits always represents the same value.

    False.

    The same sequence of bits could represent a number, a character, or a color, depending on the data type.

  • Define analog data.

    Analog data is continuous: it changes smoothly over time and can take any value within a range.

  • Define digital data.

    Digital data is discrete: it is represented using a finite set of values.

  • Converting analog data to digital involves approximation because continuous values must be _______ to the nearest available digital value.

    Converting analog data to digital involves approximation because continuous values must be rounded to the nearest available digital value.

  • Define sampling.

    Sampling is measuring an analog signal at regular intervals and recording each measurement as a digital value.

  • What is the effect of a higher sampling rate?

    A higher sampling rate means the digital version represents the original analog data more accurately.

  • What does the number of bits per sample determine?

    The number of bits per sample determines the precision of each measurement.

  • Why does converting analog data to digital always lose some information?

    Some information is always lost because the continuous signal is only captured at specific points in time.

  • What limits the range of integer values in many programming languages?

    In many languages, integers are represented by a fixed number of bits, which limits the range of values.

  • Define overflow error.

    An overflow error is when a calculation produces a value outside the representable range.

  • How many different values can be represented with 8 bits?

    8 bits can represent 256 different values (2⁸).

  • What is the largest non-negative integer that can be stored in 4 bits?

    The largest non-negative integer that can be stored in 4 bits is 15.

  • A program stores non-negative integers using 8 bits. Why can it not store the value 300?

    8 bits can only represent 0 to 255, so storing 300 causes an overflow error.

  • True or False?

    In the language on the AP exam reference sheet, integer variables can overflow.

    False.

    In the AP exam reference language, the size of integers is limited only by the computer's memory.

  • Choosing the wrong number of bits for a variable can lead to incorrect results without any visible _____ _______.

    Choosing the wrong number of bits for a variable can lead to incorrect results without any visible error message.

  • How are integers stored within their representable range?

    Within their representable range, integers are stored exactly.

  • Why are most real numbers stored as approximations?

    Real numbers can have infinite decimal places, but a fixed number of bits can only store a finite level of precision.

  • What can happen when small rounding errors are repeated across many calculations?

    Small rounding errors can accumulate, leading to significantly incorrect results.

  • Name two types of calculation that are particularly vulnerable to rounding errors.

    Financial and scientific calculations are particularly vulnerable to rounding errors.

  • True or False?

    If a calculation is correct, testing whether its real-number result is exactly 0.1 will always work.

    False.

    Testing a real number for exact equality may fail even when the calculation appears correct, because of rounding.

  • Define number base.

    A number base is the number of unique digits used to represent values.

  • Which digits does binary use?

    Binary (base 2) uses the digits 0 and 1.

  • Decimal is base __ and uses the digits 0 to 9.

    Decimal is base 10 and uses the digits 0 to 9.

  • True or False?

    Some values that can be represented in decimal cannot be represented in binary.

    False.

    Any value that can be represented in decimal can also be represented in binary, and vice versa.

  • When converting decimal to binary, what do you repeatedly divide by?

    You repeatedly divide by 2, recording the remainder (0 or 1) at each step.

  • When converting decimal to binary, the remainders are read from ______ to top.

    When converting decimal to binary, the remainders are read from bottom to top.

  • Convert the decimal number 13 to binary.

    13 in decimal is 1101 in binary (8 + 4 + 1).

  • How do you convert a binary number to decimal?

    You multiply each bit by its place value and add the results together.

  • Convert the binary number 01000110 to decimal.

    01000110 in binary is 70 in decimal (64 + 4 + 2).

  • The rightmost bit in a binary number has a place value of __.

    The rightmost bit in a binary number has a place value of 1 (2⁰).

  • In binary, how does each place value compare with the position to its right?

    In binary, each position is worth twice as much as the position to its right.

  • What is the place value of the leftmost bit in an 8-bit binary number?

    The leftmost bit of an 8-bit number has a place value of 128 (2⁷).

Sign up to unlock flashcards

or