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

34 mins34 questions
1
1 mark

Which term describes the smallest unit of data in computing, representing a single 0 or 1?

  • Byte

  • Bit

  • Sample

  • Pixel

2
1 mark

Which of the following is an example of analog data?

  • The frame count of a saved video file

  • The number of likes on a social media post

  • A text message stored on a phone

  • The continuously changing voltage produced by a microphone as someone speaks

3
1 mark

How many unique digits does the binary (base 2) number system use?

  • 2

  • 10

  • 8

  • 16

4
1 mark

In an 8-bit binary number, what is the place value of the leftmost (most significant) bit?

  • 64

  • 256

  • 127

  • 128

5
1 mark

What is the decimal value of the binary number 110110?

  • 54

  • 52

  • 55

  • 50

6
1 mark

What is the decimal number 37 written in binary?

  • 100100

  • 100101

  • 101001

  • 110101

7
1 mark

In a binary number, what is the place value of the third bit from the right?

  • 4

  • 8

  • 2

  • 16

8
1 mark

A group of eight bits is used as the fundamental building block of data storage. What is this group called?

  • A bit

  • A sample

  • A byte

  • A pixel

9
1 mark

Which of the following is best described as digital data?

  • A photograph stored as a grid of pixel values in an image file

  • The continuously rising column of liquid in a mercury thermometer

  • The smoothly changing brightness of daylight during a sunset

  • The vibrations of a guitar string as it is plucked

10
1 mark

An unsigned integer is stored using 4 bits. What is the largest value it can represent?

  • 16

  • 8

  • 14

  • 15

1
1 mark

The same sequence of bits could represent a number, a character, or a colour. What determines how the bits are interpreted?

  • The speed of the processor

  • The number of bits per byte

  • The data type

  • The brightness of the screen

2
1 mark

Which statement correctly describes the difference between analog and digital data?

  • Analog data is continuous and can take any value in a range, while digital data is discrete and uses a finite set of values

  • Analog data is always more accurate than digital data in every situation

  • Digital data is continuous, while analog data is made of 0s and 1s

  • Analog and digital data are two names for exactly the same thing

3
1 mark

A piece of music is being recorded digitally. What is the main effect of increasing the sampling rate?

  • The recording becomes a perfect, lossless copy of the original analog sound

  • The digital recording becomes a more accurate approximation of the original sound, but the file is larger

  • The file size decreases while the accuracy stays the same

  • The recording is converted from digital back into analog

4
1 mark

A counter stores unsigned integers using 6 bits. What is the largest value it can hold?

  • 6

  • 64

  • 32

  • 63

5
1 mark

A program stores an integer using a fixed number of bits. A calculation produces a result larger than the maximum value those bits can hold. What is this situation called?

  • An overflow error

  • A rounding error

  • A syntax error

  • A sampling error

6
1 mark

Why are most real numbers stored only as approximations in a computer?

  • Computers cannot store any number that contains a decimal point

  • Real numbers are always stored using fewer bits than integers

  • A fixed number of bits can store only finite precision, but real numbers can have infinitely many decimal places

  • Real numbers are converted to text before being stored

7
1 mark

What is the binary representation of the decimal number 19?

  • 10010

  • 10011

  • 10101

  • 11001

8
1 mark

Using repeated division by 2, what is the decimal number 26 written in binary?

  • 10110

  • 11000

  • 11010

  • 11011

9
1 mark

What is the decimal value of the binary number 1011?

  • 11

  • 13

  • 7

  • 12

10
1 mark

What is the decimal value of the binary number 1100101?

  • 99

  • 101

  • 103

  • 100

11
1 mark

What is the decimal value of the binary number 1010101?

  • 81

  • 84

  • 85

  • 87

12
1 mark

Using repeated division by 2, what is the decimal number 52 written in binary?

  • 101010

  • 110010

  • 111000

  • 110100

13
1 mark

What is the decimal number 58 written in binary?

  • 110110

  • 111010

  • 111100

  • 101110

14
1 mark

Which of the following best describes how abstraction helps programmers when working with data?

  • It removes the need for programs to use any data types

  • It converts digital data back into analog signals

  • It increases the number of bits used to store each value

  • It hides the low-level detail of individual bits so data can be handled using variables and lists

15
1 mark

When recording digital audio, what does increasing the number of bits per sample mainly improve?

  • How often the analog signal is measured each second

  • The precision with which each individual sample is stored

  • The conversion of the recording from digital back to analog

  • The removal of all information loss during sampling

16
1 mark

A mercury thermometer shows temperature as a column of liquid that rises and falls smoothly. How is this data best classified, and why?

  • Digital, because the temperature can be read off as a number

  • Digital, because the reading changes over time

  • Analog, because it varies continuously and can take any value within a range

  • Analog, because it can only ever be one of two states

17
1 mark

A program checks whether the result of a decimal calculation is exactly equal to 0.1, but the check sometimes fails even though the calculation looks correct. What is the best explanation?

  • Decimal numbers cannot be stored by a computer at all

  • The result was measured using too low a sampling rate

  • Real numbers are stored as approximations, so the result may differ very slightly from 0.1

  • An overflow error occurred because 0.1 is too large to store

18
1 mark

Which type of program is most at risk of producing noticeably incorrect results because of accumulated rounding errors?

  • A program that stores only whole-number counts of items

  • A program that compares two pieces of stored text

  • A program that displays the same fixed message each time it runs

  • A financial program that repeatedly adds many small decimal amounts

1
1 mark

When an analog signal is converted to digital, some information is always lost. What is the main reason for this?

  • The number of bits per sample is always too small to store any value

  • Digital devices are unable to store any analog information

  • The signal is only measured at regular intervals, so changes between samples are not captured

  • The analog signal stops changing once it is recorded

2
1 mark

Using n bits, how many different unsigned integer values can be represented?

  • n^2

  • 2^n

  • 2 × n

  • n × 8

3
1 mark

A program repeatedly adds many small decimal amounts together, and the final total is slightly different from the value calculated by hand. What is the most likely cause?

  • The decimal values were sampled at too low a rate

  • An overflow error caused by exceeding the integer range

  • The program was written in the wrong number base

  • Rounding errors from limited real-number precision accumulating over many calculations

4
1 mark

What is the decimal value of the binary number 11101?

  • 30

  • 27

  • 29

  • 25

5
1 mark

A variable stores unsigned integers using 8 bits, giving a range of 0 to 255. A program tries to store the result of 250 + 20. What is the most likely outcome in a fixed-bit system?

  • An overflow error, because 270 is outside the range 0 to 255

  • The value 270 is stored correctly with no problem

  • The result is rounded to the nearest even number

  • The variable is automatically converted to store real numbers

6
1 mark

A 4-bit unsigned counter is holding its maximum value. The program then increases it by 1. In a system that uses a fixed number of bits, what is the most likely behaviour?

  • The counter automatically expands to 8 bits and stores the new value

  • The counter overflows and wraps around, resetting toward 0

  • The counter produces a rounding error and stores an approximate value

  • The counter stores the value 16 exactly