Basic Computing Ch1 2
Basic Computing Ch1 2
internet, from artificial intelligence to self-driving cars. It involves both hardware and software
working together to process data and solve problems. By understanding the basics of
computing—how computers work, how they communicate, and how we interact with them—you
can unlock the potential to create, innovate, and thrive in fields like web development, data
science, artificial intelligence, and more.
What is Computing?
Computing involves the use of computers to perform a wide variety of tasks, including
processing data, performing calculations, solving problems, and creating applications. It’s a
broad term that refers to both the hardware (physical components of a computer) and software
(programs and operating systems) that allow us to interact with digital devices.
Let’s break down some of the key aspects of computing to provide a deeper understanding.
Data is the raw, unprocessed facts and figures that computers take as
input. It can be anything from numbers, text, images, or sound. Computers don't
inherently understand what this data represents; they simply store and
manipulate it as instructed.
● Examples of Data:
○ Numbers: 123, 456.78
○ Text: "Hello, world!"
○ Images: A photo stored as pixels
○ Sound: Digital audio in MP3 format
b. What is Information?
● Example:
○ Raw data: "90", "85", "78" (These are just numbers).
○ Processed into information: "Average student score is 84.3%"
(This is meaningful information).
2. Binary System
a. Binary Representation
Computers operate using the binary system, a numbering system that uses only
two digits: 0 and 1. This system, also known as base-2, is essential because computers
are made up of billions of tiny switches that can be turned on (1) or off (0).
In binary:
c. Why Binary?
Computers use binary because it's easier to implement with electrical circuits. By
using just two states (on/off), circuits are more reliable, especially at the incredibly small
sizes in modern processors.
3. Algorithms
a. What is an Algorithm?
An algorithm is a step-by-step procedure or formula for solving a problem or
accomplishing a task. In computing, algorithms are used to give instructions to a
computer on how to handle a particular task, such as sorting a list, searching for
information, or calculating mathematical equations.
b. Example of an Algorithm
1. Start.
2. Input the first number (A).
3. Input the second number (B).
4. Add the two numbers (A + B).
5. Output the result.
6. End.
This simple process is an algorithm, and computers can execute far more
complex algorithms for tasks like facial recognition or navigating a GPS system.
Algorithms drive the logic behind every action performed by a computer. They
determine how efficiently a task can be completed. For instance, Google’s search
algorithm is designed to quickly scan through billions of web pages to provide the
most relevant results in milliseconds.
4. Programming Languages
a. What are Programming Languages?
1. Low-Level Languages:
○ Machine Code: This is the binary code that a computer's CPU
understands directly. It consists of 0s and 1s, and it’s extremely
difficult for humans to read or write.
○ Assembly Language: A low-level language that uses
human-readable mnemonics to represent machine instructions.
It’s specific to a computer's architecture.
2. High-Level Languages:
○ High-level languages are more abstract and easier to read/write
for humans. These languages are closer to natural language, and
they need to be translated into machine code using compilers or
interpreters.
○ Examples include:
■ Python: Known for simplicity and readability, popular for
web development, data analysis, and AI.
■ JavaScript: Used primarily for web development.
■ C++: Known for performance and widely used in game
development, systems programming.
■ Java: Popular for building enterprise-scale applications.
High-level languages make programming easier and more efficient. A simple task
that might take hundreds of lines of machine code can be written in just a few lines using
Python or JavaScript. The computer translates these instructions into machine code,
which it can execute.
An Operating System (OS) is the software that manages hardware and software
resources on a computer. It acts as a bridge between the user, the software applications,
and the computer hardware.
6. Computer Networks
What is a Computer Network?
b. Types of Networks
○
7. The Internet and the World Wide Web
The Internet
The internet operates using a set of protocols, which are standardized rules for
transmitting data. Some of the most important ones include:
d. Internet Services
1. Email: The first widely used internet service. It allows users to send
messages and files via the internet.
2. File Sharing: Services like Dropbox or Google Drive enable users to
share files between devices or people.
3. Streaming: Services like YouTube, Netflix, and Spotify allow users to
access video and audio content over the internet.
4. Social Media: Platforms like Facebook, Twitter, and Instagram are built
on the internet, enabling social interaction online.
The World Wide Web was invented by Sir Tim Berners-Lee in 1989, and
it has since transformed how we share and access information. It
operates over the internet but is just one of many services that use the
internet.
Even though people often use the terms interchangeably, the internet and the World
Wide Web are not the same thing. Here are the main differences:
Aspect Internet World Wide Web
Definition A global network of interconnected devices A collection of interlinked web pages and
that communicate using standard protocols. resources accessed via the internet.
Invention Originated in the 1960s (ARPANET, etc.) Invented by Sir Tim Berners-Lee in
1989.
Services Provided Email, file sharing, video conferencing, social Access to websites, online documents,
media, streaming, etc. multimedia content.
Usage Enables communication between all devices and services. Specifically used for accessing and
navigating websites.
Scope Includes the web, but also other services like email, Part of the internet, specifically related to
cloud storage, online gaming, etc. websites and web pages.
Web Development
The World Wide Web is not only something we consume—it can also be created and expanded.
That’s where web development comes in.
Web development is the process of creating, building, and maintaining websites. This field is
divided into two main parts:
1. Frontend Development: This deals with the part of a website that users interact with
directly. Frontend developers work with technologies like:
○ HTML: To structure the content of the web page.
○ CSS (Cascading Style Sheets): To control the design, layout, and visual
elements of the web page.
○ JavaScript: To add interactivity and dynamic features, such as animations, form
validation, or real-time updates.
2. Backend Development: This involves the server-side of a website, including databases,
server logic, and applications. Backend developers work with:
○ Programming languages: Such as Python, PHP, Ruby, or Java.
○ Databases: Such as MySQL or MongoDB.
○ Web servers: Software like Apache or Nginx that handle requests from browsers
and serve web pages.
Search engines like Google, Bing, or Yahoo are critical tools for navigating the web. They help
users find information by indexing web pages and ranking them based on relevance to search
queries.
a. How Search Engines Work
1. Crawling: Search engines send automated programs (called bots or spiders) to explore
websites and collect information.
2. Indexing: The collected data is stored in a massive database called the search engine’s
index.
3. Ranking: When a user types a query into a search engine, the engine sorts through the
index to find the most relevant web pages, presenting them in order of importance.
○
ML is a subset of AI that focuses on creating systems that can learn from data
and improve over time without explicit programming. For example, an ML model could
be trained to recognize handwritten digits by analyzing thousands of examples.
c. Applications of AI/ML:
9. Cloud Computing
Components of a Computer
1. Hardware:
○ CPU (Central Processing Unit): The brain of the computer that processes
instructions. It performs calculations and carries out tasks.
○ Memory:
■ RAM (Random Access Memory): Temporary memory used by the CPU
to store data that is currently being used or processed. It’s fast but
volatile, meaning it’s erased when the computer is turned off.
■ Storage: Permanent memory, like a hard drive or SSD, where data and
programs are stored long-term.
○ Input/Output Devices:
■ Input devices: Keyboard, mouse, microphone—these allow users to
interact with the computer.
■ Output devices: Monitor, printer, speakers—these display or provide
results from the computer.
2. Software:
○ Software can be divided into two categories:
■ System Software: Includes operating systems and utility programs that
help manage the computer (e.g., Windows, Linux, macOS).
■ Application Software: Programs that help users perform tasks (e.g., web
browsers like Chrome, office tools like Microsoft Word, and development
tools like Visual Studio Code).
Types of Computers
● Personal Computers (PCs): Used for general-purpose tasks like browsing the web,
writing documents, gaming, etc.
● Servers: Computers that provide services to other computers over a network (e.g., web
servers host websites).
● Supercomputers: Extremely powerful computers used for highly complex calculations
(e.g., weather forecasting, scientific research).
● Embedded Systems: Small computers built into other devices, like cars, appliances, or
medical devices.
Storage in Computers
Storage in a computer refers to any component, device, or system that holds data and files for
use. In simple terms, it’s where your computer saves everything—like photos, music, videos,
applications, and even the system that makes the computer run. There are two main categories
of storage in a computer: primary storage (also called memory) and secondary storage. Let's
break them down.
Types of Storage
When talking about storage, we measure how much data a device can hold in bytes. Here’s a
breakdown of the most common units:
● 1 byte: Smallest unit of data, typically stores one character (like the letter "A").
● 1 kilobyte (KB): About 1,000 bytes.
● 1 megabyte (MB): About 1,000 kilobytes (or 1 million bytes). A small photo or song
might be 1–5 MB.
● 1 gigabyte (GB): About 1,000 megabytes. A high-quality movie might be 2–5 GB.
● 1 terabyte (TB): About 1,000 gigabytes. Many hard drives are 1 or more TB in size
today.
When you use your computer, files are stored in secondary storage (like your hard drive or SSD)
until they are needed. Once you open a file (say, a photo or a document), it is moved into
primary storage (RAM) where the CPU can quickly access it to make changes or display it.
When you're done, you save the file, and it goes back into secondary storage for safekeeping.
Storage Summary
● Primary Storage (RAM): Temporary, fast, volatile (data disappears when the computer
turns off).
● Secondary Storage (HDD, SSD, Cloud, USB): Permanent, used for long-term storage,
keeps data even when the computer is turned off.
● HDD vs. SSD: HDD is cheaper and has more capacity, SSD is faster and more reliable.
● Measuring Storage: Data is measured in bytes, with kilobytes (KB), megabytes (MB),
gigabytes (GB), and terabytes (TB) being the most common units.
The binary system is a numbering system that uses only two digits: 0 and 1. It’s also called a
base-2 system because it only has two possible values (0 or 1) for each place, unlike the
decimal system (base-10), which we use every day and has 10 digits (0 through 9).
In computers, everything is represented using these two digits—0 and 1. These binary digits are
called bits, and they are the fundamental building blocks of all data in a computer.
Why Do Computers Use Binary?
Computers are made up of billions of tiny electronic components that can only understand two
states: on or off. These two states are represented by 1 (on) and 0 (off).
Here’s a breakdown:
In modern storage systems, data is usually measured in much larger units than bits or bytes:
Computers use the binary system to define these units because 1,024 is a power of 2 (2^10 =
1,024).
When you save something to your computer, such as a photo or a document, the computer
converts that information into binary and then stores it on the storage device (like a hard drive or
SSD).
● Text: Every character (like A, B, C, etc.) is converted into a binary code using a system
called ASCII (American Standard Code for Information Interchange). For example, the
letter "A" is 01000001 in binary.
● Images: Images are made up of pixels. Each pixel has a color value, which is also
stored in binary. If an image is black and white, it can be represented with 1s and 0s—1
for black and 0 for white.
● Sound: Sound is recorded as a series of binary values representing the intensity of the
sound at different moments.
● Hard Drive (HDD): Data is stored magnetically. Tiny areas on the disk surface are
magnetized (representing a 1) or demagnetized (representing a 0).
● Solid State Drive (SSD): SSDs use electronic circuits to store data. Inside an SSD,
electrical charges represent bits: presence of a charge (1) or absence of a charge (0).
● RAM (Random Access Memory): Data is stored as electrical charges in memory
cells—each cell representing a bit (either 1 or 0).
1. Text Storage: Each character you type is converted to binary using a code (like ASCII or
Unicode).
○ Example: The word "Hi" in binary would be stored as:
■ "H" = 01001000
■ "i" = 01101001
■ So "Hi" would be stored as 01001000 01101001.
2. Number Storage: Numbers can also be stored in binary form. For example:
○ The decimal number 5 is represented as 101 in binary.
○ The decimal number 13 is represented as 1101 in binary.
3. Image Storage: An image is broken down into pixels, and each pixel has a color value.
○ In a black-and-white image, 0 might represent white, and 1 might represent
black.
○ For color images, each pixel has a binary code representing its color, often using
the RGB (Red, Green, Blue) system.
4. Audio Storage: Sound is stored as a series of binary values that represent the sound's
amplitude at specific points in time.
Let’s say you have a black-and-white image that is just 4 pixels in size (2x2 grid):
● Top-left pixel: black (1)
● Top-right pixel: white (0)
● Bottom-left pixel: black (1)
● Bottom-right pixel: white (0)
If this was a color image, each pixel would have a more complex binary value to represent
different colors.
Everything you do on your computer, smartphone, or any digital device is powered by binary.
Here’s how it impacts your daily tech use:
● Saving files: Your text, photos, and videos are stored as binary on your computer's hard
drive or SSD.
● Playing music: The audio file is stored as binary, and your device converts it into sound
waves.
● Watching videos: The video file is stored in binary, and your computer decodes the
binary data to display the moving images.
Summary
● The binary system (using 0s and 1s) is the foundation of how computers store and
process data.
● Bits are the smallest unit of data, and bytes (8 bits) are used to store more complex
information like letters or numbers.
● All types of data—text, images, music, videos—are converted into binary so that
computers can store and retrieve them efficiently.
● Storage devices (like HDDs, SSDs, and RAM) use binary to store data as electrical or
magnetic states (1s and 0s).