İçeriğe atla
2027 - 2028 Sınavları için son kontenjanlarBaşvuru
ITMagicITMagicAcademy
AP kaynakları
APBilgisayar BilimiCSP

Binary & Data Representation

AP Computer Science Principles — bits and bytes, converting between binary and decimal, and how numbers, text and images are represented digitally. Worked example and exam tip.

Everything a computer stores — numbers, text, images, sound — is ultimately binary: sequences of 0s and 1s. Understanding this "Data" big idea is central to AP Computer Science Principles (CSP).

Bits and bytes

  • A bit is a single 0 or 1.
  • A byte is 8 bits and can represent 2⁸ = 256 different values (0–255).
  • With n bits you can represent 2ⁿ distinct values.

Binary → decimal

Each place is a power of 2 (…, 8, 4, 2, 1):

1011₂ = 8 + 0 + 2 + 1 = 11₁₀

Decimal → binary

Subtract the largest fitting power of 2:

13 = 8 + 4 + 1 → 1101₂

Representing other data

  • Text: each character maps to a number (e.g. ASCII: 'A' = 65), then to binary.
  • Images: a grid of pixels; each pixel's colour is stored as RGB numbers (0–255 each).
  • Because storage is finite, large or precise values cause overflow (too big to store) or round-off (lost precision) errors.

Worked example

How many values can 4 bits represent, and what is the largest?

2⁴ = 16 values, from 0 to 15 (1111₂).

Exam tip

CSP tests concepts and abstraction, not heavy math. Know that more bits → more values (and more storage), why analog data must be sampled to become digital, and the difference between lossless and lossy compression. You will not need long hand-conversions under time pressure — you need the reasoning.

İnteraktif Simülasyon

Kaydırıcılarla oyna: değişimi gerçek zamanlı gör.

00001011 = 11

Kısa Ders Videosu

Bu konunun ders videosu yakında eklenecek.

Deneme Sınavı

Bu konunun deneme sınavı yakında eklenecek.

Alıştırma Testi

Kendini dene: anında sonuç ve açıklama.

  1. 1. The binary number 1011 equals which decimal value?

  2. 2. How many different values can one byte (8 bits) represent?

  3. 3. The decimal number 13 written in binary is:

Bu konuda desteğe mi ihtiyacın var?

30 dakikalık ücretsiz tanışma görüşmesinde seviye belirlenir, kişiye özel bir çalışma planı kurulur.

Ücretsiz tanışma görüşmesi