1/128
All worksheets from CS50 lectures and Blown to Bits chapters.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Name at least 3 programming languages mentioned by the lecturer, David Malan.
David Malan mentions several programming languages, including C, Python, Scratch, and Java.
What system do computers use to communicate numbers (and more)?
Computers use the binary system to represent and communicate numbers and other information.
How high can we count with 3 “light bulbs”? Extension: How high could we count with 4 “light bulbs”?
With three “light bulbs,” a computer can count from 0 to 7. With four “light bulbs,” it can count from 0 to 15.
How do computers represent letters of the alphabet (in the United States)?
Computers in the United States represent letters using ASCII, which assigns a number to each character.
What is a bit? What is a byte?
A bit is the smallest unit of information and can be either 0 or 1. A byte is a group of 8 bits.
How many symbols can you represent with 8 bits?
Eight bits can represent 256 different values.
How are emojis communicated from one device to another?
Emojis are communicated using Unicode code points, which ensure consistent representation across devices.
What system is used to (ideally) represent all characters/symbols in human languages?
The system used is Unicode.
How are colors represented on/by a computer?
Colors are represented using combinations of red, green, and blue (RGB) values.
How does a computer represent/store a video?
A computer stores video as a sequence of individual images (frames) along with audio, compressed to reduce file size.
What does it mean when you see a file with the extension names .gif or .jpg or .doc or .txt or . . . ? That is, what does it mean to a computer?
A file extension tells the computer how to interpret the file’s bytes, indicating what type of data it contains.
What is an algorithm? Give an example.
An algorithm is a step-by-step set of instructions for solving a problem. A phone-book search method is an example.
What are two important characteristics of a useful algorithm?
A useful algorithm should be correct and efficient.
What are the 3 functions that describe the 3 algorithms that David used for the “phone book problem”?
The three functions are linear search, binary search, and constant-time search (like knowing the page instantly).
What is pseudocode?
Pseudocode is a human-readable description of an algorithm that resembles code but is not written in a real language.
Why do computers sometimes hang up (or get stuck in an endless loop) according to the lecturer (David)?
Computers get stuck when an algorithm contains logic errors that cause conditions to never become false, creating infinite loops.
What is a boolean expression?
A boolean expression is an expression that evaluates to true or false.
What is the name of the cat in the default set‐up of the Scratch programming environment?
The default Scratch cat does not have an official name; it is simply called the Scratch Cat.
What “bug” does David create with his Scratch program?
David creates a bug where the Scratch cat moves off-screen endlessly due to improper stopping conditions.
What is an important element of program design, involving repetition?
An important element is the use of loops, which allow actions to repeat automatically.
What does ISP stand for? Name at least two companies that serve as ISPs.
ISP stands for Internet Service Provider. Examples include Comcast and Verizon.
What are IP addresses, and what is their function/purpose?
An IP address is a unique identifier that specifies where devices are on a network so data can be delivered correctly.
What does DHCP stand for, and what does it do?
DHCP stands for Dynamic Host Configuration Protocol, and it automatically assigns IP addresses to devices.
What is a DNS server, and what is its purpose?
A DNS server is a Domain Name System that translates domain names like “google.com” into their numeric IP addresses.
How does the lecturer (David) first describe a packet?
David describes a packet as a small envelope of data sent across the internet.
When requesting an image (or other information) from a site like google.com, how is that information delivered to the user?
It is delivered in small packets that travel independently and are reassembled by the user’s computer.
What does TCP stand for, and what is its purpose/function?
TCP stands for Transmission Control Protocol, and it ensures reliable, ordered delivery of data.
What is HTTP, and what does it have to do with the number 80?
HTTP is the Hypertext Transfer Protocol, and it typically uses port 80 for communication.
We now have a list of protocols (see above). What is a protocol?
A protocol is a set of rules that computers follow so they can communicate the same way.
In what context would UDP be useful (UDP does not guarantee a response)?
UDP stands for User Datagram Protocol is useful when you want speed over reliability, such as transmitting audio or video where losing a little data isn’t a big deal.
How many IP addresses are available using IP version 4? What’s the power of 2 (number of IP addresses) for version 6?
IPv4 has 2³² ≈ 4 billion addresses while IPv6 has 2¹²⁸ addresses.
Why are many IP addresses private (such as 10.)?
They are private so multiple devices on a local network can share one public IP.
What is the purpose of a router?
A router forwards packets between networks, connects multiple networks, and decides where they should go next.
Do routers sometimes “drop” packets? What happens in these cases?
If a router is overloaded or can’t forward a packet, it drops it. The sender usually resends the packet (via TCP).
What does traceroute tell you?
Traceroute reveals the path your packets take, hop by hop, across routers on the internet.
How are routers typically connected between different continents?
They are connected by undersea fiber-optic cables running across oceans.
What did the lecturer (David) find when he cut the network cable?
When he cut the cable, the signal stopped, demonstrating how data literally travels through physical wires like light/electricity.
What “really happens” when you delete a file? Is the file truly deleted?
Deleting usually removes only the file’s reference, not the actual data — the data stays until overwritten.
What are the advantages of being able to recover a deleted file?
You can undo mistakes, recover lost work, or retrieve accidentally deleted data.
What is a cookie (as it relates to web sites, not chocolate chips)?
A cookie is a small piece of data a website stores on your computer.
How is a cookie used to make web browsing more efficient?
Cookies remember who you are (like staying logged in), saving settings or session data.
How might a hacker make use of a cookie to impersonate another user?
If a hacker steals your cookie, they can pretend to be you by presenting that cookie to the website.
If you clear your browser history (and cookies), what are the downsides?
You get logged out, lose saved preferences, and sites act like you're visiting for the first time.
Why is a 4‐digit passcode considered a poor level of security?
Because it only has 10,000 possibilities, making it easy to guess or brute-force.
What are some popular passwords, and why are they ill‐chosen?
Things like “123456”, “password”, “qwerty” are bad because they are easy to guess.
Why might it be a poor policy to have all employees change their password(s) every 6 months?
Because people choose weaker, easier-to-remember passwords or write them down.
If you forget a password to a website, what is the typical process for accessing the site again?
Websites usually send a password reset link to your email.
Why is it poor practice for a website to email you your password?
Because it means the website is storing your password in plain text, which is insecure.
Is it a good idea to use the same password for different websites? Why or why not?
No — if one site is hacked, all your accounts become vulnerable.
What is two‐factor authentication?
A second form of verification, such as a code on your phone, in addition to your password.
When using “free” Wi‐Fi (such as that found in a hotel or airport), what is the security risk?
Others on the same network could intercept your traffic.
What is a VPN, and how does it increase security?
A VPN encrypts your internet traffic and routes it through a secure server.
What is an electronic firewall?
A firewall filters incoming and outgoing traffic to block suspicious activity.
How many keys does public‐key cryptography use?
Two keys — a public key and a private key.
What is a Phishing attack?
A fraudulent attempt to trick you into giving up information by pretending to be a trusted entity.
What is malware?
Malicious software designed to damage or gain access to your system.
What is ransomware?
Malware that encrypts your files and demands payment to restore them.
What is a computer?
A computer is a machine that takes input, processes it with an algorithm, and produces output.
Give at least 3 examples of input.
3 examples of input are keyboard, mouse, microphone, camera.
What is an algorithm?
A set of step-by-step instructions for solving a problem.
What is the difference between hardware and software?
Hardware is physical components while software is instructions/programs that run on the hardware.
Give at least 3 examples of an operating system.
Some examples of operating systems are Windows, macOS, Linux, iOS, and Android.
What is a CPU?
A CPU is the central processing unit and it executes instructions.
What is a core, and what is hyperthreading?
A core is an independent processing unit. Hyperthreading allows one core to handle multiple threads.
What is a motherboard?
A motherboard is the main circuit board connecting all components.
What is RAM?
RAM is temporary, fast memory the CPU uses while running programs.
What is the difference between HDD and SSD?
HDD uses spinning magnetic disks while SSD uses flash memory and is much faster.
Describe the OS of a computer.
The operating system manages hardware, memory, files, and runs programs.
Does a CPU have memory? Explain.
CPUs have small, fast memory called caches.
Describe the L1, L2, and L3 Caches.
L1: smallest, fastest; L2: bigger, slower; L3: biggest, slowest; all help speed up data access.
What are the tradeoffs for memory?
Speed vs. cost vs. size (faster memory is more expensive and smaller).
What is a transistor, and how is it used in Boolean Logic?
A transistor is a tiny switch that turns on/off to represent 1s and 0s, enabling logic gates.
Name at least 3 file formats for audio files.
File formats for audio files include MP3, WAV, FLAC, and AAC.
What does the term “lossy” mean, in regard to file compression in general (and audio files in particular)?
Lossy compression throws away some data to make files smaller.
How does the lecturer (David) describe a graphic?
A graphic is made of tiny squares called pixels.
What is RGB, and how is it used to create colors?
RGB is red, green, blue with digits up to 255 using binary where the amounts of each combine to form any color.
What are the “digits” for hexadecimal, and what values do they represent?
0–9 and A–F, representing 0 to 15.
How does Photoshop (and other programs like it) use hexadecimal to represent the colors red, green, and blue?
It uses hex codes like #FF0000 for red — one pair for R, G, and B.
What is a BITMAP, and what are its limitations (and, by extension, the limitations of any digital image)?
A bitmap stores an image pixel by pixel, limited by resolution and file size.
What scheme does the lecturer (David) describe for storing an image losslessly?
Run-length encoding (RLE) — storing repeated pixels as counts instead of individually.
What happens when lossy compression is used to store an image?
Some image detail is irreversibly removed to reduce file size.
Name at least 3 file formats for image files, and describe how they are typically used.
3 file formats are JPEG which is typically used for photos (lossy), PNG which is typically used for graphics (lossless), and GIF which is typically used for animations (few colors).
What idea does the lecturer (David) debunk in regard to image enhancement?
You can’t infinitely zoom and enhance, meaning you can’t create detail that wasn’t saved.
What technique(s) does the lecturer (David) discuss in regard to video file compression?
Storing differences between frames instead of every frame entirely.
Name at least 3 file formats for video files, and describe where/how they are typically used.
Some file formats are MP4, AVI, MOV, used for streaming, editing, or portability.
What is metadata?
Metadata is data about data such as timestamps, camera models, location, etc.
Is this book about computers? If not, then what is it about?
No, the book is not about computers themselves. It is about the digital explosion and how the flood of bits has transformed society, affecting law, business, privacy, and everyday life.
What is “a bits story”?
A “bits story” is a story in which something that happens to digital information—bits—results in significant consequences in the real world, showing how the movement or copying of bits can affect people and institutions.
Current cell phones can store large amounts of data. What, for example, could be stored on a typical cell phone?
A phone can store huge amounts of information, such as song lyrics that would have needed a thousand-page book, easily fitting into just a single gigabyte of storage.
Why are the seven “truths” listed in this chapter called koans?
They are called koans because they are presented as thought-provoking truths or puzzles, encouraging the reader to reflect deeply on the nature of the digital world, much like traditional Zen koans.
In what way are digital copies “perfect”?
Digital copies are “perfect” because copying bits produces an exact duplicate with no degradation, meaning each copy is identical to the original.
Now, almost anyone can be a publisher (and no one needs an editor), producing content on the internet. Why might this be dangerous?
This can be dangerous because without editors or gatekeepers, false, harmful, or misleading information can be distributed instantly to large audiences, and once it spreads, it can be impossible to fully retract.
What is Moore’s Law, and approximately how long did this law continue to be true?
Moore’s Law states that the number of transistors on a chip doubles about every 18 months. According to the chapter, this trend held true for roughly 40 years.
What brought about the demise of the Kodak film company?
Kodak declined because digital cameras replaced film, and once images became digital, Kodak’s profitable chemical-based film business was no longer necessary.
Do the authors of this book claim that information technology is good, or bad? Explain.
The authors do not claim that technology is entirely good or bad; rather, they argue that it is powerful and transformative. They emphasize that it has both benefits and dangers that society must understand and manage.
What effect has the digital explosion had on our privacy?
The digital explosion has greatly reduced privacy by making it easy to collect, copy, store, and search enormous amounts of personal information, making it harder to control who knows what about us.
Name and describe two things about the current digital world that George Orwell DID NOT anticipate/imagine.
George Orwell did not anticipate that cameras are far from the most pervasive of today’s tracking technologies. He did not have the search engines to piece the bits together and the digital explosion scattered the bits of our lives everywhere.
What does the consumer get in exchange for his/her loss of privacy?
Consumers get convenience, personalization, and services by trading their personal data for these benefits.
Name at least two ways in which we contribute to the networks that surveil us.
Two ways are using smartphones, apps, and social media, which collect location and behavioral data and making online purchases or using credit/debit cards, which generate transactional records.
How did computer scientists identify close‐knit communities among Enron employees?
They analyzed email traffic patterns and communication networks to detect clusters of frequent interaction, revealing informal groups within the company.