Decimal 13 in binary is:
Q1Explanation: 8+4+1 = 13.
AP Computer Science Principles · Unit 2 · Data
Unit 2 · Conversion · ~8 min read
Place-value sums, subtraction method, and timed MCQ patterns for binary ↔ decimal on the AP exam.
Binary to decimal conversion adds powers of two where bits are 1; decimal to binary conversion subtracts the largest fitting power of two repeatedly. AP CSP rewards labeled steps on small numbers, not memorized giant values. Say place values aloud, check bit width for overflow follow-ups, and drill both directions until 13 ↔ 1101 feels automatic.
Binary to decimal conversion adds powers of two where bits are 1; decimal to binary conversion subtracts the largest fitting power of two repeatedly. AP CSP rewards labeled steps on small numbers, not memorized giant values. Say place values aloud, check bit width for overflow follow-ups, and drill both directions until 13 ↔ 1101 feels automatic.
Line up place values under each bit from right to left. Add every place that holds a 1; ignore zeros. 1010₂ uses 8 and 2 → 10 decimal. Speaking the powers while you point prevents treating the string as base 10.

Add the place values under each 1 bit to convert binary digits into a decimal number.
Leading zeros do not change the value but do change width. If a stem shows 00101, still sum to 5 while recognizing five bit slots—width questions show up next to overflow items.
Practice with a class scoreboard that displays binary levels for a game. Convert each level aloud before checking the decimal rank on the projector; the rhythm becomes automatic within a week.
Compare with binary number basics in the same unit.
Find the largest power of two that fits, subtract, record a 1, and repeat with the remainder. For 25: subtract 16 (remainder 9), subtract 8 (remainder 1), subtract 1 (remainder 0) → 11001₂.

Subtract the largest fitting power of 2 repeatedly to build the binary digits.
Stop when the remainder hits zero. If you still have remainder but no smaller power fits, you made an arithmetic slip—rebuild the power list 1, 2, 4, 8, 16, 32 for most AP numbers.
Some students draw a table with powers on the left and yes/no columns; others underline fits in the decimal. Either layout is fine if the grader (or you) can follow the steps.
| Power of 2 | Fits 25? | Action |
|---|---|---|
| 16 | Yes | 25−16=9, record 1 |
| 8 | Yes | 9−8=1, record 1 |
| 4 | No | record 0 |
| 2 | No | record 0 |
| 1 | Yes | 1−1=0, record 1 |
Compare with bits and bytes in the same unit.
Four unsigned bits cap at 15; eight cap at 255. A stem that says “4-bit unsigned” expects answers inside that range and sets up overflow follow-ups.
When converting decimal 13 to binary, the result 1101 fits four bits. When converting 17, you need at least five bits—mention width if the question asks how many bits are required.
Create Task lists storing scores should use widths that match realistic maximums. If your game level exceeds 255 while using one byte, you have an overflow bug worth documenting in written responses.
Hex shortcuts appear after you master binary: two hex digits describe one byte. Recognize the link even if hex is not the focus of every class period.
Compare with compression ratios in the same unit.
Forward: 13 needs 8 + 4 + 1 → 1101₂. Backward: 1101 adds to 8+4+1=13. Doing both directions on the same number catches addition mistakes.
Try 20 as extra practice: largest fit 16, remainder 4 → 10100₂. Check by summing places.
On paper tests, write the place row even when calculators are allowed—partial work earns reasoning credit on written items and saves you on timed MCQs.
Stems use small integers deliberately. Estimate: four bits cannot exceed 15. If an answer choice shows 40 for a four-bit prompt, eliminate it before redoing arithmetic.
Show powers of two in the margin for decimal-to-binary tasks. Even a tiny sketch prevents picking 1100 when you meant 1011.
Mix five conversion questions weekly with compression and metadata so skills stay warm across the unit.
Misses on timed quizzes usually trace to skipped place values, not to missing a secret formula.

Small binary conversions appear often on AP CSP exams—check place values under each 1 bit.
Tap an answer to reveal the explanation. Choices shuffle on load. For a full mixed set, open 50 Unit 2 practice questions.
Decimal 13 in binary is:
Q1Explanation: 8+4+1 = 13.
Binary 1010 equals decimal:
Q2Explanation: 8+2 = 10.
Largest power of 2 ≤ 25 is:
Q3Explanation: Start conversion with 16.
Binary place values right-to-left start:
Q4Explanation: Each position doubles.
1011₂ equals:
Q5Explanation: 8+2+1 = 11.
To convert decimal to binary you repeatedly:
Q6Explanation: Standard subtraction method.
4 bits can represent how many values?
Q7Explanation: 2⁴ = 16.
16-bit unsigned max is:
Q8Explanation: 2¹⁶ − 1 = 65535.
Check each skill when you can explain it without looking at notes.
0 of 4 ready
List powers of two under each bit position starting at 1 on the right: 1, 2, 4, 8, 16, 32, 64, 128. Add only the places where the bit is 1. This sum method is faster than trying to multiply the whole string as if it were base ten. Practicing four-bit and eight-bit examples builds speed without memorizing large tables.
Find the largest power of two that fits in 25, which is 16, and subtract: remainder 9. Next fit 8 in 9, remainder 1. Finally fit 1 in 1, remainder 0. Mark a 1 for each successful subtraction in order from largest to smallest power: 11001₂. Stop when the remainder hits zero.
Released-style MCQs almost always stay within four to eight bits because the learning goal is process, not long division. If you see a long string in a distractor, check whether the question actually specifies a small width; the correct answer often follows the width constraint, not the longest string shown.
Four bits yield 2⁴ = 16 distinct values, usually labeled 0 through 15 for unsigned counting. Any correct answer must fall in that range when the stem says four-bit unsigned. Students lose points by answering 16 itself when the question asked for the largest representable value (15).
On paper exams, a tiny place-value row earns partial credit when arithmetic slips. For digital practice MCQs, mental math is fine if you double-check by converting back to decimal. Either way, write the bit width in the margin when the stem provides it so overflow traps stay visible.
Leading zeros do not change the numeric value: 00101₂ is still 5. They matter when counting how many bits are used or when matching fixed-width hardware registers. Include them when the question shows a full width, but drop them when asked for the minimal binary representation.
Two's complement is a signed encoding for integers; some courses mention it briefly. Most AP CSP Unit 2 items stick to unsigned examples and overflow at max positive value. If your class covered two's complement, remember it is a different interpretation of the same bits, not a different base.
Convert your candidate back to decimal using the sum of powers. If you started with decimal 13 and built 1101₂, summing bits should return 13. That round-trip catches transposed digits faster than rereading the same steps forward.
Compression ratios compare file sizes, which are often given in megabytes while low-level questions use bits. Understanding conversion keeps you from mixing units when a problem chains representation with storage. Finish binary fluency before tackling ratio word problems so the numbers stay consistent.
Complete the eight MCQs on this page, then miss any similar items on the hub diagnostic. Follow with five questions from the 50-item practice set tagged binary. Spacing practice across three days beats one long cram session for retention on place values.