Decimal

Decimal is the base-10 number system that uses only the digits 0 through 9, where each digit's value comes from multiplying it by a power of ten based on its position (EK DAT-1.C.3). In AP CSP, decimal is the everyday number system you convert to and from binary in Topic 2.1.

Verified for the 2027 AP Computer Science Principles examLast updated June 2026

What is Decimal?

Decimal is the number system you've used your whole life. It's base 10, meaning it has exactly ten digits (0 through 9) and every position in a number is worth a power of ten. The number 372 is really 3×10² + 7×10¹ + 2×10⁰. You do that math automatically, which is exactly why decimal feels "normal" and binary feels weird at first.

In AP CSP, decimal matters because it's one half of the conversion skill the CED requires. Per EK DAT-1.C.1, number bases like binary and decimal are both just ways to represent data. The rules are identical in every base: a digit's value equals the digit times the place value of its position, and the place value is the base raised to the power of the position, starting at 0 on the right (EK DAT-1.C.4 and DAT-1.C.5). Binary follows the same logic as decimal, just with powers of 2 instead of powers of 10 and only two digits instead of ten. Once that clicks, base conversion stops being a trick and starts being arithmetic.

Why Decimal matters in AP Computer Science Principles

Decimal lives in Topic 2.1 (Binary Numbers) in Unit 2: Data, and it directly supports learning objective AP Comp Sci P 2.1.C, which asks you to calculate the binary equivalent of a positive decimal integer and vice versa, plus compare and order binary numbers. You can't do any of that without being fluent in how decimal place value works, because the conversion process is just translating between powers of 10 and powers of 2. Decimal also frames the bigger Big Idea 2 point under 2.1.A: computers don't store your decimal numbers as decimal. Everything gets reduced to bits (EK DAT-1.A.2), so the decimal number you type is an abstraction sitting on top of binary.

How Decimal connects across the course

Binary (Unit 2)

Binary is decimal's mirror image with only two digits. Same place-value system, but positions are worth powers of 2 instead of powers of 10. Every conversion problem on the exam is a round trip between these two bases, so knowing decimal place value cold is half the skill.

Number base (Unit 2)

Decimal is one instance of the general idea of a number base. The base tells you two things, which digits are allowed (0 to base minus 1) and what each position is worth (base to the power of the position). Decimal is base 10, binary is base 2, octal is base 8. One rule, three flavors.

Overflow and integer representation (Unit 2)

When a language stores integers with a fixed number of bits, there's a maximum decimal value it can hold (EK DAT-1.B.1). Push past it and you get overflow. The decimal-to-binary connection is what makes this make sense, since more bits means a bigger decimal range.

Digital data and abstraction (Unit 2)

Computers represent everything digitally with bits at the lowest level (EK DAT-1.A.2). The decimal numbers you see on screen are an abstraction hiding the binary underneath, which is the exact 'reduce complexity by hiding details' idea from EK DAT-1.A.5.

Is Decimal on the AP Computer Science Principles exam?

Decimal shows up two ways on the AP CSP multiple-choice exam. First, as a vocabulary check, stems like "A number system uses only the digits 0 through 9 to represent values. Which term describes this number system?" expect you to answer decimal (or base 10). Second, and more often, as the conversion skill from 2.1.C. You'll be asked to convert a decimal integer to binary, convert a binary number to decimal, or compare binary numbers (which is usually fastest if you convert them to decimal first). No FRQ-style task hinges on decimal by name, since the AP CSP performance task focuses on programming, but the multiple-choice section reliably tests base conversion. Know your powers of 2 (1, 2, 4, 8, 16, 32, 64, 128) and conversions become quick addition.

Decimal vs Binary

Decimal is base 10 with digits 0-9 and place values that are powers of ten. Binary is base 2 with only the digits 0 and 1 and place values that are powers of two. The classic trap is misreading a number like "10": in decimal it means ten, but in binary it means two. On the exam, check the context or the base before assuming what a string of digits is worth. Also remember the digit rule, so anything containing a 2 through 9 cannot be a binary number.

Key things to remember about Decimal

  • Decimal is the base-10 number system that uses only the digits 0 through 9 (EK DAT-1.C.3).

  • Each digit's value equals the digit multiplied by the place value of its position, and place values are the base raised to the power of the position, starting at position 0 on the right.

  • Decimal and binary follow the exact same place-value rules; the only differences are the base (10 vs 2) and the allowed digits.

  • Learning objective 2.1.C requires you to convert positive integers between decimal and binary in both directions, which is a guaranteed multiple-choice skill.

  • Computers store decimal values as bits under the hood, so the decimal numbers you see are an abstraction over binary (EK DAT-1.A.2).

  • A number containing any digit from 2 to 9 cannot be binary, which is a fast way to eliminate answer choices.

Frequently asked questions about Decimal

What is decimal in AP Computer Science Principles?

Decimal is the base-10 number system, the one using digits 0 through 9 where each position is worth a power of ten. In AP CSP Topic 2.1, you need to convert positive integers between decimal and binary in both directions.

Do computers actually use decimal numbers?

No. Computing devices represent all data digitally using bits, which are binary digits (0 or 1). Decimal is what humans use, and the decimal numbers you see on screen are an abstraction built on top of binary.

How is decimal different from binary?

Decimal is base 10 with ten digits (0-9) and place values that are powers of ten; binary is base 2 with two digits (0 and 1) and place values that are powers of two. The number written as 10 means ten in decimal but two in binary.

How do I convert a decimal number to binary for the AP CSP exam?

Find the largest power of 2 that fits into your number, subtract it, and repeat with the remainder, placing a 1 in each used position and 0 elsewhere. For example, 13 = 8 + 4 + 1, so it's 1101 in binary.

Is base conversion actually on the AP CSP exam?

Yes. Learning objective 2.1.C explicitly requires calculating the binary equivalent of a positive decimal integer and vice versa, plus comparing and ordering binary numbers, and these show up as multiple-choice questions.