0% found this document useful (0 votes)
19 views8 pages

Computer Science

Computer science for B.tech 1st year students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views8 pages

Computer Science

Computer science for B.tech 1st year students
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Module- 1.

Introduction to Computer: [8 L]

Basic Building blocks, Algorithms, Flowcharts, Pseudo codes, System and Application Software-
concepts & terminologies, Concepts of Machine Language, Assembly Language and High level
languages, Fundamentals of World Wide Web and Internet

Basic Building blocks,

A computer system is basically a machine that simplifies complicated tasks. It should maximize
performance and reduce costs as well as power consumption.


Central Processing Unit (CPU):

 The CPU is the primary component responsible for executing instructions in a computer
system.

 It consists of several subunits, including the Arithmetic Logic Unit (ALU), Control Unit (CU), and
Registers.

 The ALU performs arithmetic and logical operations on data.

 The CU manages the execution of instructions by fetching them from memory, decoding them,
and controlling the flow of data between other CPU components.

 the ALU and control unit (collectively called a central processing unit or CPU) have typically
been located on a single integrated circuit called a microprocessor.
 Registers are small, high-speed memory units used to store data temporarily during
processing.

 The control system ties the ALU, I/O systems etc all together. Its job is to read instructions and
data from memory or the I/O devices, decode the instructions, providing the ALU with the
correct inputs according to the instructions, "tell" the ALU what operation to perform on those
inputs, and send the results back to the memory or to the I/O devices. One key component of
the control system is a counter that keeps track of what the address of the current instruction
is; typically, this is incremented each time an instruction is executed, unless the instruction
itself indicates that the next instruction should be at some other location (allowing the
computer to repeatedly execute the same instructions).

 Memory:

 Memory stores data and instructions for the CPU to access.

 Random Access Memory (RAM) is volatile memory used for temporary storage. It holds data
and program instructions that are actively being used by the CPU.

 Read-Only Memory (ROM) is non-volatile memory used for permanent storage. It typically
stores firmware or BIOS instructions that are essential for booting up the computer.

 Cache memory, including L1, L2, and L3 caches, is faster than main memory (RAM) and is used
to temporarily store frequently accessed data and instructions, reducing the time needed to
access them.

 Input/Output (I/O) Devices:

 I/O devices facilitate communication between the computer and the external world.

 Examples include keyboards, mice, monitors, printers, scanners, network adapters, and
storage devices like hard drives and USB flash drives.

 Storage Devices:

 Storage devices store data persistently.

 Hard Disk Drives (HDDs) use spinning disks and magnetic storage to store data.

 Solid-State Drives (SSDs) use flash memory and have no moving parts, offering faster access
times and better reliability compared to HDDs.

 Optical drives, such as CD-ROMs and DVD-ROMs, use laser technology to read and write data
on optical discs.

 USB flash drives provide portable, removable storage using flash memory technology.

 Bus:

 The bus is a communication system that enables data transfer between various components
within the computer.

 It consists of several types of buses, including the address bus, data bus, and control bus.

 The address bus carries memory addresses used to identify specific locations in memory.

 The data bus carries data between the CPU, memory, and I/O devices.
 The control bus carries control signals to coordinate the operation of different components.

 Registers:

 Registers are small, high-speed storage locations located within the CPU.

 They hold data temporarily during processing and are used to store operands, intermediate
results, and memory addresses.

 Common types of registers include the program counter (PC), instruction register (IR), and
general-purpose registers (e.g., accumulator, index registers).

 Instruction Set Architecture (ISA):

 ISA defines the machine language that the CPU understands.

 It specifies the set of instructions available to the CPU, including arithmetic operations, data
movement, control flow, and I/O operations.

 ISA serves as an interface between software (programs) and hardware (CPU).

 Clock:

 The clock generates timing signals that synchronize the operations of various components
within the computer.

 It determines the rate at which instructions are executed and the speed at which data is
transferred between components.

 Clock speed is measured in Hertz (Hz) and indicates the number of clock cycles per second.

 on each clock cycle, the computer fetches instructions and data from its memory. The
instructions are executed, the results are stored, and the next instruction is fetched. This
procedure repeats until a halt instruction is encountered.

System and Application Software- concepts & terminologies,


Software:
The software can be best defined as a set of instructions, technically referred to as programs, that
perform operations and specific tasks based on the commands of the user. Every single task that a
user intends to perform is regulated by software. Made of binary language (ones and zeroes), there is
a variety of software for different tasks. With that said, here’s everything about software that you
should know.

1. System Software:

 Operating Systems (OS): Examples include Microsoft Windows, macOS, Linux, and
Unix. They manage hardware resources, provide a user interface, and support the
execution of applications.
 Device Drivers: These are small programs that enable the operating system to
communicate with hardware devices such as printers, graphics cards, and network
adapters.

 Utilities: These tools perform specific tasks such as disk defragmentation, antivirus
scanning, backup and recovery, system monitoring, and system optimization.

 Embedded Software: Firmware is embedded in the read-only memory of a system


and is a type of permanent software that offers low-level control for certain device
hardware.

Embedded software is often tailored to specific hardware and performs


dedicated functions such as controlling the operation of a device, collecting sensor
data, or running real-time processes.

2. Application Software:

 Productivity Software: Examples include Microsoft Office (Word, Excel, PowerPoint),


Google Workspace (Docs, Sheets, Slides), and Apple iWork. These applications are
used for creating documents, spreadsheets, presentations, and managing
information.

 Graphics Software: Examples include Adobe Photoshop, CorelDRAW, and GIMP.


These tools are used for creating and editing digital images, illustrations, and graphical
designs.

 Multimedia Software: Examples include Adobe Premiere Pro, Apple Final Cut Pro, and
Audacity. These applications are used for editing and creating multimedia content
such as videos, audio tracks, and podcasts.

 Educational Software: Examples include Khan Academy, Duolingo, and Rosetta Stone.
These programs are designed to facilitate learning and education through interactive
tutorials, simulations, and exercises.

 Entertainment Software: Examples include video games like , Minecraft, and Candy
Crush Saga. These applications provide entertainment and leisure activities for users.

 Business Software: Examples include QuickBooks, Salesforce, and SAP. These


applications are used for managing various aspects of business operations such as
accounting, customer relationship management (CRM), and enterprise resource
planning (ERP).

 Communication Software: Examples include Skype, Slack, and Microsoft Teams.


These tools facilitate communication between users through text, voice, or video
messaging.

 Web Browsers: Examples include Google Chrome, Mozilla Firefox, and Microsoft
Edge. These applications allow users to access and interact with content on the World
Wide Web.
 Database Software: Examples include MySQL, Microsoft SQL Server, and Oracle
Database. These systems are used for storing, organizing, and retrieving data
efficiently.

 Programming Software: Examples include Visual Studio, Sublime Text, and IntelliJ
IDEA. These tools provide developers with an environment for writing, testing, and
debugging code.

3. Middleware:

 Examples include Apache HTTP Server, Microsoft IIS, and Java EE application servers
like Apache Tomcat. These software components facilitate communication and data
management between different applications or between applications and the
operating system.

 Middleware often provides services such as data management, security, transaction


processing, and messaging, allowing distributed applications to work together
seamlessly.

4. Programming Software - Programs and software are created by coders using different
software tools, known as programming software. Some such programs used for software
development by coders are as given below

 Compilers – The conversion of codes written by humans into lower-level machine


code is performed by compilers. These machine codes can be interpreted directly by
computer hardware. While compilers serve a very basic purpose, they are the basis
for creating even the most complicated and sophisticated software.
 Debuggers – Debuggers play an essential role in ensuring your software or application
performs well by testing and debugging the computer code.
 Linkers – Linkers are responsible for combining various individual files from a compiler
into a single executable file. The file converted, as a result, runs on its own without
requiring a programming environment.
 Malware – Malware is software developed to attack computers and their software in
a harmful way to cause them to misbehave or seize to work. This includes viruses,
ransomware, trojans, and worms. Since there are a variety of malware that may be
mistakenly downloaded, it is crucial to have antimalware software on your computer
to keep it safe from their attacks.

There are different ways in which software can be distributed based on various factors. With that said,
here are some common distribution mechanisms for software-

1. Commercial

The commercial distribution of software means providing users with a license to use that particular
software. Since users don’t completely own the software and are only provided a license, they cannot
make any modifications or add features to the software. While the most common type of distribution
mechanism in the past, it is less popular in recent times. Examples include Microsoft Office, Adobe
Creative Cloud, and Autodesk AutoCAD.
2. Open-Source

 Examples include the Linux kernel, Apache web server, Mozilla Firefox browser, and
WordPress content management system. These projects are developed
collaboratively by a community of developers, and the source code is freely available
for study, modification, and distribution.

 Open-source licenses like the GNU General Public License (GPL) or the MIT License
govern the use and distribution of open-source software, ensuring that it remains
open and accessible to the public.

3. Freeware

Freeware type of software is available to be downloaded from the internet and is completely free of
cost. Freeware is commonly adware, which means it comes with embedded advertising to generate
revenue, which compensates for the software being free of cost. : Examples include CCleaner, 7-Zip,
and Adobe Acrobat Reader.

4. Shareware

Shareware is a variation of software, which is available for download for a limited period of time on a
trial basis. It is aimed at offering a realistic experience to users so that they make the decision to buy
the full version of the software for an unlimited amount of time, based on their experience with the
shareware.: Examples include WinRAR, WinZip, and many early PC games.

5. Closed Source Software:

• Examples include Microsoft Office, Adobe Photoshop, and proprietary enterprise software
like Oracle Database. The source code of closed-source software is not available to the public, and its
distribution and modification are controlled by the copyright holder.

Users typically obtain closed-source software through a one-time purchase, subscription, or licensing
agreement.

Algorithms, Flowcharts, Pseudo codes


Definition:
An algorithm is a set of commands that must be followed for a computer to perform calculations or
other problem-solving operations. According to its formal definition, an algorithm is a finite set of
instructions carried out in a specific order to perform a particular task. It is not the entire program or
code; it is simple logic to a problem represented as an informal description in the form of a flowchart
or pseudocode.

Need of an algorithm:
 Optimizes Problem-solving: An algorithm helps us grasp the fundamental concept of
the problem solving as it written in simple English and follows a step-by-step approach to
solve a problem statement.
 Measure of Performance: Algorithms are the best way to measure the performance of the
program in all cases, time complexity, space complexity (best cases, worst cases, average
cases).

 Resource Allocation: Algorithms are used to determine the best possible way to solve a
problem statement based on the amount of resources used in terms of storage and processing
power. So writing an algorithm can help us determine the resources required to run the
algorithm and accordingly resource allocation can be done.

An algorithm can be expressed in three different ways. They are:

1. Natural Language: An algorithm can be expressed in a natural language like English. But it is
usually hard to understand and is not the best way to express an algorithm.

2. Flow Charts: Flow charts are another way of expressing an algorithm where we make use
of diagrams to represent the algorithm.

3. Pseudo-Code: It is the best way to express an algorithm. In pseudo-code, we explain the


algorithm in steps. It doesn’t have any syntax like any other programming language.
Therefore, it can’t be interpreted or compiled. The previously mentioned example of Making
Tea is a Pseudocode way to express an algorithm.

Types of Algorithms
1. Brute Force Algorithm

 Brute force algorithms are simple and straightforward solutions that use trial and error to
solve problems.

 They are often used to solve problems where no other efficient solution is known. Although
they can be very slow, they are easy to understand and implement.

2. Divide and Conquer Algorithm

 Divide and conquer algorithms break a complex problem into smaller, simpler sub-problems.
The sub-problems are then solved separately and combined to solve the original problem.

 This approach reduces the complexity of the problem and makes it easier to solve.

3. Dynamic Programming Algorithm

 Dynamic programming algorithms are used to solve problems that can be broken down into
smaller sub-problems.

 They use a bottom-up approach, starting with the simplest sub-problems and building up to
the more complex ones.

 This approach is used to find the optimal solution to a problem by avoiding redundant
calculations.

4. Greedy Algorithm
 Optimization issues are resolved using greedy algorithms. They always choose well and never
turn around.

 This strategy is utilized when the answer may be discovered by making a sequence of local
optimal decisions that ultimately result in a globally optimal solution.

5. Backtracking Algorithm

 Backtracking algorithms are used to solve problems that involve finding a solution by trying
different options and undoing them if they lead to a dead end.

 This approach is used when there is no efficient way to solve the problem and it is necessary
to try all possible solutions.

You might also like