π Lecture 10 β Muhammad Imran 10
π Overview: This lecture introduces advanced Google search techniques, specifically the
intextoperator for searching within page bodies and theAROUND()operator for proximity searches. It then critically shifts focus to the dangers of internet searching, outlining three main categories of content to avoid to protect privacy, avoid legal scrutiny, and prevent cyber-security threats.
ποΈ Topics Covered
The lecture begins with the intext operator for phrase and term searching within a webpage's body. It explains the AROUND() operator for proximity searches, followed by a complex query example combining site: and -inurl:. The module then shifts to "What we should not search on Internet," covering reasons related to Google Ads, security agencies, and malware, and details three categories of dangerous searches: those that trigger ads, those that alert law enforcement, and those that lead to cyber-security attacks.
π Lecture Summary
8.5. Proximity Search
This section explains how to search for two words that must appear close to each other on a webpage, within a specified word margin. The AROUND(N) operator is used for this purpose. For example, to find pages where "education" and "virtual university" appear within three words of each other, the query would be education AROUND(3) "virtual university".
π Definition β Proximity Search: A search technique using the AROUND(N) operator to find web pages where two specified terms are located within N words of each other.
π Formula: [term1] AROUND(N) [term2] β Finds pages where term1 and term2 are separated by N words or fewer.
π Example: Query: education AROUND(3) "virtual university". This returns all web pages where the word "education" and the phrase "virtual university" are located within a margin of three words from each other.
8.6. Letβs solve a complex Query
This section demonstrates combining multiple operators to answer a specific question: "We are interested to see how many of pages of a website are not secured?" The solution uses the site: operator to restrict results to a specific domain and the -inurl: operator to exclude pages containing "https" in their URL, thereby finding unsecured (HTTP) pages.
π Example: Query: site:youtube.com -inurl:https. This command searches for all pages within the youtube.com website that do not have "https" in their URL, effectively showing the unsecured pages of that site.
Module 9
9. What we should not search on Internet
This module explains that despite the powerful search tools available, there are many things one should not search for due to three main reasons: 1) Google Ads serve advertisements based on queries and history, 2) Security Agencies monitor queries and may investigate sensitive terms, and 3) searching for items like "free music" can lead to virus infections.
π‘ Why this matters: Understanding these risks helps users maintain their privacy, avoid legal trouble, and protect their devices from malware.
9.1. Avoiding Ads
To avoid unnecessary targeted advertisements, users should refrain from searching for personal and sensitive information. The following search terms can trigger ads: your email, medical issues and drugs, your name, your location, and your favorite things.
9.2. Dangerous to Search
Searching for certain terms can alert law enforcement agencies or security organizations. A famous example is the "Pressure Cooker bomb" story, where a search for this term led security representatives to the searcher's location. To avoid this, do not search for: Attacks, Suicide bomb, Killers/Underworld, Terrifying insects, Killing animals, Poisons, Murder, Medical Symptoms, How to make computer Virus, Hacking, About Religion, and About Politics.
9.3. Avoid Cyber-security attacks
This section (left incomplete in the text) warns against searching for specific things that can lead to cyber-security attacks, such as downloading pirated music or software, which often contain malware.
β Key Takeaways
The AROUND(N) operator is crucial for proximity searches, allowing you to find pages where two terms are closely related. Complex queries can be solved by combining operators like site: and -inurl: to filter results for a specific purpose. You must be aware that search engines and security agencies track your queries, so searching for dangerous or sensitive terms like "Suicide bomb", "Murder", or "Hacking" can have real-world legal and physical consequences. Furthermore, searching for personal or medical information leads to targeted ads, and searching for free or pirated content can expose your computer to malware and viruses.
π§ Quick Revision Questions
- What is the purpose of the
AROUND()operator in Google search? - Write the query to find all unsecured pages (without HTTPS) on the website
example.com. - List the three main reasons why users should avoid searching for certain things on the internet.
- Name two types of search queries that can lead to unwanted advertisements from Google.
- Why is searching for "Pressure Cooker bomb" or "how to make computer Virus" considered dangerous?
π Lecture 11 β Roots of Computing
π Overview: This lecture examines the historical evolution of computing devices, from the ancient abacus through mechanical gear-based machines to punch card technology. It also provides a cautionary note about the dangers of seeking free music online and searching for disturbing medical imagery. Understanding these early computing milestones is essential for appreciating how modern electronic computers developed.
ποΈ Topics Covered
The lecture opens with warnings about hackers targeting free music websites and the unpleasant results of searching for graphic medical content. It then transitions to the "Roots of Computing," beginning with the Abacus as one of the earliest computing devices from ancient China, Greece, and Rome. Next, it covers the Technology of Gears period with inventors Pascal, Leibniz, and Babbage who used gear positioning for data representation. Finally, it discusses Punch Cards invented by Herman Hollerith for the 1890 U.S. census, which later led to IBM.
π Lecture Summary
β Free Music
The hackers normally add many viruses to such websites as the information seeker of free music etc.
9.4. Unpleasant Results
You might search the followings or similar thing and might get unpleasant results which might depress you. β Smokers Lungs β Skin Condition
10. Roots of Computing
Here we will see how we moved from mechanical driven machines to electronics driven machine (Computer).
10.1. Abacus
One of the earlier computing devices was the abacus. History tells us that it probably had its roots in ancient China and was used in the early Greek and Roman civilizations. The machine is quite simple, consisting of beads strung on rods that are in turn mounted in a rectangular frame as shown in Figure 11.
π‘ Why this matters: The abacus represents humanity's first attempt to create a physical device for performing calculations, establishing the fundamental concept of representing data through physical objects.
10.2. Technology of Gears
In the time period after the Middle Ages and before the Modern Era, the quest for more sophisticated computing machines was seeded. A few inventors began to experiment with the technology of gears. Among these were Blaise Pascal (1623β1662) of France, Gottfried Wilhelm Leibniz (1646β1716) of Germany, and Charles Babbage (1792β1871) of England. These machines represented data through gear positioning, with data being entered mechanically by establishing initial gear positions. Output from Pascalβs and Leibnizβs machines was achieved by observing the final gear positions. Babbage, on the other hand, envisioned machines that would print results of computations on paper so that the possibility of transcription errors would be eliminated. One typical diagram is shown in Figure 12.
π Definition β Gear-based computing machine: A mechanical device that represents data through the physical positioning of gears, where input establishes initial gear positions and output is read from final gear positions or printed results.
π Example: Pascal's machine required setting gears to initial positions representing input numbers; after mechanical operation, the user read the final gear positions to obtain the calculated result. In contrast, Babbage's proposed machine would have automatically printed results on paper, eliminating manual reading and transcription errors.
10.3. Punch Cards
Herman Hollerith (1860β1929) applied the concept of representing information as holes in paper cards to speed up the tabulation process in the 1890 U.S. census. (It was this work by Hollerith that led to the creation of IBM.) Such cards ultimately came to be known as punched cards and survived as a popular means of communicating with computers well into the 1970s. One typical punch card machine is illustrated in Figure 13.
π Definition β Punched card: A paper card containing information represented by holes punched in specific positions, used for data input and tabulation in early computing systems.
π‘ Why this matters: Hollerith's punch card system directly led to the founding of IBM, one of the most influential technology companies in history, and established data storage methods that persisted for nearly a century.
β Key Takeaways
The lecture traces computing's evolution from the ancient abacus through mechanical gear-based machines to punch card technology. The abacus, originating in ancient China, used beads on rods for calculation. Pascal, Leibniz, and Babbage pioneered gear-based computing, with Babbage uniquely envisioning printed output to eliminate transcription errors. Herman Hollerith's punched card system for the 1890 U.S. census led directly to IBM's founding and remained in use until the 1970s. Students must remember the sequence (abacus β gears β punch cards), the key inventors and their contributions, and how Hollerith's work influenced IBM's creation.
π§ Quick Revision Questions
- What were the three main stages in the evolution of computing devices covered in this lecture?
- Which ancient civilizations used the abacus, and how did it represent data?
- What was Charles Babbage's key innovation over Pascal and Leibniz's gear machines?
- How did Herman Hollerith's invention impact the 1890 U.S. census, and what company did it lead to?
- What were the two warnings given at the beginning of the lecture regarding internet searches?
π Lecture 12 β Mechanical-driven to Electronics-driven machines
π Overview: This lecture traces the critical transition from mechanical computing devices to electronic computers, explaining why nineteenth-century gear-driven machines were not commercially viable and how twentieth-century electronics overcame this barrier. It focuses on key electromechanical machines like the Stibitz machine and the Harvard Mark I, then examines the fully electronic ENIAC in detail, including its specifications and historical significance.
ποΈ Topics Covered
The lecture begins by explaining why mechanical machines of Pascal, Leibniz, and Babbage were not cost-effective due to limitations in nineteenth-century gear technology. It then discusses electromechanical machines like Stibitz's 1940 relay computer and the 1944 Harvard Mark I. The main focus is on the ENIAC (electronic numerical integrator and calculator), including its development by Mauchly and Eckert, a detailed factsheet covering its physical and technical specifications, and finally a brief overview of rapid advancement milestones following ENIAC.
π Lecture Summary
Mechanical-driven to Electronics-driven machines
Nineteenth-century technology was unable to produce the complex gear-driven machines of Pascal, Leibniz, and Babbage cost-effectively. However, with advances in electronics in the early 1900s, this barrier was overcome. Examples of this progress include the electromechanical machine of George Stibitz, completed in 1940 at Bell Laboratories, and the Mark I, completed in 1944 at Harvard University by Howard Aiken and a group of IBM engineers. These machines made heavy use of electronically controlled mechanical relays. In this sense they were obsolete almost as soon as they were built, because other researchers were applying the technology of vacuum tubes to construct totally electronic computers.
10.4. ENIAC
More flexible machines, such as the ENIAC (Electronic Numerical Integrator and Calculator) developed by John Mauchly and J. Presper Eckert at the Moore School of Electrical Engineering, University of Pennsylvania, soon followed as shown in Figure 14.
π‘ Why this matters: ENIAC marked the shift from electromechanical computing that used relay-based switches to fully electronic computing using vacuum tubes, dramatically increasing processing speed.
10.5. Factsheet of ENIAC
The ENIAC specifications include: Occupied 1800 square feet; 20,000 vacuum tubes; 1500 relays; 10,000 capacitors; 70,000 registers; 200 Kilo Watt electricity; Weight 30 tons; Cost = $487,000 (PKR = 62.5 millions). [Source: https://www.computerhope.com/jargon/e/eniac.htm]
π Definition β ENIAC: An electronic numerical integrator and calculator developed by John Mauchly and J. Presper Eckert at the Moore School of Electrical Engineering, University of Pennsylvania.
10.6. Rapid Advancement
Since the invention of ENIAC, there was a rapid advancement. The lecture notes indicate that key milestones are listed (though the specific milestones list is not fully detailed in the provided text). Two figures are referenced: Figure 13 showing Punch Cards and Figure 14 showing ENIAC.
β Key Takeaways
Students must remember that nineteenth-century technology could not cost-effectively produce complex gear-driven machines, a barrier overcome by twentieth-century electronics. The electromechanical machines (Stibitz's 1940 machine and the 1944 Harvard Mark I) used electronically controlled mechanical relays and were quickly obsolete once vacuum-tube technology emerged. ENIAC was the landmark fully electronic computer, developed by Mauchly and Eckert at the University of Pennsylvania. Its key specifications include 20,000 vacuum tubes, 1500 relays, 200 kW of electricity, 30 tons weight, and a cost of $487,000. After ENIAC, computing advanced rapidly with punch card technology remaining an important input/output medium.
π§ Quick Revision Questions
- Why were the mechanical gear-driven machines of Pascal, Leibniz, and Babbage not cost-effective in the nineteenth century?
- What two electromechanical machines are cited as examples of early twentieth-century computing progress, and who developed them?
- What technology made ENIAC "totally electronic" and distinguished it from relay-based machines?
- List at least five specifications from the ENIAC factsheet (e.g., number of vacuum tubes, square footage, weight).
- What was the total cost of ENIAC in US dollars and in Pakistani rupees (PKR) according to the lecture?
π Lecture 13 β Muhammad Imran 13
π Overview: This lecture provides a foundational introduction to computer history, the bit as the basic unit of storage, and how information is represented using binary patterns. It explains how bits are used to encode everything from numbers to text and covers the essential methods for converting decimal numbers to binary.
ποΈ Topics Covered
The lecture begins with a historical timeline of key technological milestones including transistors, integrated circuits, and the personal computer revolution. It then defines the bit as the basic unit of storage in computers and explains how information is coded as patterns of 0s and 1s. The lecture covers what bits can represent, units of digital storage from bytes to terabytes, and the number of patterns possible with different numbers of bits. It concludes with a basic introduction to converting decimal numbers to binary using powers of two.
π Lecture Summary
Module 11: Bits
In Computer, all kind of information is stored in bits. Bit is the basic unit of storage.
11.1. Basics
β Information is coded as pattern of 0 or 1 β Short form of Binary Digits β One bit can contain only one value 0 or 1
11.2. What Bits can represent:
β Representing numbers, text, audio, video, image etc. β In Chip electric Charge 0/1
11.3. Bits units
Table 1 shows the bits and their equivalent units.
π Definition β Bit: The basic unit of storage in a computer, which can hold only one of two values: 0 or 1.
π Formula β Storage Units:
- 1 Byte = 8 bits
- 1 Kilo Byte (KB) = 1024 Bytes
- 1 Mega Byte (MB) = 1024 KB
- 1 Giga Byte (GB) = 1024 MB
- 1 Tera Byte (TB) = 1024 GB
π Example: 1 GB is equivalent to 1024 MB, which means a file that is 1 GB in size is 1024 times larger than a file that is 1 MB.
11.4. Patterns Using Bits
In one bit we can represent two patterns either 0 or 1. If we have 2 bits then 4 different patterns can be represented as shown in Table 2.
π Definition β Bit Pattern: A unique sequence of 0s and 1s that can represent a single value. The number of possible patterns with n bits is 2n.
π Formula β Number of Patterns: Number of patterns = 2n, where n = number of bits.
π Example: With 3 bits, the number of patterns is 23 = 8 (the patterns are: 000, 001, 010, 011, 100, 101, 110, 111). With 8 bits (1 byte), there are 28 = 256 possible patterns.
At page 577 of your book, you can find ASCII codes, using which we can represent different characters. For example, representing character "A" we need to represent it using digit 65. The bit pattern of 65 would be: 01000001.
How did we get this? We will learn in details, at the moment you can just try to learn very basic method of converting decimal to binary. As the binary is represented using base 2. To represent any number, please form the representation as shown in the Table 4.
π Definition β Decimal to Binary Conversion: The process of converting a base-10 number into a base-2 (binary) number by finding which powers of two sum to the decimal value.
π Formula β Place Values for Binary: Each position in a binary number represents a power of 2 from 20 (1) on the rightmost end to higher powers moving left (21=2, 22=4, 23=8, 24=16, 25=32, 26=64, 27=128).
π Example: To represent the decimal number 65 in binary, we look at the place values: 128, 64, 32, 16, 8, 4, 2, 1. 65 is 64 + 1, so we put a 1 in the 64's place (26), a 0 in the 32's, 16's, 8's, 4's, and 2's places, and a 1 in the 1's place (20). This gives us 01000001.
π‘ Why this matters: Understanding this conversion is the basis for how all data is stored and processed in digital computers, from simple text characters like "A" to complex software applications.
β Key Takeaways
The most critical concepts from this lecture are that a bit is the fundamental unit of digital information, holding only a 0 or a 1. The number of distinct patterns possible with a given number of bits grows exponentially as 2n, which is why 8 bits (1 byte) can represent 256 different values. Digital storage units follow a hierarchy of bytes, kilobytes, megabytes, gigabytes, and terabytes, each being 1024 times larger than the previous. All data in a computerβnumbers, text, images, and soundβis ultimately encoded as patterns of bits. Finally, any decimal number can be converted to binary by representing it as a sum of powers of two, which is essential for understanding how computers store and manipulate numeric data.
π§ Quick Revision Questions
- What is a bit, and how many values can a single bit represent?
- How many bits are in one byte?
- Using Table 3 as a guide, how many different patterns can be represented with 5 bits? (Hint: 2n)
- What is the binary representation for the decimal number 65, and which character does it represent in ASCII?
- If you have a storage device with 4 GB of capacity, how many bytes is that equivalent to?
π Lecture 14 β Boolean Operations
π Overview: This lecture introduces the fundamental Boolean operations used to manipulate individual bits inside a computer, where bits are treated as true/false values. Understanding these operations is essential because they form the basis of all digital logic, from simple circuits to complex processors.
ποΈ Topics Covered
The lecture covers binary number representation using weighted bit positions (powers of 2), then introduces four Boolean operations: AND, OR, XOR (exclusive OR), and NOT. For each operation, the lecture explains the input/output rules with specific examples showing how bits are manipulated.
π Lecture Summary
Binary Representation Review
To represent any decimal number in binary, place a 1 in the bit position corresponding to that power of 2, and zeros elsewhere. For example, decimal 2 is represented by putting a 1 in the 2ΒΉ position (second bit from right) and zeros elsewhere: 00000010. Decimal 8 is 00001000 (2Β³ position), and decimal 65 is 01000001 (2βΆ + 2β°).
π Definition β Bit position: Each binary digit's place corresponds to a power of 2, starting from 2β° on the right. π Example: Represent decimal 2 β 2ΒΉ = 2, so put 1 in the 2ΒΉ position β 00000010
Boolean Operations
To understand how individual bits are stored and manipulated inside a computer, imagine that bit 0 represents false and bit 1 represents true. Operations that manipulate true/false values are called Boolean operations, named after mathematician George Boole (1815β1864), a pioneer in logic. The three basic Boolean operations are AND, OR, and XOR (exclusive OR).
AND Boolean Operation
The AND operation produces output 1 when both inputs are 1. Otherwise, it gives output 0.
π Definition β AND: Output is 1 only when both inputs are 1. π Formula: A AND B = 1 if A=1 and B=1, else 0 π Example: 1 AND 1 = 1; 1 AND 0 = 0; 0 AND 1 = 0; 0 AND 0 = 0
OR Boolean Operation
The OR operation produces output 1 when any of the inputs are 1. Otherwise, output is 0.
π Definition β OR: Output is 1 when at least one input is 1. π Formula: A OR B = 1 if A=1 or B=1, else 0 π Example: 1 OR 1 = 1; 1 OR 0 = 1; 0 OR 1 = 1; 0 OR 0 = 0
XOR Boolean Operation
XOR (Exclusive OR) produces output 1 when both inputs are different. It produces 0 when both inputs are the same.
π Definition β XOR: Output is 1 when inputs differ, 0 when inputs are identical. π Formula: A XOR B = 1 if Aβ B, else 0 π Example: 1 XOR 0 = 1; 0 XOR 1 = 1; 1 XOR 1 = 0; 0 XOR 0 = 0
NOT Operation
The NOT operation takes one input, produces 1 when input is 0, and produces 0 when input is 1.
π Definition β NOT: Inverts a single input (0 becomes 1, 1 becomes 0). π Formula: NOT A = 1 if A=0, else 0 π Example: NOT 0 = 1; NOT 1 = 0 π‘ Why this matters: NOT is the simplest Boolean operation, yet essential for building all logic circuits.
β Key Takeaways
The critical thing to remember is the behavior of each Boolean operation: AND requires both inputs to be 1 for a 1 output; OR requires at least one input of 1; XOR outputs 1 only when inputs differ; and NOT simply inverts a single input. These operations treat bits as true/false values (1=true, 0=false) and are the foundation for all computer logic. Binary number representation uses weighted bit positions (powers of 2) to encode decimal numbers. Memorize these rules precisely for any exam question about Boolean logic.
π§ Quick Revision Questions
- What output does AND produce when inputs are 1 and 0?
- What is the XOR result when both inputs are the same?
- What does NOT operation do when given input 0?
- How would you represent the decimal number 8 in binary using the weighted bit positions?
- Which Boolean operation produces 1 only when exactly one input is 1?
π Lecture 15 β Boolean Operation Example & Hexadecimal Notation & Storing a Bit
π Overview: This lecture continues the discussion of Boolean operations with a practical example and then introduces hexadecimal notation as a shorthand for representing long bit patterns. It concludes by explaining how individual bits are physically stored in a computerβs main memory using circuits like flip-flops.
ποΈ Topics Covered
The lecture demonstrates the Boolean operations AND, OR, XOR, and NOT using two example bit patterns A and B. It then explains the need for hexadecimal notation, shows how to convert a bit pattern into hexadecimal using the provided table, and finally introduces the concept of main memory and flip-flops for storing individual bits.
π Lecture Summary
12.5. Boolean Operation Example
The lecture provides a concrete example to show how the Boolean operations work. Two bit patterns are given as βAβ and βBβ in the first two rows of Table 6. The subsequent rows show the result of applying the βANDβ, βORβ, βXORβ, and βNotβ operations to both βAβ and βBβ. This example makes the abstract logical operations clear by showing their effects on actual bit strings.
Table 6: Example of Boolean operation
Module 13
13.1. Why we need Hexadecimal Notation
When working with the internal activities of a computer, we must handle patterns of bits, or bit strings, which can be quite long and are often called a stream. A long string of bits is difficult for the human mind to comprehend and error-prone to transcribe. To simplify representation, we use hexadecimal notation, a shorthand that takes advantage of the fact that bit patterns in a machine tend to have lengths in multiples of four. Hexadecimal notation uses a single symbol to represent a pattern of four bits. For example, a string of twelve bits can be represented by only three hexadecimal symbols.
13.2. Hexadecimal Representation
Table 7 presents the standard hexadecimal notation, which maps each possible 4-bit pattern to a single symbol (0-9 and A-F).
Table 7: Hexadecimal Notation
13.3. Hexadecimal Example
To represent the bit pattern 111010000101010100010111 in hexadecimal, we first divide it into groups of four bits, starting from the left. This is shown in Table 8.
Table 8: hexadecimal example
1110 | 1000 | 0101 | 0101 | 0001 | 0111
We then look up each 4-bit group in the hexadecimal notation table. The group 1110 corresponds to E, 1000 corresponds to 8, 0101 corresponds to 5, and so on. The final hexadecimal representation is E85517.
π Example: Convert bit pattern 111010000101010100010111 to hexadecimal.
- Divide into 4-bit groups: 1110 1000 0101 0101 0001 0111
- Convert each group using the table: E 8 5 5 1 7
- Result: E85517
Module 14
14.1. Main Memory
For the purpose of storing data, a computer contains a large collection of circuits, each capable of storing a single bit. This bit reservoir is known as the machineβs main memory. A typical circuit used for this purpose is the flip-flop, as shown in Figure 17. Flip-flops can hold a stable state of 0 or 1, representing a stored bit.
Figure 17: A typical Flipflop
π Definition β Main Memory: The large collection of circuits (such as flip-flops) within a computer, each capable of storing a single bit of data.
β Key Takeaways
The lecture provides a practical example of Boolean operations on two bit patterns. It then introduces hexadecimal notation as a vital shorthand for representing long bit strings, making them easier for humans to work with, and demonstrates the conversion process. Finally, it explains that individual bits are physically stored in a computer's main memory using circuits called flip-flops, which form the fundamental storage unit.
π§ Quick Revision Questions
- What are the four Boolean operations demonstrated in Table 6?
- Why is hexadecimal notation a useful shorthand for representing bit patterns?
- How many bits does a single hexadecimal symbol represent?
- What is the hexadecimal representation of the bit pattern 111010000101010100010111?
- What type of circuit is typically used to store a single bit in a computer's main memory?
π Lecture 16 β 14.2 Main Memory Organization
π Overview: This lecture explains how a computer's main memory is organized into cells and addresses, covering byte organization and different types of RAM. It also introduces mass storage systems, specifically magnetic storage, which are essential for non-volatile, large-capacity data retention.
ποΈ Topics Covered
Main memory organization into 8-bit cells, byte size organization with most and least significant bits, memory addressing, random access memory (RAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), and an introduction to magnetic mass storage systems.
π Lecture Summary
14.2. Main Memory Organization
Main memory is organized into manageable units called cells, each consisting of 8 bits. Household devices typically have a few hundred cells, while large computers may have billions of cells.
π Definition β Cell: The smallest manageable unit in main memory, consisting of 8 bits.
14.3. Byte Size Organization
In computer science, there is no physical left or right orientation in memory, but for understanding the significance of bits, we represent most significant bits on the left side and least significant bits on the right side. This is illustrated in Figure 18, which shows a byte organized as bits 7 (most significant) through 0 (least significant) from left to right.
π Concept: Bits in a byte are numbered from 0 (least significant, rightmost) to 7 (most significant, leftmost) for convenience and consistency.
14.4. Memory Address
To identify individual cells in a computer's main memory, each cell is assigned a unique "name" called its address. Figure 19 shows memory arranged with addresses, where each cell (containing 8 bits) has a distinct address such as 0, 1, 2, 3, etc.
π Definition β Memory Address: A unique identifier assigned to each cell in main memory, allowing the CPU to locate and access specific data.
π Example: In Figure 19, address 0 refers to the first cell, address 1 refers to the second cell, and so on. To access data in cell 5, the CPU uses its address (5).
14.5. RAM
The cells in main memory can be accessed independently as required. To reflect the ability to access cells in any order, a computer's main memory is often called random access memory (RAM).
π Definition β Random Access Memory (RAM): A type of computer memory where any cell can be accessed directly in any order, regardless of its physical location.
π‘ Why this matters: RAM's random access capability allows the CPU to read or write data from any memory location quickly, which is essential for efficient program execution.
14.6. DRAM
Dynamic RAM (DRAM) stores bits as tiny electric charges. Because these charges leak away over time, DRAM must refresh (rewrite the charge) many times a second to retain data.
π Definition β Dynamic RAM (DRAM): A type of RAM that stores each bit as an electric charge in a capacitor, requiring periodic refreshing to maintain data integrity.
π‘ Why this matters: DRAM is slower due to refreshing but is cheaper and denser, making it suitable for main memory in most computers.
14.7. SDRAM
Synchronous DRAM (SDRAM) refers to DRAM that applies additional techniques to decrease the time needed to retrieve the contents from its memory cells. It is synchronized with the system clock for faster data access.
π Definition β Synchronous DRAM (SDRAM): An enhanced version of DRAM that synchronizes with the system clock and uses techniques like pipelining to speed up memory access.
15.1. Mass Storage (Magnetic Systems)
Due to the volatility (data loss when power is off) and limited size of a computer's main memory, most computers have additional memory devices called mass storage (or secondary storage) systems. These include magnetic disks, CDs, DVDs, magnetic tapes, flash drives, and other systems.
π Definition β Mass Storage: Non-volatile, large-capacity storage devices used to supplement main memory for long-term data retention.
β Key Takeaways
A computer's main memory is organized into 8-bit cells, each with a unique address allowing random access. Bits within a byte are conventionally ordered with the most significant bit on the left and least significant on the right. RAM allows direct access to any cell in any order, with DRAM using electric charges that require frequent refreshing, and SDRAM improving speed through synchronization. Mass storage systems like magnetic disks provide non-volatile, large-capacity storage to overcome main memory's limitations.
π§ Quick Revision Questions
- How many bits are in each memory cell?
- What is the difference between a memory cell and a memory address?
- Why does DRAM need to be refreshed many times per second?
- What is the key advantage of SDRAM over regular DRAM?
- Why do computers need both main memory (RAM) and mass storage devices?
π Lecture 17 β Mass Storage Systems and Optical Systems
π Overview: This lecture covers the fundamental principles of mass storage systems, focusing on magnetic disk drives, their mechanical operations, and performance metrics. It then introduces optical storage systems like CDs, DVDs, and Blu-ray discs, explaining their different data storage mechanisms and comparative advantages.
ποΈ Topics Covered
The lecture begins by explaining mass storage advantages over main memory, then details how magnetic disk drives operate including tracks, sectors, and zoned-bit recording. It defines key performance metrics: seek time, rotation delay, access time, and transfer rate. Finally, it introduces optical systems, focusing on compact disks and their single-track spiral data storage.
π Lecture Summary
15.2. How it works
A typical hard disk drive consists of a thin spinning disk with a magnetic coating that holds data. Read/Write heads are positioned above or below the disk surface. Each head traverses a circular path called a track. Normally, each track is divided into equal sectors, and sectors contain equal numbers of bits, typically 512 bytes to a few KBs. Notably, outer tracks contain more information than inner tracks.
15.3. Zoned-bit recording
In zoned-bit recording, adjacent tracks form Zones. A typical disk contains approximately 10 zones. All tracks within a single zone have an equal number of sectors, allowing for more efficient data storage by grouping tracks with similar characteristics.
15.4. Seek Time
Seek Time is defined as the time required to move the read/write heads from one track to another.
π Definition β Seek Time: The time required to move the read/write heads from one track to another on a magnetic disk.
15.5. Rotation Delay
Rotation Delay (also called rotational latency) is the average amount of time required for the desired data to rotate around to the read/write head once the head has been positioned over the desired track.
π Definition β Rotation Delay: The average time for the desired data to rotate to the read/write head after the head has been positioned over the correct track.
15.6. Access Time
Access Time is the sum of seek time and rotation delay.
π Formula: Access Time = Seek Time + Rotation Delay
π Definition β Access Time: The total time required to position the read/write head over the correct track and for the desired data to rotate under the head.
15.7. Transfer rate
Transfer rate is the rate at which data can be transferred to or from the disk once the head is positioned over the correct data location.
π Definition β Transfer Rate: The speed at which data can be read from or written to the magnetic disk.
16. Optical System
Another class of mass storage system applies optical technology. Examples include the Compact Disk (CD), Digital Versatile Disks (DVDs), and Blu-ray Disks (BDs). These systems use lasers to read data from reflective surfaces.
16.1. Compact Disk
The Compact Disk (CD) is 12 centimeters in diameter and consists of reflective material. Information is recorded by creating variations in the reflective surface. Data is stored on a single-track spiral from the inside to the outside of the disk. Each track is divided into sectors with a capacity of 2KB of data or 1/75 of a second of audio music. Retrieval uses a Laser that detects irregularities on the reflective surface as the CD spins. Originally applied to audio recording using the CD-DA (Compact Disk-Digital Audio) format, this format is still used today for computer data storage. Because optical systems have only one continuous track, all sectors are not individually accessible, making data retrieval slower in optical systems than in magnetic systems. Therefore, the optical system is best suited for long, continuous strings of data.
π Definition β Compact Disk (CD): A 12 cm optical storage medium using a single spiral track that stores data as variations on a reflective surface, read by a laser.
π‘ Why this matters: The single-track architecture of CDs means that random access is much slower than magnetic disks, making optical storage ideal for sequential data like music or video rather than frequently accessed files.
β Key Takeaways
For exam purposes, students must understand the fundamental difference between magnetic and optical storage: magnetic disks use multiple concentric tracks with individual sectors accessible by moving a read/write head, while optical disks use a single continuous spiral track. The key performance metricsβseek time, rotation delay, access time, and transfer rateβare critical for evaluating disk performance. Zoned-bit recording optimizes storage by grouping tracks into zones with equal sector counts. Finally, remember that magnetic systems offer faster random access, while optical systems are best for long sequential data streams.
π§ Quick Revision Questions
- What are the four components of disk access time, and how are they related?
- How does zoned-bit recording differ from traditional track formatting on a magnetic disk?
- Why is data retrieval faster in magnetic disk systems compared to optical disk systems?
- What is the storage capacity of a single CD sector, and how does the spiral track differ from magnetic disk tracks?
- What is the advantage of outer tracks containing more information than inner tracks in magnetic disks?
π Lecture 18 β Representing Text
π Overview: This lecture explores how text is stored and represented in computer memory. It covers different types of storage technologies including DVDs, BDs, flash drives, and SSDs, then focuses on the fundamental principles of text encoding using bit patterns and standardized codes like ASCII.
ποΈ Topics Covered
The lecture begins with DVD and BD storage technologies, then examines flash drive technology including issues with magnetic and optical systems, flash drive operation, SSDs, and SD cards. The main focus shifts to representing text as code, discussing how textual symbols are assigned unique bit patterns and the historical development of encoding standards like ASCII.
π Lecture Summary
16.2. DVD (Digital Versatile Disks)
CDs have a capacity of 600 to 700 MB, but DVDs have space in GBs because they have multiple semi-transparent layers, which can be viewed by a precise focused laser. Its shape is like a CD.
16.3. BDs (Blue Ray Disks)
BDs (Blu-ray Disks) use a blue-violet spectrum of light (instead of red), which is able to focus its laser beam with very fine precision. BDs provide five times the capacity of DVDs.
17.1. Issues in Magnetic and Optical Systems
Several issues affect magnetic and optical systems: physical motion is required, moving read/write heads are needed, laser beams must be aimed, and all this takes a lot of time compared to electronic circuitry.
17.2. Flash Drive Technology
In flash drive technology, bits are stored by sending electronic signals directly to the storage medium where they cause electrons to be trapped in tiny chambers of silicon dioxide. These chambers are able to store data for years without external power. Repeated erasing slowly damages the silicon dioxide chambers. Flash drives are not suitable in place of main memory. They are suitable where alterations can be controlled, like in cameras, smart phones, and portable devices. They are not as reliable as optical disks for long-term storage.
17.3. SSDs (Solid State Disks)
SSDs (Solid State Disks) are larger flash memory devices designed to take the place of magnetic disks. They offer quiet operations and low access time. However, they are costlier than magnetic systems.
17.4. SDs (Secure Digital Memory Cards)
SDs (Secure Digital Memory Cards) provide up to a few GBs of storage. They are available in smaller, mini, and micro sizes. SDHC (High Capacity) can provide 32 GBs. SDXC (Extendable Capacity) may exceed 1 TB. They have a compact physical size, suitable for car navigation, cameras, etc.
18.1. Representation as Code
Text is stored in computer memory through representation as code. Each textual symbol is represented with a unique bit pattern, normally 8 bits for each character. For example, "Virtual University" has 18 characters, which equals 18 * 8 = 144 bits or 18 bytes. In the 1940s and 1950s, many such codes were designed. Key organizations and standards include the American National Standards Institute (ANSI) and the American Standard Code for Information Interchange (ASCII).
π Definition β ASCII: American Standard Code for Information Interchange, a standard code where each character is represented by a unique 8-bit pattern.
π Formula: Text size (in bytes) = number of characters Γ 1 byte per character β This means each character in a text string requires 8 bits (1 byte) of storage.
π Example: The text "Virtual University" has 18 characters. Using 8 bits per character, this requires 18 Γ 8 = 144 bits, or 18 bytes of storage.
β Key Takeaways
The key points from this lecture are that DVDs and BDs offer much higher storage capacity than CDs through multiple layers and precise laser focusing. Flash drives, SSDs, and SD cards use electronic signaling to trap electrons in silicon dioxide chambers, eliminating the physical motion issues of magnetic and optical systems. Text is represented in computer memory by assigning each character a unique bit pattern, with 8 bits (1 byte) being the standard per character. ASCII is the foundational standard for text encoding, developed by ANSI, where each symbol corresponds to a specific binary code.
π§ Quick Revision Questions
- What technology enables DVDs to have greater storage capacity than CDs?
- Why do Blu-ray Disks (BDs) provide five times the capacity of DVDs?
- What is the main disadvantage of repeated erasing in flash drive technology?
- How many bits are required to store the word "Computer" (8 characters) using standard 8-bit encoding?
- What do the acronyms ASCII and ANSI stand for in the context of text representation?
π Lecture 19 β Representing Numeric Values
π Overview: This lecture explains how numeric values are represented in computer systems, beginning with a discussion of ASCII codes and their limitations, which led to the development of Unicode and UTF-8. The second half focuses on binary notation as an efficient method for representing numbers, demonstrating how bit patterns map to numeric values.
ποΈ Topics Covered
The lecture covers ASCII codes (7-bit representation, 128 combinations, and examples), limitations of ASCII (only 128 characters) and ASCII-extensions (still insufficient for multilingual documents), then introduces Unicode (21-bit patterns, compliance with ASCII) and UTF-8 (24-32 bits, over 16 million symbols). The second half addresses issues in storing numeric values as Unicode (inefficiency) and introduces binary notation for representing numeric values using 3-bit and 4-bit representations.
π Lecture Summary
18.2. ASCII Codes
ASCII (American Standard Code for Information Interchange) uses 7 bits for information, with the most significant bit always set to zero. This provides 2^7 = 128 possible combinations. ASCII represents uppercase letters, lowercase letters, punctuation marks, digits 0 to 9, line feed, carriage returns, and tabs. The full ASCII table is available on page 577 of the textbook.
18.3. ASCII code example
To represent the word "Hello" using ASCII, each character is looked up in the ASCII table and converted to its corresponding binary code. The solution is shown in Figure 22 of the lecture text.
18.4. Limitation of ASCII codes
ASCII has only 128 characters, which is too limited for many applications. To address this, the International Organization for Standardization (ISO) developed many extensions to ASCII, including one specifically designed to support western language symbols.
18.5. Limitations of ASCII-extensions
Even with extensions, 256 characters are still insufficient to denote all language symbols. A major problem arises when a document contains multiple languages β it cannot be read properly because the document must follow a single standard, making cross-language documents impossible.
18.6. Unicode
Unicode was created through the internationalization of codes by hardware and software manufacturers. It uses unique patterns of 21 bits, providing over 2 million possible characters. Unicode maintains compliance with ASCII (the first 128 codes match ASCII exactly) and supports thousands of character sets, including Chinese, Hebrew, Japanese, and many others.
18.7. UTF-8
UTF-8 (Unicode Transformation Format - 8-bit) uses 24 to 32 bits, allowing for enormous expansion possibilities. With 2^24 = 16,777,216 unique symbols, UTF-8 can represent virtually all known writing systems. A file consisting of long symbols encoded with either ASCII or Unicode is called a text file.
19. Representing Numeric Values
This module explains how numeric values can be efficiently represented in computer systems.
19.1. Issues in storing numeric as Unicode
Storing numeric values as Unicode is highly inefficient. For example, storing the number 12 would require 16 bits using Unicode, and 99 would also require 16 bits. In contrast, the same 16 bits can store 65,535 different numeric values when using proper numeric encoding methods.
19.2. Binary Notation
Binary notation is a way of representing numeric values using only the digits 0 and 1, rather than the decimal digits 0-9. Using three bits, we can represent numeric values as shown in Table 9 (in the lecture). When we add another bit and use 4 bits, as shown in Table 10, we can represent 16 values ranging from 0 to 15.
π Definition β Binary Notation: A system of representing numeric values using only the digits 0 and 1, where each position represents a power of 2.
π Formula: For n bits, the range of representable values is 0 to (2^n - 1) β With 3 bits: 0 to 2^3 - 1 = 0 to 7 β With 4 bits: 0 to 2^4 - 1 = 0 to 15
π Example: Using 4-bit binary notation, the decimal number 10 is represented as 1010 (1Γ8 + 0Γ4 + 1Γ2 + 0Γ1 = 10).
β Key Takeaways
The most critical points to remember from this lecture are: ASCII uses 7 bits to represent 128 characters but is insufficient for global needs, leading to Unicode's 21-bit system with over 2 million characters and UTF-8's 24-32 bit system with over 16 million symbols. Storing numbers as Unicode is highly inefficient compared to binary notation, where n bits can represent 2^n values from 0 to (2^n - 1). With 3 bits we represent 8 values (0-7), and with 4 bits we represent 16 values (0-15). Binary notation forms the foundation of all numeric computation in computer systems.
π§ Quick Revision Questions
- How many characters can ASCII represent, and how many bits does it use?
- What is the main limitation of ASCII extensions when dealing with multilingual documents?
- How many bits does Unicode use, and what is the key advantage over ASCII?
- How many unique symbols can UTF-8 represent, and how many bits does it use?
- If you have 4 bits in binary notation, what range of numeric values can you represent, and how many total values is that?