Binary Numbers
Help Questions
AP Computer Science Principles › Binary Numbers
A program stores a fractional number like $$2/3$$ using a fixed number of bits. Because $$2/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?
An overflow error, because the number is too large to store.
A logic error, because the programmer made a mistake in the algorithm.
A compilation error, because the programming language does not support fractions.
A round-off error, because the number cannot be precisely represented.
Explanation
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.
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?
It definitively represents the decimal number 65, as this is the direct mathematical conversion.
It must represent the character 'A', as this is its standard ASCII encoding.
It is a processor instruction and cannot be interpreted as a data value like a number or character.
It could represent the number 65, the character 'A', or a color component, depending on the program's context.
Explanation
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.
Which of the following describes a limitation of representing analog data, such as a photograph, with a finite number of bits?
The digital representation is always larger in file size than the original analog source.
The digital data cannot be compressed without completely losing the original information.
The digital data can only be an approximation of the original analog data.
The digital representation can be exactly identical to the original analog data.
Explanation
Analog data is continuous, while digital data is discrete. When converting from analog to digital (e.g., scanning a photo), the process involves sampling and quantization, which uses a finite number of bits. This means the digital version is an approximation, and some information from the original continuous source is inherently lost.
A digital music file is created by measuring the amplitude of an analog sound wave at regular time intervals and storing these measurements as binary values. What is this process called?
Binary searching
Sampling
Compression
Encryption
Explanation
Sampling is the process of converting a continuous analog signal into a discrete sequence of digital values by taking measurements at regular intervals. This is a fundamental step in digitizing analog data like audio or video.
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?
Binary is base-2 using only 0 and 1
Binary always writes digits in reverse order
Binary is base-10, but written with fewer digits
Binary uses digits 0–9 like decimal
Explanation
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.
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?
They match off/on hardware states for bits
They use digits 0–9, so they are faster
They are more accurate than decimal numbers
They are used only for graphics and images
Explanation
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.
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?
As decimal digits 0–9 stored in memory cells
As letters directly, without any bit patterns
As bits (0/1) grouped into bytes
As reversed digits so hardware can read them
Explanation
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.
Binary in Computing passage: A computer stores information as bits, each bit being 0 or 1. Bits are grouped into bytes, and these patterns can represent numbers and characters; for example, decimal 10 is binary 1010. The CPU processes these bit patterns to run programs. According to the text, In the passage, how is data represented in binary?
As base-10 digits stored exactly as typed
As symbols that do not need any encoding
As bits (0/1) arranged into bytes
As pictures that the CPU reads directly
Explanation
This question tests understanding of binary numbers and their application in computing, specifically how computers internally represent and store various types of data. 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 store information as bits (each being 0 or 1) that are grouped into bytes, and these bit patterns can represent both numbers and characters. Choice B is correct because it accurately describes data representation as bits (0/1) arranged into bytes, which matches the passage's description of how computers store information. Choice A is incorrect because it suggests data is stored as base-10 digits exactly as typed, which contradicts the fundamental principle that all data in computers is ultimately stored in binary format. To help students: Emphasize that ALL data in computers, regardless of how it appears to users, is stored as binary patterns. Use encoding examples to show how text, numbers, and other data types are converted to and from binary representation.
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?
211
1000
1011
1111
Explanation
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.
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?
10
0101
1010
10010
Explanation
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.