Here is the completed assignment:
Assignment: Computer Applications
1. Binary, Decimal, Octal, and Hexadecimal Number Systems
Binary (Base-2)
The binary number system uses only two digits: 0 and 1. It is the foundation of all digital computing because electronic circuits have two states - on (1) and off (0).
- Digits used: 0, 1
- Base: 2
- Each position represents a power of 2 (2⁰, 2¹, 2², ...)
- Example: (1011)₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal
Decimal (Base-10)
The decimal system is the standard number system used in everyday life. It uses ten digits from 0 to 9.
- Digits used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- Base: 10
- Each position represents a power of 10 (10⁰, 10¹, 10², ...)
- Example: (245)₁₀ = 2×10² + 4×10¹ + 5×10⁰ = 200 + 40 + 5 = 245
Octal (Base-8)
The octal system uses eight digits (0-7). It was historically used in computing as a compact way to represent binary data (every 3 binary digits = 1 octal digit).
- Digits used: 0, 1, 2, 3, 4, 5, 6, 7
- Base: 8
- Each position represents a power of 8 (8⁰, 8¹, 8², ...)
- Example: (57)₈ = 5×8¹ + 7×8⁰ = 40 + 7 = 47 in decimal
Hexadecimal (Base-16)
The hexadecimal system uses 16 symbols: digits 0-9 and letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It is widely used in programming, memory addresses, and color codes.
- Digits used: 0-9 and A, B, C, D, E, F
- Base: 16
- Each position represents a power of 16 (16⁰, 16¹, 16², ...)
- Example: (2F)₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = 47 in decimal
2. Number Conversions
a. (45)₁₀ to Binary
Divide 45 repeatedly by 2 and record remainders:
| Division | Quotient | Remainder |
|---|
| 45 ÷ 2 | 22 | 1 |
| 22 ÷ 2 | 11 | 0 |
| 11 ÷ 2 | 5 | 1 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Reading remainders from bottom to top: (45)₁₀ = (101101)₂
b. (101101)₂ to Decimal
Multiply each bit by its positional power of 2:
| Bit | Position | Value |
|---|
| 1 | 2⁵ = 32 | 32 |
| 0 | 2⁴ = 16 | 0 |
| 1 | 2³ = 8 | 8 |
| 1 | 2² = 4 | 4 |
| 0 | 2¹ = 2 | 0 |
| 1 | 2⁰ = 1 | 1 |
32 + 0 + 8 + 4 + 0 + 1 = (101101)₂ = (45)₁₀
c. (73)₈ to Binary
Convert each octal digit to its 3-bit binary equivalent:
(73)₈ = (111011)₂
d. (2F)₁₆ to Decimal
Convert each hex digit using its value:
(2F)₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = (2F)₁₆ = (47)₁₀
3. HTML and Its Basic Structure
What is HTML?
HTML (HyperText Markup Language) is the standard language used to create and structure content on the World Wide Web. It uses tags (enclosed in angle brackets < >) to define elements like headings, paragraphs, links, images, and more. HTML forms the skeleton of every webpage.
Basic Structure of an HTML Document:
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a paragraph of text.</p>
</body>
</html>
<!DOCTYPE html> - Declares the document type as HTML5
<html> - Root element that wraps the entire page
<head> - Contains metadata (title, links to stylesheets, etc.)
<title> - Sets the title shown in the browser tab
<body> - Contains all visible page content
Five HTML Tags with Their Uses:
| Tag | Name | Use |
|---|
<h1> to <h6> | Heading Tags | Define headings of different sizes, from largest (h1) to smallest (h6) |
<p> | Paragraph Tag | Defines a block of text as a paragraph |
<a href="url"> | Anchor Tag | Creates a hyperlink to another webpage or resource |
<img src="image.jpg"> | Image Tag | Embeds an image into the webpage |
<table> | Table Tag | Creates a table to display data in rows and columns |
4. Web Server
What is a Web Server?
A web server is a computer system (hardware and/or software) that stores, processes, and delivers web pages to clients (users' browsers) over the internet using the HTTP/HTTPS protocol. When a user types a URL in a browser, the request goes to a web server, which retrieves and sends the requested webpage back to the user.
Functions of a Web Server:
- Hosting Websites - Stores website files (HTML, CSS, images, scripts) and makes them available 24/7.
- Processing Requests - Receives HTTP requests from browsers and responds with the appropriate content.
- Security Management - Handles SSL/TLS encryption (HTTPS) to protect data in transit.
- Load Balancing - Distributes incoming traffic across multiple servers to prevent overload.
- Logging & Monitoring - Keeps records of all requests, errors, and server activity for analysis.
- Running Server-Side Scripts - Executes server-side code (PHP, Python, etc.) to generate dynamic web content.
Four Web Server Products:
- Apache HTTP Server - The most widely used open-source web server, maintained by the Apache Software Foundation.
- Nginx - A high-performance web server known for handling large numbers of concurrent connections.
- Microsoft IIS (Internet Information Services) - A web server built for Windows servers, commonly used in enterprise environments.
- LiteSpeed - A commercial web server known for its speed and compatibility with Apache configurations.
5. Database and DBMS
What is a Database?
A database is an organized collection of structured data stored electronically so it can be easily accessed, managed, and updated. Examples include a school's student records, a bank's customer accounts, or a hospital's patient data.
What is a DBMS?
A Database Management System (DBMS) is software that enables users and applications to create, read, update, and delete data in a database. It acts as an interface between the user and the database. Examples include MySQL, Oracle, Microsoft SQL Server, and MongoDB.
Advantages of a Database Management System:
-
Reduced Data Redundancy - DBMS controls duplication of data, so the same information is not stored in multiple places unnecessarily, saving storage space.
-
Data Consistency - Since data is stored in one place and shared, any update is immediately reflected everywhere, ensuring all users see consistent information.
-
Data Security - DBMS provides access controls and user authentication, ensuring that only authorized users can view or modify specific data.
-
Easy Data Sharing - Multiple users and applications can access the same database simultaneously, making data sharing efficient and controlled.
-
Data Backup and Recovery - DBMS provides built-in tools for regular backups and disaster recovery, protecting data from accidental loss or system failures.
-
Data Integrity - DBMS enforces rules (constraints) to ensure data accuracy and validity, such as preventing invalid entries (e.g., a negative age).
-
Reduced Development Time - Developers can use DBMS tools and query languages (like SQL) to manage data quickly without writing complex custom code.
End of Assignment