• 238 cards
  • Checked November 2026

AP Computer Science Principles Study Guide

Work out each card, then flip it; pick a Big Idea, or print it as cards.

Library

Card 1 of 82 · Algorithms and Programming

More options

Big Idea

Every AP Computer Science Principles card, by big idea

Creative Development

Numbered statements of this Big Idea in the College Board’s Course and Exam Description, read November 30, 2026.

  • Computing innovation It has a program as a key part A self-driving car, an app, e-commerce.
  • Why have people of different backgrounds on a team? To avoid bias and fit more users
  • Pair programming Two people, one program A model of collaboration.
  • Team skills the course names Talk, agree, settle conflict, bargain Communication, consensus building, conflict resolution, negotiation.
  • Program input Data sent to a program By touch, sound, picture or text, from a user or a program.
  • Program output What a program sends to a device
Show all 27
  • Event An action that gives a program input A key, a click, the program starting.
  • Event-driven programming Code runs when something triggers it Not from top to bottom.
  • Code segment Some statements of a program
  • Four phases of development Investigate, design, prototype, test Investigating goes with reflecting.
  • Iterative development Go back and improve with feedback
  • Incremental development Build one piece, test it, add it
  • Ways to investigate what users need Surveys, tests, interviews, watching
  • Program requirements How the program must work They may say what users can do.
  • Program specification It lays down the requirements
  • What can the design phase include? Brainstorm, storyboard, screen sketches And modules and a plan for testing.
  • Program documentation Written notes on what the code does
  • Comment A note for people; it does not run
  • When should you document a program? All through its development
  • Using someone else’s code: what to write down Where it came from, or its author In the documentation.
  • Syntax error A rule of the language is broken
  • Logic error It runs but does the wrong thing
  • Run-time error It goes wrong while running Such as a list index that is too large.
  • Overflow error A number outside the range allowed
  • Ways to find an error Test cases, hand tracing, a debugger Also visualizations and extra output.
  • Which inputs make good tests? At and just past the extremes
  • What must you know to choose test inputs? The requirements They say what result is right.

Data

Numbered statements of this Big Idea in the College Board’s Course and Exam Description, read November 30, 2026.

  • Bit A binary digit, 0 or 1
  • Byte 8 bits
  • Can the same bits mean different things? Yes: a number, a letter or a color It depends on the context.
  • Abstraction Hide details, keep the main idea
  • 101 in binary is what in decimal? 5 4 + 1.
  • 1011 in binary is what in decimal? 11 8 + 2 + 1.
Show all 47
  • 10000 in binary is what in decimal? 16 A 1 and 4 zeros: 2 to the power 4.
  • 11111 in binary is what in decimal? 31 16 + 8 + 4 + 2 + 1.
  • 101101 in binary is what in decimal? 45 32 + 8 + 4 + 1.
  • 1000000 in binary is what in decimal? 64 A 1 and 6 zeros: 2 to the power 6.
  • 6 in binary 110 4 + 2.
  • 13 in binary 1101 8 + 4 + 1.
  • 20 in binary 10100 16 + 4.
  • 37 in binary 100101 32 + 4 + 1.
  • 50 in binary 110010 32 + 16 + 2.
  • 100 in binary 1100100 64 + 32 + 4.
  • Place values of 8 bits 128, 64, 32, 16, 8, 4, 2, 1 Powers of 2 from right to left.
  • How many values can 4 bits show? 16 2 to the 4th: 0 to 15.
  • Largest number in 8 bits 255 2 to the 8th is 256 values, from 0.
  • One more bit: how many times the values? Twice as many
  • How many bits for 100 different codes? 7 6 bits give only 64.
  • A binary number that ends in 0 Even The rightmost place is 1.
  • A 0 put at the right end of a binary number Doubles it 101 is 5, 1010 is 10.
  • Analog data Changes smoothly Such as the pitch of music.
  • Sampling Measuring analog data at regular times
  • More samples a second Closer to the analog original And more bits to store.
  • Integers kept in a fixed number of bits: the risk Overflow Not in the exam’s own language: there memory is the limit.
  • Real numbers kept in a fixed number of bits: the risk Round-off error
  • Data compression Fewer bits to store or send Fewer bits need not mean less information.
  • Lossless compression The original can be rebuilt exactly
  • Lossy compression Only an approximation comes back It usually saves more bits.
  • A program’s code must be sent smaller: which kind? Lossless Every character must come back.
  • A long video must load fast: which kind? Lossy Size counts more than each detail.
  • What decides how far data can shrink? Repetition in it, and the algorithm
  • AAAAABBB written as runs 5A3B 8 characters become 4.
  • Information Facts and patterns drawn from data
  • Correlation Two things move together It does not prove that one causes the other.
  • Metadata Data about data The date, size or place of a photo.
  • You delete a photo’s metadata: the photo Stays as it was
  • What is metadata used for? To find, organize and manage data
  • Cleaning data Make it uniform, keep its meaning CA, Calif. and california become one word.
  • Does more data remove bias? No Bias comes from the kind or source of the data.
  • Challenges of any data set Cleaning, gaps, errors, joining sources
  • Data too large for one computer Use parallel systems
  • Filtering a data set Keep only the items that fit Such as the positive numbers.
  • Transforming a data set Change every element Such as doubling each number.
  • Why draw a chart of data? To show patterns to people

Algorithms and Programming

Numbered statements of this Big Idea and the Exam Reference Sheet in the College Board’s Course and Exam Description, read November 30, 2026.

  • a ← 5, b ← a, a ← 9: what is b? 5 b took a copy of the value.
  • x ← 3, then x ← x + 4: what is x? 7 The right side is worked out first.
  • 17 / 5 3.4 / keeps the decimals on this exam.
  • 17 MOD 5 2 The remainder.
  • 4 MOD 7 4 7 goes into 4 no times.
  • 2 + 3 * 4 MOD 5 4 MOD ranks with * and /: 12 MOD 5 is 2.
Show all 82
  • n is even, in the exam’s notation n MOD 2 = 0 = compares; ← assigns.
  • Last digit of a whole number n, 0 or more n MOD 10
  • a = b true or false A comparison. It does not change a.
  • a ← b a gets a copy of b’s value
  • RANDOM(1, 6) A whole number from 1 to 6 Both ends count, each as likely.
  • RANDOM(1, 100) ≤ 30 is true how often? 30% of the time, on average 30 of 100 equally likely numbers.
  • DISPLAY(4), then DISPLAY(7) 4 7 Each value is followed by a space.
  • INPUT() Takes a value from the user It returns the value, to be stored or used.
  • NOT (x > 5) x ≤ 5
  • NOT (a AND b) (NOT a) OR (NOT b)
  • NOT (a OR b) (NOT a) AND (NOT b)
  • (x > 2) AND (x < 2) false No number is both.
  • x is from 10 to 20, both included (x ≥ 10) AND (x ≤ 20)
  • IF with no ELSE, condition false Nothing happens The program goes on below.
  • IF and ELSE: how many of the two blocks run? Exactly one
  • x is 12. IF (x > 10) x ← x - 5. IF (x > 5) x ← x * 2. x is 14 Both run: 7, then 14.
  • Same two IFs, the second inside an ELSE. From 12, x is 7 The ELSE is skipped.
  • Nested conditional A conditional inside a conditional
  • x ← 1, REPEAT 5 TIMES x ← x * 2: x is 32
  • s ← 0, i ← 1, REPEAT 4 TIMES: s ← s + i, i ← i + 1: s is 10 1 + 2 + 3 + 4.
  • s ← 0, i ← 1, REPEAT 4 TIMES: i ← i + 1, s ← s + i: s is 14 2 + 3 + 4 + 5: the order of the steps counts.
  • n ← 10, REPEAT UNTIL (n < 4) n ← n - 3: n is 1 10, 7, 4, 1. At 4 it goes on.
  • n ← 10, REPEAT UNTIL (n < 4) n ← n - 3: passes 3
  • REPEAT UNTIL, condition true at the start The body never runs It is checked before each pass.
  • n ← 1, REPEAT UNTIL (n = 10) n ← n + 2 Never ends n is 1, 3, 5, 7, 9, 11: it steps over 10.
  • REPEAT 3 TIMES inside REPEAT 4 TIMES: inner body 12 times
  • Infinite loop Its ending condition is never true
  • First index of a list on this exam 1 Not 0, as in many languages.
  • a ← [8, 3, 9]: a[2] 3
  • a has 3 elements: a[0] An error; the program ends a[4] does the same.
  • LENGTH([5, 5, 5, 5]) 4 It counts elements, also equal ones.
  • a ← [1, 2, 3], INSERT(a, 2, 9) [1, 9, 2, 3] The rest move right.
  • a ← [1, 2, 3], APPEND(a, 9) [1, 2, 3, 9]
  • a ← [1, 2, 3], REMOVE(a, 1) [2, 3] 1 is the index. The rest move left.
  • a ← [4, 7, 9], REMOVE(a, 2), then a[2] 9 9 moved up one place.
  • a ← [4, 7, 9], a[1] ← a[3] [9, 7, 9] A copy: a[3] stays 9.
  • b ← a with lists, then APPEND(b, 5): is a changed? No, b is a copy of the list
  • Last element of the list a a[LENGTH(a)] Because the first index is 1.
  • Swap a[i] and a[j]: the three steps t ← a[i], a[i] ← a[j], a[j] ← t Without t one value is lost.
  • s ← 0, FOR EACH n IN [4, 7, 10] s ← s + n: s is 21
  • c ← 0, FOR EACH n IN [3, 8, 5, 6] IF (n > 4) c ← c + 1 c is 3 It counts 8, 5 and 6.
  • m ← 0, FOR EACH n IN [-4, -2, -9] IF (n > m) m ← n: m is 0 Wrong. Start m at the first element.
  • Linear search Check each element in order Works on any list, sorted or not.
  • Binary search needs Sorted data
  • Each step of a binary search Drops half of what is left It looks at the middle.
  • Binary search of 100 items: at most how many checks? 7 2 to the 7th is 128.
  • Binary search of 1,000 items: at most how many checks? 10 2 to the 10th is 1,024.
  • Twice as many items: what does binary search add? One more check A linear search may need twice as many.
  • Parameter; argument In the definition; in the call
  • PROCEDURE f(x) { RETURN(x * x) }: f(3) + f(2) 13 9 + 4.
  • PROCEDURE g(x) { RETURN(x + 1) }: g(g(5)) 7 The inner call runs first.
  • What does RETURN do to the rest of a procedure? Skips it The value goes back at once.
  • A procedure with DISPLAY and no RETURN gives back No value It only shows something.
  • After a procedure call, the program goes on Right after the call
  • Procedural abstraction Use it by what it does, not how
  • Modularity A program split into subprograms
  • Why give a procedure parameters? One procedure fits many inputs
  • Data abstraction with a list One name for many values numbers[i], not number1, number2, number3.
  • String concatenation: "data" with "base" "database" Joined end to end.
  • Algorithm A finite set of steps for a task Built of sequencing, selection and iteration.
  • Sequencing, selection, iteration In order; by a condition; repeated
  • Library Procedures ready for new programs
  • API Tells how to use a library’s procedures
  • Simulation A simplified model of something real Good when the real thing is too big, slow or dangerous.
  • How can a simulation be biased? By what it leaves out or puts in
  • What makes a simulation vary like real life? Random numbers
  • Reasonable time Polynomial or faster Constant, linear, square and cube are all reasonable.
  • Unreasonable time Exponential or factorial
  • Steps 2, 4, 8, 16 for sizes 1, 2, 3, 4 Unreasonable: exponential It doubles with each item.
  • Steps 1, 4, 9, 16 for sizes 1, 2, 3, 4 Reasonable: n squared
  • Heuristic Good enough, not always the best For when the sure way is impractical.
  • Decision problem; optimization problem Yes or no; the best of many Is there a path? Which path is shortest?
  • Undecidable problem No algorithm answers every case Some cases may still be solved.
  • Robot: two ROTATE_LEFT() in a row It faces the other way 90 degrees each, in the same square.
  • Robot: MOVE_FORWARD() into a wall The robot stays; the program ends Moving off the grid does the same.
  • Robot: CAN_MOVE(left) true if the square at its left is open Also right, forward and backward.

Systems and Networks

Numbered statements of this Big Idea in the College Board’s Course and Exam Description, with RFC 791, 9293 and 768, read November 30, 2026.

  • Computing device A thing that can run a program Computer, tablet, server, router, smart sensor.
  • Computing system Devices and programs with one purpose A network is one kind.
  • Path Devices linked from sender to receiver
  • Routing Finding a path to the receiver
  • Is the route on the Internet fixed beforehand? No, routing is usually dynamic
  • Bandwidth Most data sent in a fixed time In bits per second.
Show all 31
  • 8 megabits per second: how long for 40 megabits? 5 seconds 40 / 8.
  • Protocol Agreed rules for how a system behaves
  • Why are Internet protocols open? Anyone can connect new devices They belong to no company.
  • Internet; World Wide Web The network; linked pages on it
  • HTTP Protocol of the World Wide Web
  • IP Addresses packets and gets them across Internet Protocol.
  • TCP Resends lost packets, puts them in order Transmission Control Protocol.
  • UDP Sends with no promise of delivery User Datagram Protocol: a minimum of mechanism.
  • Packet A piece of data with routing metadata The metadata also help put it back together.
  • In what order do packets arrive? Any, and some not at all
  • Scalability Can grow to meet new demand The Internet was made for it.
  • Fault-tolerant Goes on working when parts fail
  • Redundancy Spare parts or paths in case one fails It costs more and makes the system safer.
  • Links A–B, B–C, C–D, D–A: does one broken link cut B off? No Two paths join any two devices.
  • Links A–B and B–C only: which device must not fail? B A and C have no other path.
  • Sequential computing One step after another Time: all the steps added up.
  • Parallel computing Some steps at the same time
  • Distributed computing Many devices run one program
  • Time of a parallel solution Sequential part + longest parallel part
  • Tasks of 30, 50 and 40 s, all parallel, on 3 processors 50 s The longest one. In sequence: 120 s.
  • 10 s in sequence, then 60 s and 40 s in parallel 70 s 10 + 60.
  • Tasks of 20, 30, 40, 50 s on 2 processors: best time 70 s 50 + 20 and 40 + 30.
  • Speedup Sequential time / parallel time
  • 120 s in sequence, 40 s in parallel: speedup 3 120 / 40.
  • What limits the speedup? The part that must run in sequence More processors help less and less.

Impact of Computing

Numbered statements of this Big Idea in the College Board’s Course and Exam Description, read November 30, 2026.

  • Can one effect be both good and harmful? Yes, even to the same person
  • What was the Web first meant for? Scientists exchanging information An impact beyond its first purpose.
  • Targeted advertising: help and harm Helps businesses; can be misused
  • Can a programmer foresee every use? No But should try to think of harmful ones.
  • Digital divide Unequal access to devices and Internet By income, place or group of people.
  • Who can change the digital divide? People, organizations, governments
Show all 51
  • Two ways bias gets into software In the algorithm, or in its data
  • At which level can bias get in? At every level of development
  • Citizen science Research with data from the public Many are not scientists; they use their own devices.
  • Crowdsourcing Input from many people online Money for a cause, reviews, ideas.
  • Who owns what is made on a computer? Its creator or an organization Intellectual property.
  • Plagiarism Others’ work shown as your own Without permission. It may have legal consequences.
  • Creative Commons A license to share an author’s work The author chooses the terms.
  • Open source Code free to use, change and share
  • Open access Research online without restrictions
  • You use someone’s free image: what is still due? Cite it Material of others is always cited.
  • PII Data that identifies a person Personally identifiable information.
  • Examples of PII Age, race, phone, health, money data Also a Social Security number and biometric data.
  • Pieces of data about you put together Can tell more than each alone Location, cookies and browsing history.
  • Information once placed online Is hard to delete
  • What can PII be used for by criminals? Stalking and identity theft
  • Authentication Checks who may get in Strong passwords, multifactor authentication.
  • Strong password Easy to remember, hard to guess For someone who knows you, too.
  • Multifactor authentication At least two kinds of evidence Something you know, have or are.
  • Password + code sent to your phone: which factors? Know and have Knowledge and possession.
  • Password + PIN: two factors? No, both are something you know
  • Fingerprint: which factor? Something you are Inherence.
  • Encryption; decryption Encode data; decode it
  • Symmetric key encryption One key locks and unlocks Both sides must have it.
  • Public key encryption Public key locks, private key unlocks
  • Ana writes to Ben with public key encryption: whose key? Ben’s public key Only his private key opens it.
  • Certificate authority Vouches for who owns a key It issues digital certificates.
  • Computer virus Malicious program that copies itself It often rides on a legitimate program.
  • Malware Software meant to damage or take over
  • Why install software updates? They fix flaws attackers use
  • App permissions What a program may collect Users can review and limit them.
  • Phishing Tricks you into giving information Often an email that looks real.
  • Keylogging Records every key you press To get at passwords.
  • Rogue access point Wireless point that lets intruders in Data on public networks can be read there.
  • Can an email from a friend be dangerous? Yes, if their account was taken over
  • Free downloads from unknown sites: the risk Malware
  • Machine learning and data mining: the harm named Used to discriminate against groups They also brought advances in medicine and science.
  • The digital divide: three issues it raises Equity, access and influence
  • A program shared fast with a great many users Effects its maker did not plan And may not control.
  • Search history: kept by whom, used for what? Search engines; suggestions and ads
  • What a program can record of your travels Where, how you got there, how long
  • PII online: what good can it do you? Easier buying, better experience
  • Devices that watch all the time: the concern They collect and analyze your data
  • Software for downloading films and songs: the concern Rights of those who own them A legal and ethical issue.
  • How can a link be dangerous? A malicious one can look harmless On a page or in an email.
  • Your post on social media: who may see it later? Others, a future employer too Messages can be passed on.

How this list was compiled: Cards written for this site in our own words, sorted by the five Big Ideas of the College Board's AP Computer Science Principles Course and Exam Description (apcentral.collegeboard.org, 2023, in force for the exam of May 2027), whose numbered statements and Exam Reference Sheet each card follows. What IP, TCP and UDP do was read in RFC 791, RFC 9293 and RFC 768 (rfc-editor.org), Creative Commons at creativecommons.org. All read November 30, 2026. Every answer that can be worked out was worked out by a script. No sample question, released question or AP Classroom item was used.

Checked against: apcentral.collegeboard.org, rfc-editor.org. Read November 30, 2026.

How it works

This AP Computer Science Principles study guide is 238 cards in our own words: exam pseudocode to work out, and the terms of all five Big Ideas. It is unofficial and not affiliated with the College Board.

Read the full guide

Cards in the exam’s shares

Algorithms and Programming is 30–35% of the multiple choice, so it has 82 cards. Impact of Computing (21–26%) has 51, Data (17–22%) 47, Computer Systems and Networks (11–15%) 31, Creative Development (10–13%) 27.

Read the code the exam’s way

The exam’s own language differs from Python and Java: lists start at 1, = compares, ← assigns, and a list assigned to another name is a copy. As in Python, / keeps decimals.

Print it, or make a PDF

Pick a Big Idea under the card, or All. Print makes double-sided cards; the fold-over print suits a one-sided printer.

  • For REPEAT UNTIL, ask when it stops, not how long it goes on: it is the reverse of while.

Questions and answers

Is there an AP Computer Science Principles study guide PDF?

You make it here: choose a Big Idea, press Print and pick Save as PDF as the printer. Data is 47 cards on 4 sheets; All is 238 on 20.

How many questions are on the AP CSP exam?

70 multiple-choice questions in 120 minutes, 70% of the score; eight of them want two answers. The rest is the Create performance task with two written-response questions in 60 minutes. The next is on Friday, May 14, 2027.

Do you need to know a programming language for AP CSP?

Not for the multiple choice: its code is the pseudocode of the Exam Reference Sheet, which you have with you. For the Create task no language is set.

Is AP CSP changing?

Yes. The College Board has announced a redesigned course for the 2027–28 school year. These cards follow the present description, for the exam of May 2027.