Answer
Flashcards · IB Diploma Programme Computer Science · Topic 1
Theme A – Concepts of computer science flashcards
26 cards on Topic 1, subtopics A.1 to A.4. Pick a subtopic or study them all.
Study mode needs JavaScript. Every card is listed below, so you can still cover the answers and test yourself.
Choose your cards
Session complete
Worth another look:
All 26 cards
For a quick read-through or printing. Cover the right-hand side to test yourself.
A.1 Computer fundamentals
- What do the control unit, ALU and registers do in a CPU?
- The control unit directs the fetch-execute cycle and the flow of data. The ALU carries out arithmetic and logic operations. Registers are very fast, small stores inside the CPU holding the data and instructions in use.
- Describe the fetch-execute cycle
- The CPU fetches the next instruction from memory, decodes what operation it specifies, then executes it (which may read or write data via the registers), and repeats for the next instruction.
- Primary vs secondary storage
- Primary storage (e.g. RAM) is directly accessible to the CPU, fast and usually volatile, but limited in capacity. Secondary storage (e.g. an SSD) is non-volatile and larger but slower, holding data and programs not in active use.
- Why is all data in a computer ultimately binary?
- The hardware stores and processes only two states. Numbers, text, images and sound are all encoded as patterns of bits; a byte is 8 bits.
- What is the role of the operating system?
- It manages the hardware resources (processor, memory, storage, devices) and mediates between applications and the machine, so programs do not need to control the hardware directly.
- How many values can n bits represent?
- 2ⁿ different values. For example, 8 bits (one byte) give 2⁸ = 256 values.
A.2 Networks
- LAN vs WAN
- A LAN (local area network) covers a small area such as one building. A WAN (wide area network) connects networks over a large geographical area; the internet is the largest WAN.
- Client vs server
- A server provides a service or resource, such as files, web pages or email, over a network. A client is a device or program that requests and uses that service.
- What do a router, a switch and a wireless access point do?
- A router forwards packets between networks using IP addresses. A switch forwards data within a LAN only to the intended device. A wireless access point lets wireless devices join a wired network.
- TCP vs UDP
- TCP is connection-based and reliable: it numbers, acknowledges and resends packets so data arrives complete and in order. UDP sends packets with no checks, so it is faster but unreliable; it suits live streaming and gaming.
- What do DHCP and HTTPS do?
- DHCP automatically assigns IP addresses and network settings to devices joining a network. HTTPS transfers web pages like HTTP but encrypts the data between browser and server.
- What is packet switching?
- Data is split into packets, each with addressing and sequence information, which travel independently across the network, possibly by different routes, and are reassembled in order at the destination.
- Why is the internet described as decentralised?
- No single computer or organisation controls it. Many independent networks are linked by routers, and data can be re-routed around a failed link or node.
- Name the four layers of the TCP/IP model (HL)
- Application, transport, internet and network interface (link). Each layer provides services to the one above, so data can be sent reliably across networks.
A.3 Databases
- Why store data in a relational database rather than a flat file?
- Data is stored once and referenced by keys, which reduces redundancy, preserves integrity when records change, and allows controlled access. A flat file duplicates related data with no way to keep copies consistent.
- Primary key vs foreign key
- A primary key uniquely identifies each record within its own table. A foreign key is a field in one table that references the primary key of a different table, linking the two.
- SQL data definition language vs data manipulation language
- DDL defines the structure of the database, e.g. creating tables. DML works with the data the database holds, e.g. SELECT, INSERT, UPDATE and DELETE.
- What do JOIN and LIKE with % do in SQL?
- JOIN combines rows from two tables where a key matches, e.g. ON Borrowers.BorrowerID = Loans.BorrowerID. LIKE with the % wildcard matches a pattern, e.g. LIKE 'Mc%' finds values starting with Mc.
- WHERE vs HAVING in SQL
- WHERE filters individual rows before grouping. HAVING filters groups after GROUP BY, usually on an aggregate such as COUNT.
- What does ACID stand for in database transactions (HL)?
- Atomicity (all of a transaction happens or none), consistency (the database stays valid), isolation (concurrent transactions do not interfere) and durability (committed changes survive failures).
- What do BEGIN TRANSACTION, COMMIT and ROLLBACK do (HL)?
- BEGIN TRANSACTION starts a group of changes. COMMIT makes them permanent. ROLLBACK undoes them, returning the database to its state before the transaction.
A.4 Machine learning
- Rule-based programming vs machine learning
- In rule-based programming a programmer writes the rules. In machine learning the system derives its own rules, or model, from data.
- What are training data and features?
- Training data is the set of examples a model learns from. Features are the measurable input properties of each example that the model uses to make its prediction.
- Supervised vs unsupervised learning
- Supervised learning trains on labelled data, where the correct output is known, e.g. emails marked spam or not. Unsupervised learning finds patterns or groups in unlabelled data, e.g. clustering customers.
- Name three ethical issues raised by machine learning
- Bias in training data leading to unfair or discriminatory outputs; lack of transparency in how automated decisions are reached; the environmental and energy cost of training large models.
- Give three real-world applications of machine learning
- Any three of: spam filtering, recommendation systems, image and speech recognition, medical image analysis, fraud detection, language translation.