Bit Representation (College Board AP® Computer Science Principles): Study Guide
Binary representation & abstraction
What is binary?
All digital devices store and process data using binary, a number system that uses only two values: 0 and 1
A bit (binary digit) is the smallest unit of data in computing, representing a single 0 or 1
A byte is a group of 8 bits and is the fundamental building block of data storage
Digital devices use binary because electronic circuits have two states: on (1) and off (0)
Every piece of data on a device (text, images, sound, video) is stored as a representation made up of bit sequences
Abstraction and data types
Abstraction is the process of reducing complexity by hiding unnecessary detail and focusing on essential features
In computing, abstraction allows complex real-world data to be represented as bit sequences that a computer can process
A data type defines how a bit sequence should be interpreted; the same sequence of bits could represent a number, a character, or a color depending on the data type
Variables, lists, and constants are abstractions used in programs to store and organize data without the programmer needing to manage individual bits
Without abstraction, programmers would need to work directly with binary sequences; abstraction is what makes programming in human-readable languages possible
Analog vs digital data
What is the difference between analog and digital data?
Analog data is continuous, meaning it changes smoothly over time and can take any value within a range (for example, sound waves, temperature, or light intensity)
Digital data is discrete, meaning it is represented using a finite set of values (in computing, sequences of 0s and 1s)
Converting real-world analog data into digital form always involves some level of approximation, because continuous values must be rounded to the nearest available digital value
Feature | Analog data | Digital data |
|---|---|---|
Nature | Continuous, smooth changes | Discrete, fixed values (0s and 1s) |
Range of values | Infinite within a range | Finite, determined by the number of bits |
Real-world examples | Sound waves, temperature readings | MP3 audio files, digital photographs |
Precision | Exact at any point in time | An approximation of the original data |
Digital sampling & conversion
How is analog data converted to digital?
Sampling is the process of measuring an analog signal at regular intervals and recording each measurement as a digital value
The more frequently the signal is sampled (higher sampling rate), the more accurately the digital version represents the original analog data
Each sample is stored as a sequence of bits, and the number of bits per sample determines the precision of each measurement
Conversion from analog to digital always involves some loss of information, because the continuous signal is only captured at specific points in time

Examiner Tips and Tricks
The AP exam may ask why digital representations are approximations of analog data. The key reason is that analog data is continuous but digital data can only capture values at specific intervals. A higher sampling rate produces a closer approximation but never a perfect copy. When comparing analog and digital, focus on the trade-off between accuracy and storage size.
For the AP Create Performance Task, your program stores and processes data using variables and lists — on exam day you may be asked to explain how your program manages data, so be prepared to describe what data your program stores and why
Worked Example
A sound wave is sampled 1000 times per second. Each sample is stored using 8 bits. Which of the following best explains why the digital recording is an approximation of the original sound?
(A) The recording uses too many bits per sample
(B) The sound wave is only measured at specific intervals, so values between samples are not captured
(C) Digital devices cannot store sound data
(D) 8 bits is not enough to represent any sound
[1]
Answer:
(B) The sound wave is only measured at specific intervals, so values between samples are not captured [1 mark]
Analog sound is continuous but sampling only records values at fixed points in time — any changes between samples are lost, making the digital version an approximation of the original
Unlock more, it's free!
Was this revision note helpful?