โ† All APCSP Flashcard Decks

Data Representation Flashcards

7 cards from real APCSP practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Data Representation flashcards as text
  1. A student represents the value 13 in binary. Which of the following is correct?

    Answer: 1101

    13 = 8 + 4 + 1 = 1101 in binary.

  2. Which of the following file types typically uses lossy compression?

    Answer: JPEG image

    JPEG uses lossy compression that discards some image detail to achieve smaller file sizes, unlike PNG which is lossless.

  3. How does run-length encoding (RLE) compress data?

    Answer: It replaces sequences of repeated values with a count and the repeated value

    RLE replaces consecutive repeated values (e.g., AAAAAAA) with a shorter representation (e.g., 7A), making it effective for data with long repeated sequences.

  4. A researcher collects temperature data as floating-point numbers. Which limitation of floating-point representation should she be aware of?

    Answer: Floating-point representation may introduce small rounding errors

    Floating-point numbers are stored with finite precision, so some real numbers can only be approximated, leading to small rounding errors in calculations.

  5. The hexadecimal color code #FF0000 represents which color?

    Answer: Red

    In RGB hex notation #FF0000 means red channel = 255, green = 0, blue = 0, which is pure red.

  6. A text file contains 1,000 characters, each encoded in ASCII. Approximately how many bytes does it require?

    Answer: 1,000 bytes

    Standard ASCII uses 7 bits per character, but ASCII files are stored as 8-bit bytes, so 1,000 characters = approximately 1,000 bytes.

  7. Which of the following best explains why the same binary pattern can mean different things in different contexts?

    Answer: The interpretation depends on the data type: the same bits could represent an integer, a character, or an instruction

    A binary pattern has no inherent meaning; its interpretation is determined by the data type specified by the program, so 01000001 could be the integer 65 or the ASCII character 'A'.