Binary Numbers - AP Computer Science Principles

  1. Binary Basics passage: Binary is a base-2 system using only 0 and 1, while decimal is base-10 using digits 0–9. For instance, decimal 6 is binary 110. Computers use binary states (off/on) as bits, and group bits into bytes to store and process data. According to the text, How does binary differ from the decimal system?
    Answer: Binary is base-2 using only 0 and 1 This question tests understanding of binary numbers and their application in computing, specifically the fundamental differences between binary and decimal number systems. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage clearly states that binary is base-2 using only 0 and 1, while decimal is base-10 using digits 0-9, establishing the key distinction between these systems. Choice B is correct because it accurately identifies binary as a base-2 system using only digits 0 and 1, which directly matches the passage's explanation. Choice A is incorrect because it suggests binary uses the same digits (0-9) as decimal, which contradicts the fundamental definition of binary as using only two digits. To help students: Emphasize the concept of different number bases and how the base determines the available digits. Use comparison charts showing decimal (base-10) versus binary (base-2) to reinforce the limited digit set in binary and practice identifying which digits are valid in each system.
  2. A counter is represented by a 4-bit binary number. If the current value of the counter is 0111, what will be its value after it is incremented by one?
    Answer: 1000 The binary number 0111 is equivalent to the decimal number 7. Incrementing this value by one results in 8. The 4-bit binary representation of the decimal number 8 is 1000. In binary addition, adding 1 to 0111 causes a carry to propagate through all bits.
  3. Binary in Computing passage: Computers represent information with bits that can be 0 or 1, like switches that are off or on. Eight bits make a byte, and bytes can encode numbers and characters. For example, decimal 10 is binary 1010. This base-2 structure makes storage and processing reliable in hardware. Based on the passage, Why are binary numbers used in computer systems?
    Answer: They match off/on hardware states for bits This question tests understanding of binary numbers and their application in computing, specifically why computers use binary representation for data storage and processing. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage explains that computers represent information with bits that can be 0 or 1, like switches that are off or on, making binary ideal for hardware implementation. Choice A is correct because it accurately reflects how binary digits (0 and 1) correspond to the physical on/off states in computer hardware, making data storage and processing reliable. Choice C is incorrect because it claims binary uses digits 0-9, which is false - binary only uses 0 and 1, and this fundamental misunderstanding would lead to confusion about why computers use binary. To help students: Emphasize the connection between binary digits and physical hardware states (voltage levels, magnetic fields, etc.). Use hands-on demonstrations with switches or LEDs to show how binary states map to physical on/off conditions in computer circuits.
  4. What is the 4-bit binary representation of the decimal number 13?
    Answer: 1101 The decimal number 13 is represented in binary by finding the powers of 2 that sum to 13. The places in a 4-bit number are 8, 4, 2, 1 (which are 23,22,21,202^3, 2^2, 2^1, 2^0). The number 13 can be expressed as 8+4+0+18 + 4 + 0 + 1. This corresponds to the binary representation 1101.
  5. Binary in Computing passage: Binary is base-2, so each bit is either 0 or 1, like a light switch off or on. Computers store many bits in memory and process them in the CPU; eight bits form a byte. For example, decimal 3 is binary 11. Based on the passage, Why are binary numbers used in computer systems?
    Answer: They allow storing data as off/on bit states This question tests understanding of binary numbers and their application in computing, specifically the practical reasons why computers utilize binary number systems. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage explains that binary digits correspond to physical states like a light switch being off (0) or on (1), making it ideal for electronic circuits. Choice A is correct because it accurately identifies that binary allows storing data as off/on bit states, which directly relates to the passage's switch analogy and hardware implementation. Choice C is incorrect because it claims binary is base-10, which is fundamentally wrong - binary is base-2, and this misconception would prevent understanding of why computers use binary. To help students: Emphasize the physical nature of computer hardware and how binary maps to electrical states. Use analogies like light switches, transistors, or voltage levels to help students understand why binary is the natural choice for digital systems.
  6. Which of the following is the 8-bit binary representation of the decimal number 150?
    Answer: 10010110 To convert 150 to binary, we find the largest power of 2 less than or equal to 150, which is 128 (272^7). The remainder is 150−128=22150 - 128 = 22. The largest power of 2 for 22 is 16 (242^4). Remainder is 22−16=622-16 = 6. The largest power of 2 for 6 is 4 (222^2). Remainder is 6−4=26-4=2. The power of 2 for 2 is 2 (212^1). This gives us 128+16+4+2128+16+4+2, which corresponds to the binary number 10010110.
  7. A student is asked to provide the 5-bit binary representation for the decimal number 26. Which of the following is the correct representation?
    Answer: 11010 To convert the decimal number 26 to binary, we can use powers of 2 (16, 8, 4, 2, 1). The number 26 is the sum of 16+8+216 + 8 + 2. This corresponds to 1×16+1×8+0×4+1×2+0×11 \times 16 + 1 \times 8 + 0 \times 4 + 1 \times 2 + 0 \times 1, resulting in the 5-bit binary number 11010.
  8. A computer uses a fixed 4 bits to represent positive integers. Which of the following operations would result in an overflow error?
    Answer: Adding 1010 and 0110 With 4 bits, the largest representable positive integer is 1111, which is 15 in decimal. The operation in choice B is adding 1010 (decimal 10) and 0110 (decimal 6). The sum is 16, which requires 5 bits (10000) to represent. Since the computer only uses 4 bits, this operation causes an overflow error.
  9. Binary in Computing passage: In memory, data is stored as bits with values 0 or 1, grouped into bytes. These bit patterns can represent numbers (like decimal 10 as binary 1010) and characters, letting the CPU store and process information efficiently. Based on the passage, In the passage, how is data represented in binary?
    Answer: As bits (0/1) grouped into bytes This question tests understanding of binary numbers and their application in computing, specifically how computers store and represent data using binary systems. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage clearly states that data is stored as bits with values 0 or 1, grouped into bytes, and these bit patterns can represent both numbers and characters. Choice B is correct because it accurately describes how data is represented as bits (0/1) grouped into bytes, which aligns with the passage's explanation of binary data storage. Choice C is incorrect because it suggests data is stored as decimal digits 0-9, which contradicts the fundamental principle that computers use binary (base-2) representation, not decimal (base-10). To help students: Emphasize the hierarchical organization of binary data from bits to bytes to larger units. Use visual representations showing how groups of 8 bits form a byte and how these bytes can encode different types of information like numbers and text characters.
  10. Binary Basics passage: Decimal is base-10 with digits 0–9, while binary is base-2 with digits 0 and 1. For example, decimal 4 is binary 100. Computers rely on binary because circuits can easily represent two states, storing data as bits and bytes. Based on the passage, How does binary differ from the decimal system?
    Answer: Binary uses base-2 with only 0 and 1 This question tests understanding of binary numbers and their application in computing, specifically the fundamental characteristics that distinguish binary from decimal number systems. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage clearly contrasts decimal as base-10 with digits 0-9 against binary as base-2 with only digits 0 and 1, establishing the core difference. Choice A is correct because it accurately states that binary uses base-2 with only 0 and 1, which directly reflects the passage's explanation of the binary system. Choice B is incorrect because it claims binary uses base-10 with digits 0-9, which actually describes the decimal system, not binary - this represents a complete reversal of the concepts. To help students: Emphasize the relationship between a number system's base and its available digits (base-2 uses 2 digits, base-10 uses 10 digits). Create comparison tables showing valid digits for each system and practice identifying which number system is being used based on the digits present.
  11. Binary Basics passage: Binary is base-2 and uses only 0 and 1, unlike decimal base-10. A quick example is decimal 10 written as binary 1010. Computers use these 0/1 states as bits for storage and processing, often grouping bits into bytes. According to the text, What is the binary representation of the decimal number 10?
    Answer: 1010 This question tests understanding of binary numbers and their application in computing, specifically converting between decimal and binary number systems. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage explicitly states that decimal 10 is written as binary 1010, providing a direct example of decimal-to-binary conversion. Choice A is correct because it shows 1010, which the passage specifically identifies as the binary representation of decimal 10. Choice B is incorrect because it shows 10, which is the decimal representation, not the binary representation - this is a common error when students forget to perform the conversion. To help students: Emphasize the importance of carefully reading whether a number is in decimal or binary format. Practice conversion techniques using division by 2 or place value methods, and always verify conversions by converting back to check the answer.
  12. What is the decimal equivalent of the binary number 10110?
    Answer: 22 To convert the binary number 10110 to decimal, we multiply each digit by its corresponding power of 2, starting from the right (position 0). The calculation is 1×24+0×23+1×22+1×21+0×201 \times 2^4 + 0 \times 2^3 + 1 \times 2^2 + 1 \times 2^1 + 0 \times 2^0, which equals 16+0+4+2+0=2216 + 0 + 4 + 2 + 0 = 22.
  13. Binary Arithmetic passage: Binary addition follows base-2 rules: 0+0=0, 0+1=1, and 1+1=10 (carry 1). Example in the text: 101 + 110 = 1011. This is similar to decimal carrying, but with only two digits. According to the text, What is the result of the binary addition of 101 and 110?
    Answer: 1011 This question tests understanding of binary numbers and their application in computing, specifically performing binary arithmetic operations with carrying. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. The passage provides the exact calculation showing that 101 + 110 = 1011, demonstrating the binary addition rules including the carry operation when 1+1=10. Choice B is correct because it matches the result 1011 given in the passage for the binary addition of 101 and 110. Choice D (211) is incorrect because it contains the digit 2, which is impossible in binary - this error suggests the student added without considering that binary only uses digits 0 and 1. To help students: Emphasize that binary can only contain digits 0 and 1, never 2 or higher. Practice binary addition step-by-step, showing how carries work differently than in decimal, and have students check their answers for invalid digits.
  14. The 8-bit sequence 01000001 is stored in a computer's memory. Which of the following statements is most accurate about what this bit sequence represents?
    Answer: It could represent the number 65, the character 'A', or a color component, depending on the program's context. The same sequence of bits can represent different types of data. The interpretation depends entirely on the context provided by the software that is reading the memory. While 01000001 is the binary for decimal 65 and the ASCII code for 'A', it could also be part of an image file, a machine instruction, or other data type.
  15. Which of the following lists of 4-bit binary numbers is sorted in ascending order, from smallest value to largest value?
    Answer: 0101, 0110, 0111, 1001 To sort the numbers, we convert them to their decimal equivalents: 0101 = 5, 0110 = 6, 0111 = 7, and 1001 = 9. The list in choice B corresponds to the decimal sequence 5, 6, 7, 9, which is correctly sorted in ascending order.
  16. What is the largest unsigned decimal integer that can be represented using one byte of data?
    Answer: 255 One byte consists of 8 bits. The largest unsigned integer is represented when all 8 bits are set to 1 (11111111). This value is equivalent to 28−12^8 - 1, which is 256−1=255256 - 1 = 255.
  17. A program stores a fractional number like 2/32/3 using a fixed number of bits. Because 2/32/3 is a repeating decimal (0.666...), it is stored as an approximation. This type of inaccuracy is best described as which of the following?
    Answer: A round-off error, because the number cannot be precisely represented. A round-off error occurs when a value cannot be stored with perfect precision due to the limitations of a fixed-bit representation. This is common for real numbers with repeating decimal expansions.
  18. Which of the following binary numbers has the smallest decimal value?
    Answer: 01011 To find the smallest value, we can convert each binary number to decimal: 10001 = 17, 01110 = 14, 10010 = 18, and 01011 = 11. The smallest decimal value is 11, which corresponds to the binary number 01011.
  19. Binary Basics passage: Binary is a base-2 system using only 0 and 1, unlike decimal (base-10) using 0–9. For example, decimal 10 equals binary 1010. Computers store and process data as bits (0/1) grouped into bytes, representing numbers and characters. Based on the passage, What is the binary representation of the decimal number 10?
    Answer: 1010 This question tests understanding of binary numbers and their application in computing, specifically how binary represents data and performs operations. Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent all numbers, which is essential for digital computing. In the passage, binary representation of the decimal number 10 is demonstrated as 1010, showing the conversion process. Choice B is correct because it accurately reflects the binary representation of the given decimal number as per the passage's explanation. Choice A is incorrect because it shows the decimal representation (10) instead of the binary representation, which is a common mistake when students forget to convert between number systems. To help students: Emphasize the importance of understanding base-2 operations and provide practice with converting between decimal and binary. Encourage the use of visual aids like binary charts and place value tables to reinforce learning and check work for common conversion errors.
  20. A computer system uses a 6-bit sequence to represent different commands. What is the maximum number of unique commands that can be represented with this system?
    Answer: 64 The number of unique values that can be represented with N bits is 2N2^N. For a 6-bit sequence, the maximum number of unique commands is 262^6, which equals 64.

Start this quiz