World University of Bangladesh: Computer Fundamentals (CSE 105)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

World University of Bangladesh

COMPUTER FUNDAMENTALS
(CSE 105)

Term Paper

Submitted by:
Tashfeen Ahmed
Roll # 1425
Batch: 46/A
(Department of English)
1. Define computer? What are the basic organizations of a computer?
Briefly explain the components of the computer system.

A computer is a machine or device that performs processes, calculations and


operations based on instructions provided by a software or hardware program. It has
the ability to accept data (input), process it, and then produce outputs.
Computers can also store data for later uses in appropriate storage devices, and
retrieve whenever it is necessary.
Modern computers are electronic devices used for a variety of purposes ranging from
browsing the web, writing documents, editing videos, creating applications, playing
video games, etc. They are designed to execute applications and provide a variety of
solutions by combining integrated hardware and software components.

The basic organizations of a computer system are the processing unit, memory
unit, and input-output devices. The processing unit controls all the functions of the
computer system. It is the brain of the computer e.g. CPU. The memory unit consists
of two units. One is an arithmetic unit and the other is a logic unit. Input devices are
those devices through which end-users can send messages to computers e.g.
keyboard, mouse, etc. Output devices are those devices through which end-users get
output from computers e.g. monitors.

There are three major components of a computer system. They are discussed below:
Input Unit
These components help users enter data and commands into a computer system. Data
can be in the form of numbers, words, actions, commands, etc. The main function of
input devices is to direct commands and data into computers. Computers then use
their CPU to process this data and produce output.
For example, a laptop’s keyboard is an input unit that enters numbers and characters.
Similarly, even a mouse can be an input unit for entering directions and commands.
Other examples include barcode readers, Magnetic Ink Character Readers (MICR),
Optical Character Readers (OCR), etc.
Another example of input devices is touch-screens. Users can simply touch these
screens without using any other device to enter commands. From smartphones to
ATM machines, these input devices are becoming very popular these days.

Central Processing Unit (CPU)


After receiving data and commands from users, a computer system now has to
process it according to the instructions provided. Here, it has to rely on a component
called the central processing unit. The CPU further uses these three elements:
a) Memory Unit
Once a user enters data using input devices, the computer system stores this data in
its memory unit. This data will now remain here until other components of CPU
process it. The memory unit uses a set of pre-programmed instructions to further
transmit this data to other parts of the CPU.
b) Arithmetic and Logic Unit
This part of the CPU performs arithmetic operations. It does basic mathematical
calculations like addition, subtraction, division, multiplication, etc. Further, it can
even perform logical functions like the comparison of data.
c) Control Unit
This unit is the backbone of computers. It is responsible for coordinating tasks
between all components of a computer system. The control unit collects data from
input units and sends it to processing units depending on its nature. Finally, it also
further transmits processed data to output units for users.
Output Unit
The third and final component of a computer system is the output unit. After
processing of data, it is converted into a format which humans can understand. After
conversion, the output units display this data to users. Examples of output devices
include monitors, screens, printers and speakers. Thus, output units basically
reproduce the data formatted by the computer for users’ benefit.

2. What are the types of number system? Differentiate between primary


memory and secondary memory. Convert the flowing problems.
Decimal to Binary 155(10) = __?__(2)

There are different types of number systems in which the four main types are as
follows:

• Binary number system (Base - 2)

• Octal number system (Base - 8)

• Decimal number system (Base - 10)

• Hexadecimal number system (Base - 16)

Difference between Primary and Secondary Memory are as follows.


Basics of Primary and Secondary Memory
Memory plays a critical part in computers to store and retrieve data. Computer
memory is categorized into primary and secondary memory. While primary memory
is the main memory of the computer which is used to store data or information
temporarily, whereas secondary memory refers to external storage devices that are
used to store data or information permanently.
Access of Primary and Secondary Memory
Primary memory holds only those data or instructions which the computer is
currently processing allowing the processor to access running applications and
services that are stored temporarily in a specific memory address. Secondary
memory, on the other hand, is persistent in nature which means instructions are
transferred to the main memory first and then re-routed to the central processing
unit.

Data in Primary and Secondary Memory


In primary memory, data is directly accessed by the processing unit and it resides in
the main memory until processing. Information and data are stored in semiconductor
chips so they have a limited storage capacity. In secondary memory, information is
stored in external storage devices and they cannot be directly accessed by the
processing unit.

Nature of Primary and Secondary Memory


Primary memory is volatile in nature which means data or information stored in the
main memory is temporarily which may lead to loss of data in case of power failure
and it cannot be retained. On the contrary, secondary memory is non-volatile in
nature which means information is stored permanently with no data loss in case of
power failure. Data is intact unless the user erases it intentionally.

Devices for of Primary and Secondary Memory


Primary memory can also be referred to as RAM, short for Random Access Memory,
because of the random selection of memory addresses. RAM holds data in a uniform
manner and it can be lost when power fails. Secondary memory refers to external
storage devices such as hard disk, optical disk, compact disk, flash drives, magnetic
tapes, etc. They are high-storage devices with substantial storage capacities, in the
range of gigabytes to terabytes.
Speed of Primary and Secondary Memory
In primary memory, applications and instructions are stored in the main memory
which makes them relatively faster to access via data bus. Processor is able to
retrieve data faster than it does with secondary memory, which acts more like a
backup memory to store data in external storage devices.

Solution of the given problem:


Decimal to Binary 155(10) = 10010110(2)

3. What do you mean by Program? Briefly describe the basic structure of


C programs. Write a c program for finding out largest number out of
three given numbers.

In computing, a program is a specific set of ordered operations for a computer to


perform. In the modern computer that John von Neumann outlined in 1945, the
program contains a one-at-a-time sequence of instructions that the computer follows.
Typically, the program is put into a storage area accessible to the computer. The
computer gets one instruction and performs it and then gets the next instruction. The
storage area or memory can also contain the data that the instruction operates on.
Note that a program is also a special kind of data that indicates how to operate on
application or user data.
Computer programs can be characterized as interactive or batch in terms of what
drives them and how continuously they run.
A C program is divided into different sections. There are six main sections to a basic
c program. They are discussed as follows:

Documentation Section
The documentation section is the part of the program where the programmer gives
the details associated with the program. He usually gives the name of the program,
the details of the author and other details like the time of coding and description. It
gives anyone reading the code the overview of the code.

Link Section
This part of the code is used to declare all the header files that will be used in the
program. This leads to the compiler being told to link the header files to the system
libraries.

Definition Section
In this section, we define different constants. The keyword define is used in this part.

Global Declaration Section


This part of the code is the part where the global variables are declared. All the
global variable used are declared in this part. The user-defined functions are also
declared in this part of the code.

Main Function Section


Every C-programs need to have the main function. Each main function contains 2
parts: A declaration part and an Execution part. The declaration part is the part where
all the variables are declared. The execution part begins with the curly brackets and
ends with the curly close bracket. Both the declaration and execution part are inside
the curly braces.
Sub Program Section
All the user-defined functions are defined in this section of the program.

C program for finding out largest number out of three given numbers is given
below:

#include <stdio.h>

int main() {

double num1, num2, num3;

printf("Enter first number: ");


scanf("%lf", &num1);
printf("Enter second number: ");
scanf("%lf", &num2);
printf("Enter third number: ");
scanf("%lf", &num3);

// if num1 is greater than num2 & num3, num1 is the largest


if (num1 >= num2 && num1 >= num3)
printf("%lf is the largest number.", num1);

// if num2 is greater than num1 & num3, num2 is the largest


if (num2 >= num1 && num2 >= num3)
printf("%lf is the largest number.", num2);

// if num3 is greater than num1 & num2, num3 is the largest


if (num3 >= num1 && num3 >= num2)
printf("%lf is the largest number.", num3);

return 0;
}
4. What Define operating system? What are the types of operating system
available? Explain the open-source operating system.

An operating system (OS) is the program that, after being initially loaded into the
computer by a boot program, manages all of the other application programs in a
computer. The application programs make use of the operating system by making
requests for services through a defined application program interface (API).
In addition, users can interact directly with the operating system through a user
interface, such as a command-line interface (CLI) or a graphical UI (GUI).
An Operating System acts as a communication bridge (interface) between the user
and computer hardware. The purpose of an operating system is to provide a platform
on which a user can execute programs in a convenient and efficient manner.
An operating system is a piece of software that manages the allocation of computer
hardware. The coordination of the hardware must be appropriate to ensure the
correct working of the computer system and to prevent user programs from
interfering with the proper working of the system.

Different types of operating systems are:


• Batch operating system
• Time-sharing or multitasking operating system
• Distributed operating system
• Network operating system
• Real-time operating system
• Mobile operating system
• Microsoft Windows
• Apple iOS
Open Source Operating System works the same as the closed ones; the only
difference is that the source code or the whole application is modifiable by the user.
There is no difference in performance, but there can be a difference in functioning.
For example, in a proprietary (closed) Operating system, the information is packed
and stored. The same happens in the Open Source. But since the source code is
visible to you (user) you can understand the process and alter the way information is
processed.
While the former is secure and hassle-free, the latter needs some technical
knowledge, but you can customize and increase performance. There is no defined
way or framework for the Open Source Operating System working; it can be
customized based on the user needs.
Most of the Open Source Operating Systems are Linux based.

▪ Linux Kernel is created by Linus Torvalds. It provides the core functions


needed for an Operating System like Parceling of data, processing of memory,
and interactions with the computer hardware. Linux is open-source many
developers studied the source code and created many supportive plug-ins and
operating systems for their needs. Though Linux is the heart of the operating
systems, there are also some Open Source
▪ Operating Systems that are not based on Linux.
There are many types of Operating systems that differ between them based on their
goal and purpose. While some of them, like – Ubuntu, Linux Mint, and Elementary
OS focus on simplicity, some like Tails focus on security.
Open source refers to the computer software or applications where the owners or
copyright holders allow the users or third party to see, use and provide the right to
modify the source code of the product.
An Open-source Operating System is the Operating System in which source code is
visible publically and editable. The generally known Operating Systems like
Microsoft’s Windows, Apple’s iOS and Mac OS, are closed Operating system.
Closed Operating Systems are built with numerous codes and complex programming
and that is called source code. This source code is kept secret by the respective
companies (owners) and inaccessible to third parties. By doing so, they ensure the
safety and secure the Operating System and computer from any threats.
In the case of an Open Source Operating system, everyone can access and edit the
source code.

5. What do you mean by Hub, Switch and Router? Explain the Different
layers of the OSI model. Write down the different types of Computer
Networks.

A Hub is a networking connector device that aids in connecting multiple devices to


a single network. It is a common connection point that is also known as a network
hub. It is a physical layer network device that connects a series of LANs.

A Switch is a networking device that has the ability to link multiple devices together
on one computer network. It uses a data link layer to connect the devices. When it
comes to switching, we prefer the packet switching method to dispatch the data
packet over the web.

A Router is a device for computer networking devices that helps in connecting two
or more packet-switched networks. The major role of the router is to perform the two
functions. It supports in handling the traffic between the networks by dispatching
data packets, and permits several devices to use the same internet connection.
Different layers of the OSI model are discussed below:
1. Physical Layer
The physical layer is responsible for the physical cable or wireless connection
between network nodes. It defines the connector, the electrical cable or wireless
technology connecting the devices, and is responsible for transmission of the raw
data, which is simply a series of 0s and 1s, while taking care of bit rate control.

2. Data Link Layer


The data link layer establishes and terminates a connection between two physically-
connected nodes on a network. It breaks up packets into frames and sends them from
source to destination. This layer is composed of two parts—Logical Link Control
(LLC), which identifies network protocols, performs error checking and
synchronizes frames, and Media Access Control (MAC) which uses MAC addresses
to connect devices and define permissions to transmit and receive data.

3. Network Layer
The network layer has two main functions. One is breaking up segments into
network packets, and reassembling the packets on the receiving end. The other is
routing packets by discovering the best path across a physical network. The network
layer uses network addresses (typically Internet Protocol addresses) to route packets
to a destination node.

4. Transport Layer
The transport layer takes data transferred in the session layer and breaks it into
“segments” on the transmitting end. It is responsible for reassembling the segments
on the receiving end, turning it back into data that can be used by the session layer.
The transport layer carries out flow control, sending data at a rate that matches the
connection speed of the receiving device, and error control, checking if data was
received incorrectly and if not, requesting it again.
5. Session Layer
The session layer creates communication channels, called sessions, between devices.
It is responsible for opening sessions, ensuring they remain open and functional
while data is being transferred, and closing them when communication ends. The
session layer can also set checkpoints during a data transfer, if the session is
interrupted, devices can resume data transfer from the last checkpoint.

6. Presentation Layer
The presentation layer prepares data for the application layer. It defines how two
devices should encode, encrypt, and compress data so it is received correctly on the
other end. The presentation layer takes any data transmitted by the application layer
and prepares it for transmission over the session layer.

7. Application Layer
The application layer is used by end-user software such as web browsers and email
clients. It provides protocols that allow software to send and receive information and
present meaningful data to users. A few examples of application layer protocols are
the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office
Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System
(DNS).

Different types of Computer Networks are:

• Personal Area Network (PAN)

• Local Area Network (LAN)

• Wireless Local Area Network (WLAN)

• Metropolitan Area Network (MAN)

• Wide Area Network (WAN)


• Storage Area Network (SAN)

• Virtual Private Network (VPN)

………………………………

You might also like