[go: up one dir, main page]

0% found this document useful (0 votes)
32 views42 pages

UNIT-I Notes

The document outlines the history and evolution of computers, starting from primitive counting devices to modern computers, detailing significant inventions like the abacus, Napier's Bones, and various generations of computers. It categorizes computers based on data handling capabilities (analogue, digital, hybrid) and size (supercomputers, mainframe, miniframe, and workstations). Each type is described with its characteristics, applications, and advantages, illustrating the advancements in computing technology over time.

Uploaded by

pavanesh370
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)
32 views42 pages

UNIT-I Notes

The document outlines the history and evolution of computers, starting from primitive counting devices to modern computers, detailing significant inventions like the abacus, Napier's Bones, and various generations of computers. It categorizes computers based on data handling capabilities (analogue, digital, hybrid) and size (supercomputers, mainframe, miniframe, and workstations). Each type is described with its characteristics, applications, and advantages, illustrating the advancements in computing technology over time.

Uploaded by

pavanesh370
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/ 42

UNIT-1

History of computer
The first counting device was used by the primitive people. They used sticks, stones and bones
as counting tools. As human mind and technology improved with time more computing devices
were developed. Some of the popular computing devices starting with the first to recent ones
are described below;

(1) Abacus

The history of computer begins with the birth of abacus which is believed to be the first
computer. It is said that Chinese invented Abacus around 4,000 years ago.

It was a wooden rack which has metal rods with beads mounted on them. The beads were
moved by the abacus operator according to some rules to perform arithmetic calculations.
Abacus is still used in some countries like China, Russia and Japan. An image of this tool is
shown below;

(2) Napier's Bones

It was a manually-operated calculating device which was invented by John Napier (1550-1617)
of Merchiston. In this calculating tool, he used 9 different ivory strips or bones marked with
numbers to multiply and divide. So, the tool became known as "Napier's Bones. It was also the
first machine to use the decimal point.
(3) Pascaline

Pascaline is also known as Arithmetic Machine or Adding Machine. It was invented between
1642 and 1644 by a French mathematician-philosopher Biaise Pascal. It is believed that it was
the first mechanical and automatic calculator.

Pascal invented this machine to help his father, a tax accountant. It could only perform addition
and subtraction. It was a wooden box with a series of gears and wheels. When a wheel is rotated
one revolution, it rotates the neighboring wheel. A series of windows is given on the top of the
wheels to read the totals. An image of this tool is shown below;

(4) Stepped Reckoner or Leibnitz wheel

It was developed by a German mathematician-philosopher Gottfried Wilhelm Leibnitz in 1673.


He improved Pascal's invention to develop this machine. It was a digital mechanical calculator
which was called the stepped reckoner as instead of gears it was made of fluted drums. See the
following image;
(5) Difference Engine

In the early 1820s, it was designed by Charles Babbage who is known as "Father of Modern
Computer". It was a mechanical computer which could perform simple calculations. It was a
steam driven calculating machine designed to solve tables of numbers like logarithm tables.

(6) Analytical Engine

This calculating machine was also developed by Charles Babbage in 1830. It was a mechanical
computer that used punch-cards as input. It was capable of solving any mathematical problem
and storing information as a permanent memory.

(7) Tabulating Machine

It was invented in 1890, by Herman Hollerith, an American statistician. It was a mechanical


tabulator based on punch cards. It could tabulate statistics and record or sort data or
information. This machine was used in the 1890 U.S. Census. Hollerith also started the
Hollerith?s Tabulating Machine Company which later became International Business Machine
(IBM) in 1924.
(8) Differential Analyzer

It was the first electronic computer introduced in the United States in 1930. It was an analog
device invented by Vannevar Bush. This machine has vacuum tubes to switch electrical signals
to perform calculations. It could do 25 calculations in few minutes.

(9) Mark I

The next major changes in the history of computer began in 1937 when Howard Aiken planned
to develop a machine that could perform calculations involving large numbers. In 1944, Mark
I computer was built as a partnership between IBM and Harvard. It was the first programmable
digital computer.
Generations of Computers
A generation of computers refers to the specific improvements in computer technology with
time. In 1946, electronic pathways called circuits were developed to perform the counting. It
replaced the gears and other mechanical parts used for counting in previous computing
machines.

In each new generation, the circuits became smaller and more advanced than the previous
generation circuits. The miniaturization helped increase the speed, memory and power of
computers. There are five generations of computers which are described below;

First Generation Computers

The first generation (1946-1959) computers were slow, huge and expensive. In these
computers, vacuum tubes were used as the basic components of CPU and memory. These
computers were mainly depended on batch operating system and punch cards. Magnetic tape
and paper tape were used as output and input devices in this generation;

Some of the popular first generation computers are;

o ENIAC ( Electronic Numerical Integrator and Computer)


o EDVAC ( Electronic Discrete Variable Automatic Computer)
o UNIVACI( Universal Automatic Computer)
o IBM-701
o IBM-650

Second Generation Computers

The second generation (1959-1965) was the era of the transistor computers. These computers
used transistors which were cheap, compact and consuming less power; it made transistor
computers faster than the first generation computers.

In this generation, magnetic cores were used as the primary memory and magnetic disc and
tapes were used as the secondary storage. Assembly language and programming languages like
COBOL and FORTRAN, and Batch processing and multiprogramming operating systems were
used in these computers.

Some of the popular second generation computers are;

o IBM 1620
o IBM 7094
o CDC 1604
o CDC 3600
o UNIVAC 1108
Third Generation Computers

The third generation computers used integrated circuits (ICs) instead of transistors. A single IC
can pack huge number of transistors which increased the power of a computer and reduced the
cost. The computers also became more reliable, efficient and smaller in size. These generation
computers used remote processing, time-sharing, multi programming as operating system.
Also, the high-level programming languages like FORTRON-II TO IV, COBOL, PASCAL
PL/1, ALGOL-68 were used in this generation.

Some of the popular third generation computers are;

o IBM-360 series
o Honeywell-6000 series
o PDP(Personal Data Processor)
o IBM-370/168
o TDC-316

Fourth Generation Computers

The fourth generation (1971-1980) computers used very large scale integrated (VLSI) circuits;
a chip containing millions of transistors and other circuit elements. These chips made this
generation computers more compact, powerful, fast and affordable. These generation
computers used real time, time sharing and distributed operating system. The programming
languages like C, C++, DBASE were also used in this generation.

Some of the popular fourth generation computers are;

o DEC 10
o STAR 1000
o PDP 11
o CRAY-1(Super Computer)
o CRAY-X-MP(Super Computer)

Fifth Generation Computers

In fifth generation (1980-till date) computers, the VLSI technology was replaced with ULSI
(Ultra Large Scale Integration). It made possible the production of microprocessor chips with
ten million electronic components. This generation computers used parallel processing
hardware and AI (Artificial Intelligence) software. The programming languages used in this
generation were C, C++, Java, .Net, etc.

Some of the popular fifth generation computers are;

o Desktop
o Laptop
o NoteBook
o UltraBook
o ChromeBook

Types of Computer
We can categorize computer in two ways: on the basis of data handling capabilities and size.

On the basis of data handling capabilities, the computer is of three types:

o Analogue Computer
o Digital Computer
o Hybrid Computer

1) Analogue Computer

Analogue computers are designed to process analogue data. Analogue data is continuous data
that changes continuously and cannot have discrete values. We can say that analogue
computers are used where we don't need exact values always such as speed, temperature,
pressure and current.

Analogue computers directly accept the data from the measuring device without first
converting it into numbers and codes. They measure the continuous changes in physical
quantity and generally render output as a reading on a dial or scale. Speedometer and mercury
thermometer are examples of analogue computers.

Advantages of using analogue computers:


o It allows real-time operations and computation at the same time and continuous
representation of all data within the rage of the analogue machine.
o In some applications, it allows performing calculations without taking the help of
transducers for converting the inputs or outputs to digital electronic form and vice versa.
o The programmer can scale the problem for the dynamic range of the analogue
computer. It provides insight into the problem and helps understand the errors and their
effects.

Types of analogue computers:


o Slide Rules: It is one of the simplest types of mechanical analogue computers. It was
developed to perform basic mathematical calculations. It is made of two rods. To
perform the calculation, the hashed rod is slid to line up with the markings on another
rod.
o Differential Analysers: It was developed to perform differential calculations. It
performs integration using wheel-and-disc mechanisms to solve differential
calculations.
o Castle Clock: It was invented by Al-Jarazi. It was able to save programming
instructions. Its height was around 11 feet and it was provided with the display of time,
the zodiac, and the solar and lunar orbits. This device also could allow users to set the
length of the day as per the current season.
o Electronic Analogue Computer: In this type of analogue computer, electrical signals
flow through capacitors and resistors to simulate physical phenomena. Here, the
mechanical interaction of components does not take place. The voltage of the electrical
signal generates the appropriate displays.

2) Digital Computer

Digital computer is designed to perform calculations and logical operations at high speed. It
accepts the raw data as input in the form of digits or binary numbers (0 and 1) and processes it
with programs stored in its memory to produce the output. All modern computers like laptops,
desktops including smartphones that we use at home or office are digital computers.

Advantages of digital computers:


o It allows you to store a large amount of information and to retrieve it easily whenever
you need it.
o You can easily add new features to digital systems more easily.
o Different applications can be used in digital systems just by changing the program
without making any changes in hardware
o The cost of hardware is less due to the advancement in the IC technology.
o It offers high speed as the data is processed digitally.
o It is highly reliable as it uses error correction codes.
o Reproducibility of results is higher as the output is not affected by noise, temperature,
humidity, and other properties of its components.

3) Hybrid Computer

Hybrid computer has features of both analogue and digital computer. It is fast like an
analogue computer and has memory and accuracy like digital computers. It can process both
continuous and discrete data. It accepts analogue signals and convert them into digital form
before processing. So, it is widely used in specialized applications where both analogue and
digital data is processed. For example, a processor is used in petrol pumps that converts the
measurements of fuel flow into quantity and price. Similarly, they are used in airplanes,
hospitals, and scientific applications.
Advantages of using hybrid computers:
o Its computing speed is very high due to the all-parallel configuration of the analogue
subsystem.
o It produces precise and quick results that are more accurate and useful.
o It has the ability to solve and manage big equation in real-time.
o It helps in the on-line data processing.

On the basis of size, the computer can be of five types:

1) Supercomputer

Supercomputers are the biggest and fastest computers. They are designed to process huge
amount of data. A supercomputer can process trillions of instructions in a second. It has
thousands of interconnected processors.

Supercomputers are particularly used in scientific and engineering applications such as


weather forecasting, scientific simulations and nuclear energy research. The first
supercomputer was developed by Roger Cray in 1976.

Characteristics or applications of supercomputers:


o It has the ability to decrypt your password to enhance protection for security reasons.
o It produces excellent results in animations.
o It is used for virtual testing of nuclear weapons and critical medical tests.
o It can study and understand climate patterns and forecast weather conditions. It can run
in NOAA's system (National Oceanic and Atmospheric Administration) that can
execute any type of simple and logical data.
o It helps in designing the flight simulators for pilots at the beginner level for their
training.
o It helps in extracting useful information from data storage centres or cloud system. For
example, in insurance companies.
o It has played a vital role in managing the online currency world such as stock market
and bitcoin.
o It helps in the diagnosis of various critical diseases and in producing accurate results in
brain injuries, strokes, etc.
o It helps in scientific research areas by accurately analysing data obtained from
exploring the solar system, satellites, and movement of Earth.
o It also used in a smog control system where it predicts the level of fog and other
pollutants in the atmosphere.

2) Mainframe computer

Mainframe computers are designed to support hundreds or thousands of users simultaneously.


They can support multiple programs at the same time. It means they can execute different
processes simultaneously. These features of mainframe computers make them ideal for big
organizations like banking and telecom sectors, which need to manage and process high
volume of data.

Mainframe computers are designed to support hundreds or thousands of users


simultaneously. They can support multiple programs at the same time. It means they can
execute different processes simultaneously. These features of mainframe computers make them
ideal for big organizations like banking and telecom sectors, which need to manage and process
a high volume of data that requires integer operations such as indexing, comparisons, etc.

Characteristics of Mainframe Computers:


o It can process huge amount of data, e.g. millions of transactions in a second in the
banking sector.
o It has a very long life. It can run smoothly for up to 50 years after proper installation.
o It gives excellent performance with large scale memory management.
o It has the ability to share or distribute its workload among other processors and
input/output terminals.
o There are fewer chances of error or bugs during processing in mainframe computers. If
any error occurs it can fix it quickly without affecting the performance.
o It has the ability to protect the stored data and other ongoing exchange of information
and data.

Applications of mainframe computers:


o In health care, it enabled hospitals to maintain a record of their millions of patients in
order to contact them for treatment or related to their appointment, medicine updates or
disease updates.
o In the field of defence, it allows the defence departments to share a large amount of
sensitive information with other branches of defence.
o In the field of education, it helps big universities to store, manage and retrieve data
related to their courses, admissions, students, teachers, employees and affiliated schools
and colleges.
o In the retail sector, the retail companies that have a huge customer base and branches
use mainframe computers to handle and execute information related to their inventory
management, customer management, and huge transactions in a short duration.

3) Miniframe or Minicomputer

It is a midsize multiprocessing computer. It consists of two or more processors and can


support 4 to 200 users at one time. Miniframe computers are used in institutes and departments
for tasks such as billing, accounting and inventory management. A minicomputer lies between
the mainframe and microcomputer as it is smaller than mainframe but larger than a
microcomputer.

Characteristics of miniframe or minicomputer:


o It is light weight that makes it easy to carry and fit anywhere.
o It is less expensive than mainframe computers.
o It is very fast compared to its size.
o It remains charged for a long time.
o It does not require a controlled operational environment.

Applications of minicomputers:

A minicomputer is mainly used to perform three primary functions, which are as follows:

o Process control: It was used for process control in manufacturing. It mainly performs
two primary functions that are collecting data and feedback. If any abnormality occurs
in the process, it is detected by the minicomputer and necessary adjustments are made
accordingly.
o Data management: It is an excellent device for small organizations to collect, store
and share data. Local hospitals and hotels can use it to maintain the records of their
patients and customers respectively.
o Communications Portal: It can also play the role of a communication device in larger
systems by serving as a portal between a human operator and a central processor or
computer.

4) Workstation

Workstation is a single user computer that is designed for technical or scientific applications.
It has a faster microprocessor, a large amount of RAM and high speed graphic adapters. It
generally performs a specific job with great expertise; accordingly, they are of different types
such as graphics workstation, music workstation and engineering design workstation.
Characteristics of workstation computer:
o It is a high-performance computer system designed for a single user for business or
professional use.
o It has larger storage capacity, better graphics, and more powerful CPU than a personal
computer.
o It can handle animation, data analysis, CAD, audio and video creation and editing.

Any computer that has the following five features, can be termed as a workstation or can be
used as a workstation.

o Multiple Processor Cores: It has more processor cores than simple laptops or
computers.
o ECC RAM: It is provided with Error-correcting code memory that can fix memory
errors before they affect the system's performance.
o RAID (Redundant Array of Independent Disks): It refers to multiple internal hard
drives to store or process data. RAID can be of different types, for example, there can
be multiple drives to process data or mirrored drives where if one drive does not work
than other starts functioning.
o SSD: It is better than conventional hard-disk drives. It does not have moving parts, so
the chances of physical failure are very less.
o Optimized, Higher end GPU: It reduces the load on CPU. E.g., CPU has to do less
work while processing the screen output.

5) Microcomputer

Microcomputer is also known as a personal computer. It is a general-purpose computer that is


designed for individual use. It has a microprocessor as a central processing unit, memory,
storage area, input unit and output unit. Laptops and desktop computers are examples of
microcomputers. They are suitable for personal work that may be making an assignment,
watching a movie, or at office for office work.

Characteristics of a microcomputer:
o It is the smallest in size among all types of computers.
o A limited number of software can be used.
o It is designed for personal work and applications. Only one user can work at a time.
o It is less expansive and easy to use.
o It does not require the user to have special skills or training to use it.
o Generally, comes with single semiconductor chip.
o It is capable of multitasking such as printing, scanning, browsing, watching videos, etc.

Computer Components
There are 5 main computer components that are given below is used for organization of
computer:

o Input Devices
o CPU
o Output Devices
o Primary Memory
o Secondary Memory

(Basic organization of computer)

The operations of computer components are given below:

1) Inputting: It is the process of entering raw data, instructions and information into the
computer. It is performed with the help of input devices.

2) Storing: The computer has primary memory and secondary storage to store data and
instructions. It stores the data before sending it to CPU for processing and also stores the
processed data before displaying it as output.

3) Processing: It is the process of converting the raw data into useful information. This process
is performed by the CPU of the computer. It takes the raw data from storage, processes it and
then sends back the processed data to storage.
4) Outputting: It is the process of presenting the processed data through output devices like
monitor, printer and speakers.

5) Controlling: This operation is performed by the control unit that is part of CPU. The control
unit ensures that all basic operations are executed in a right manner and sequence.

Component of CPU

A computer is made up of multiple elements that help in processing and effective functioning.

In this article, we are going to discuss about parts of the CPU. Hope this article will be helpful
to you in order to take information about the parts of CPU. So, without delay, let's start the
topic.

Before discussing the parts, let's see a brief description of the CPU.

CPU

CPU is an acronym for "Central Processing Unit". It is also known as the brain of the computer.
CPU receives the instructions from active software and hardware. It produces the output
accordingly. In addition, it stores data, instructions, and intermediate results. Thus, CPU
controls the operations of all computer parts.

Central Processing Unit (CPU) = Arithmetic and Logical Unit (ALU) + Control Unit (CU)

It carries out instructions and computer programs and performs all the basic arithmetic and
logical operations. CPU has three major types: Transistor CPUs, Small scale integration CPU,
and Large scale integration CPUs. Now, let's discuss about the parts of the CPU.

Components

There are three components of a Central Processing Unit (CPU) that are listed as follows -

o Arithmetic and Logical Unit (ALU)


o Control Unit (CU)
o Memory or storage unit

The parts of the CPU are shown in the below image -


CPU Components

Arithmetic and Logical Unit (or ALU)

As the name implies, the Arithmetic and Logical Unit (or ALU) performs arithmetic and logical
functions. The arithmetic functions are addition, subtraction, multiplication division, and
comparisons, whereas the logical functions mainly include selecting, comparing, and merging
the data. The complex operations are performed by making repetitive use of the operations
mentioned above.

ALU is the key part of the CPU.

There can be more than one ALU in a CPU. Furthermore, ALUs can be used for maintaining
timers that help run the computer.

Now, move forward and discuss the next part of the Central Processing Unit (CPU), i.e.,
Control Unit (CU).

Control Unit (CU)

The control Unit is one of the crucial components of the CPU. It instructs the complete
computer system to perform a particular task. It controls and coordinates the functioning of all
parts of the computer. It takes instructions from memory and then decodes and executes these
instructions.

The Control unit mainly regulates and maintains the information's flow across the processor. It
does not take part in storing data and processing.
Memory Unit

Random access memory (RAM)

This unit temporarily stores data, programs, and intermediate and final results of processing.
So, it acts as a temporary storage area that holds the data temporarily, which is used to run the
computer. The memory units supplies the data to other units of the computer whenever it is
required to do so. It is also called primary memory or main memory, or the internal storage
unit. The functions of the memory unit are listed as follows -

o The data and instructions that are required for processing are stored in a memory unit.
o All inputs/outputs are transmitted by the main memory.
o The memory unit also stores the intermediate results and final results of processing.

That's all about the parts of the CPU. So, there are three CPU components: Arithmetic and
Logical Unit (ALU), Control Unit (CU), and memory unit.

Types of Input Devices


Input Devices

Input device enables the user to send data, information, or control signals to a computer. The
Central Processing Unit (CPU) of a computer receives the input and processes it to produce
the output.

Some of the popular input devices are:

1. Keyboard
2. Mouse
3. Scanner
4. Joystick
5. Light Pen
6. Digitizer
7. Microphone
8. Magnetic Ink Character Recognition (MICR)
9. Optical Character Reader (OCR)
10. Digital Camera
11. Paddle
12. Steering Wheel
13. Gesture recognition devices
14. Light Gun
15. Touch Pad
16. Remote
17. Touch screen
18. VR
19. Webcam
20. Biometric Devices

Output Devices
The output device displays the result of the processing of raw data that is entered in the
computer through an input device. There are a number of output devices that display output in
different ways such as text, images, hard copies, and audio or video.

Some of the popular output devices are:

1. Monitor
o CRT Monitor
o LCD Monitor
o LED Monitor
o Plasma Monitor
2. Printer
o Impact Printers
A. Character Printers
i. Dot Matrix printers
ii. Daisy Wheel printers
B. Line printers
i. Drum printers
ii. Chain printers
o Non-impact printers
A. Laser printers
B. Inkjet printers
3. Projector
Types of Computer Memory
The computer memory holds the data and instructions needed to process raw data and produce
output. The computer memory is divided into large number of small parts known as cells. Each
cell has a unique address which varies from 0 to memory size minus one.

Computer memory is of two types: Volatile (RAM) and Non-volatile (ROM). The secondary
memory (hard disk) is referred as storage not memory.

But, if we categorize memory on behalf of space or location, it is of four types:

o Register memory
o Cache memory
o Primary memory
o Secondary memory

Register Memory

Register memory is the smallest and fastest memory in a computer. It is not a part of the main
memory and is located in the CPU in the form of registers, which are the smallest data holding
elements. A register temporarily holds frequently used data, instructions, and memory address
that are to be used by CPU. They hold instructions that are currently processed by the CPU.
All data is required to pass through registers before it can be processed. So, they are used by
CPU to process the data entered by the users.

Registers hold a small amount of data around 32 bits to 64 bits. The speed of a CPU depends
on the number and size (no. of bits) of registers that are built into the CPU. Registers can be of
different types based on their uses. Some of the widely used Registers include Accumulator or
AC, Data Register or DR, the Address Register or AR, Program Counter (PC), I/O Address
Register, and more.

Types and Functions of Computer Registers:

o Data Register: It is a 16-bit register, which is used to store operands (variables) to be


operated by the processor. It temporarily stores data, which is being transmitted to or
received from a peripheral device.
o Program Counter (PC): It holds the address of the memory location of the next
instruction, which is to be fetched after the current instruction is completed. So, it is
used to maintain the path of execution of the different programs and thus executes the
programs one by one, when the previous instruction gets completed.
o Instructor Register: It is a 16-bit register. It stores the instruction which is fetched
from the main memory. So, it is used to hold instruction codes, which are to be
executed. The Control Unit takes instruction from Instructor Register, then decodes and
executes it.
o Accumulator Register: It is a 16-bit register, which is used to store the results
produced by the system. For example, the results generated by CPU after the processing
are stored in the AC register.
o Address Register: It is a 12-bit register that stores the address of a memory location
where instructions or data is stored in the memory.
o I/O Address Register: Its job is to specify the address of a particular I/O device.
o I/O Buffer Register: Its job is to exchange the data between an I/O module and the
CPU.

Cache Memory

Cache memory is a high-speed memory, which is small in size but faster than the main memory
(RAM). The CPU can access it more quickly than the primary memory. So, it is used to
synchronize with high-speed CPU and to improve its performance.

Cache memory can only be accessed by CPU. It can be a reserved part of the main memory or
a storage device outside the CPU. It holds the data and programs which are frequently used by
the CPU. So, it makes sure that the data is instantly available for CPU whenever the CPU needs
this data. In other words, if the CPU finds the required data or instructions in the cache memory,
it doesn't need to access the primary memory (RAM). Thus, by acting as a buffer between
RAM and CPU, it speeds up the system performance.

Types of Cache Memory:

L1: It is the first level of cache memory, which is called Level 1 cache or L1 cache. In this type
of cache memory, a small amount of memory is present inside the CPU itself. If a CPU has
four cores (quad core cpu), then each core will have its own level 1 cache. As this memory is
present in the CPU, it can work at the same speed as of the CPU. The size of this memory
ranges from 2KB to 64 KB. The L1 cache further has two types of caches: Instruction cache,
which stores instructions required by the CPU, and the data cache that stores the data required
by the CPU.
L2: This cache is known as Level 2 cache or L2 cache. This level 2 cache may be inside the
CPU or outside the CPU. All the cores of a CPU can have their own separate level 2 cache, or
they can share one L2 cache among themselves. In case it is outside the CPU, it is connected
with the CPU with a very high-speed bus. The memory size of this cache is in the range of 256
KB to the 512 KB. In terms of speed, they are slower than the L1 cache.

L3: It is known as Level 3 cache or L3 cache. This cache is not present in all the processors;
some high-end processors may have this type of cache. This cache is used to enhance the
performance of Level 1 and Level 2 cache. It is located outside the CPU and is shared by all
the cores of a CPU. Its memory size ranges from 1 MB to 8 MB. Although it is slower than L1
and L2 cache, it is faster than Random Access Memory (RAM).

How does cache memory work with CPU?


When CPU needs the data, first of all, it looks inside the L1 cache. If it does not find anything
in L1, it looks inside the L2 cache. If again, it does not find the data in L2 cache, it looks into
the L3 cache. If data is found in the cache memory, then it is known as a cache hit. On the
contrary, if data is not found inside the cache, it is called a cache miss.

If data is not available in any of the cache memories, it looks inside the Random Access
Memory (RAM). If RAM also does not have the data, then it will get that data from the Hard
Disk Drive.

So, when a computer is started for the first time, or an application is opened for the first time,
data is not available in cache memory or in RAM. In this case, the CPU gets the data directly
from the hard disk drive. Thereafter, when you start your computer or open an application,
CPU can get that data from cache memory or RAM.

Primary Memory
Primary Memory is of two types: RAM and ROM.

RAM (Volatile Memory)

It is a volatile memory. It means it does not store data or instructions permanently. When you
switch on the computer the data and instructions from the hard disk are stored in RAM.

CPU utilizes this data to perform the required tasks. As soon as you shut down the computer
the RAM loses all the data.

ROM (Non-volatile Memory)

It is a non-volatile memory. It means it does not lose its data or programs that are written on it
at the time of manufacture. So it is a permanent memory that contains all important data and
instructions needed to perform important tasks like the boot process.
Secondary Memory
The secondary storage devices which are built into the computer or connected to the computer
are known as a secondary memory of the computer. It is also known as external memory or
auxiliary storage.

The secondary memory is accessed indirectly via input/output operations. It is non-volatile, so


permanently stores the data even when the computer is turned off or until this data is
overwritten or deleted. The CPU can't directly access the secondary memory. First, the
secondary memory data is transferred to primary memory then the CPU can access it.

Some of the secondary memory or storage devices are described below:

1) Hard Disk: It is a rigid magnetic disc that is used to store data. It permanently stores
data and is located within a drive unit.

The hard disk is also known as a hard drive. It is a rigid magnetic disc that stores data
permanently, as it is a non-volatile storage device. The hard disk is located within a drive unit
on the computer's motherboard and comprises one or more platters packed in an air-sealed
casing. The data is written on the platters by moving a magnetic head over the platters as they
spin. The data stored on a computer's hard drive generally includes the operating system,
installed software, and the user's files and programs, including pictures, music, videos, text
documents, etc.

Components of Hard Drive:


The main components of a hard drive include a head actuator, read/write actuator arm,
read/write head, platter, and spindle. A circuit board, which is called the disk controller or
interface board, is present on the back of a hard drive. It allows the hard drive to communicate
with the computer.

2) Solid-state Drive:
SSD (Solid State Drive) is also a non-volatile storage medium that is used to hold and access
data. Unlike a hard drive, it does not have moving components, so it offers many advantages
over SSD, such as faster access time, noiseless operation, less power consumption, and more.

As the cost of SSD has come down, it has become an ideal replacement for a standard hard
drive in desktop and laptop computers. It is also suitable for notebooks, and tablets that don't
require lots of storage.

3) Pen drive:

Pen drive is a compact secondary storage device. It is also known as a USB flash drive, thumb
drive or a jump drive. It connects to a computer via a USB port. It is commonly used to store
and transfer data between computers. For example, you can write a report using a computer
and then copy or transfer it in the pen drive. Later, you can connect this pen drive to a computer
to see or edit your report. You can also store your important documents and pictures, music,
videos in the pen drive and keep it at a safe place.

Pen drive does not have movable parts; it comprises an integrated circuit memory chip that
stores the data. This chip is housed inside a plastic or aluminium casing. The data storage
capacity of the pen drive generally ranges from 2 GB to 128 GB. Furthermore, it is a plug and
play device as you don't need additional drives, software, or hardware to use it.

4) SD Card:

SD Card stands for Secure Digital Card. It is most often used in portable and mobile devices
such as smartphones and digital cameras. You can remove it from your device and see the
things stored in it using a computer with a card reader.

There are many memory chips inside the SD card that store the data; it does not have moving
parts. SD cards are not created equal, so they may differ from each other in terms of speed,
physical sizes, and capacity. For example, standard SD cards, mini SD cards, and micro SD
cards.

5) Compact Disk (CD):


Compact Disk is a portable secondary storage device in the shape of a round medium disk. It
is made of polycarbonate plastic. The concept of CD was co-developed by Philips and Sony in
1982. The first CD was created on 17 August 1982 at the workshop of Philips in Germany.

In the beginning, it was used for storing and playing sound recordings, later it was used for
various purposes such as for storing documents, audio files, videos, and other data like software
programs in a CD.

Physical characteristics of a CD/ Structure of CD:

A standard CD is around 5 inches in diameter and 0.05 inches in thickness. It is made of a clear
polycarbonate plastic substrate, a reflective metallic layer, and a clear coating of acrylic plastic.
These thin circular layers are attached one on top of another as described below:

oA polycarbonate disc layer at the bottom has the data encoded by creating lands and
pits.
o The polycarbonate disc layer is coated with a thin aluminium layer that reflects the
laser.
o The reflective aluminium layer is coated with a lacquer layer to prevent oxidation in
order to protect the below layers. It is generally spin coated directly on the top of the
reflective layer.
o The label print is applied on the lacquer layer, or artwork is screen printed on the top of
the disc on the lacquer layer by offset printing or screen printing.
How Does a CD Work?

The data or information is stored or recorded or encoded in CD digitally using a laser beam
that etches tiny indentations or bumps on its surface. The bump is called a pit, which represents
the number 0. Space, where the bump is not created, is called land, and it represents the number
1. Thus, the data is encoded into a compact disc by creating pits (0) and lands (1). The CD
players use laser technology to read the optically recorded data.

6) DVD:

DVD is short for digital versatile disc or digital video disc. It is a type of optical media used
for storing optical data. Although it has the same size as a CD, its storage capacity is much
more than a CD. So, it is widely used for storing and viewing movies and to distribute software
programs as they are too large to fit on a CD. DVD was co-developed by Sony, Panasonic,
Philips, and Toshiba in 1995.

Types of DVDs:

DVDs can be divided into three main categories which are as follows:
o DVD-ROM (Read-Only): These types of DVDs come with media already recorded
on them, such as movie dvds. As the name suggests, data on these discs cannot be erased
or added, so these discs are known as a read-only or non-writable DVD.
o DVD-R (Writable): It allows you to record or write information to the DVD. However,
you can write information only once as it becomes a read-only DVD once it is full.
o DVD-RW (Rewritable or Erasable): This type of discs can be erased, written, or
recorded multiple times.

Memory Units
Memory units are used to measure and represent data. Some of the commonly used memory
units are:

1) Bit: The computer memory units start from bit. A bit is the smallest memory unit to measure
data stored in main memory and storage devices. A bit can have only one binary value out of
0 and 1.

2) Byte: It is the fundamental unit to measure data. It contains 8 bits or is equal to 8 bits. Thus
a byte can represent 2*8 or 256 values.

3) Kilobyte: A kilobyte contains 1024 bytes.

4) Megabyte: A megabyte contains 1024 kilobytes.

5) Gigabyte: A gigabyte contains 1024 megabyte.

6) Terabyte: A terabyte contains 1024 gigabytes.

Program counter - variables and addresses - instructions: store, arithmetic,


input and output

8085 Microprocessor – Functional Units

8085 consists of the following functional units −


Accumulator
It is an 8-bit register used to perform arithmetic, logical, I/O & LOAD/STORE operations. It
is connected to internal data bus & ALU.
Arithmetic and logic unit
As the name suggests, it performs arithmetic and logical operations like Addition, Subtraction,
AND, OR, etc. on 8-bit data.
General purpose register
There are 6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each register
can hold 8-bit data.
These registers can work in pair to hold 16-bit data and their pairing combination is like B-C,
D-E & H-L.
Program counter
It is a 16-bit register used to store the memory address location of the next instruction to be
executed. Microprocessor increments the program whenever an instruction is being executed,
so that the program counter points to the memory address of the next instruction that is going
to be executed.
Stack pointer
It is also a 16-bit register works like stack, which is always incremented/decremented by 2
during push & pop operations.
Temporary register
It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
Flag register
It is an 8-bit register having five 1-bit flip-flops, which holds either 0 or 1 depending upon the
result stored in the accumulator.
These are the set of 5 flip-flops −

• Sign (S)
• Zero (Z)
• Auxiliary Carry (AC)
• Parity (P)
• Carry (C)
Instruction register and decoder
It is an 8-bit register. When an instruction is fetched from memory then it is stored in the
Instruction register. Instruction decoder decodes the information present in the Instruction
register.

Addressing Modes in 8085


These are the instructions used to transfer the data from one register to another register, from
the memory to the register, and from the register to the memory without any alteration in the
content. Addressing modes in 8085 is classified into 5 groups −
Immediate addressing mode
In this mode, the 8/16-bit data is specified in the instruction itself as one of its operand. For
example: MVI K, 20F: means 20F is copied into register K.
Register addressing mode
In this mode, the data is copied from one register to another. For example: MOV K, B: means
data in register B is copied to register K.
Direct addressing mode
In this mode, the data is directly copied from the given address to the register. For
example: LDB 5000K: means the data at address 5000K is copied to register B.
Indirect addressing mode
In this mode, the data is transferred from one register to another by using the address pointed
by the register. For example: MOV K, B: means data is transferred from the memory address
pointed by the register to the register K.
Implied addressing mode
This mode doesn’t require any operand; the data is specified by the opcode itself. For
example: CMP.

(Q1) Adding Two 8-bit Numbers


Write a program to add data at 3005H & 3006H memory location and store the result at 3007H
memory location.
Problem demo −
(3005H) = 14H
(3006H) = 89H

Result −
14H + 89H = 9DH
The program code can be written like this −
LXI H 3005H : "HL points 3005H"
MOV A, M : "Getting first operand"
INX H : "HL points 3006H"
ADD M : "Add second operand"
INX H : "HL points 3007H"
MOV M, A : "Store result at 3007H"
HLT : "Exit program"

(Q2) Exchanging the Memory Locations


Write a program to exchange the data at 5000M& 6000M memory location.
LDA 5000M : "Getting the contents at5000M location into accumulator"
MOV B, A : "Save the contents into B register"
LDA 6000M : "Getting the contents at 6000M location into accumulator"
STA 5000M : "Store the contents of accumulator at address 5000M"
MOV A, B : "Get the saved contents back into A register"
STA 6000M : "Store the contents of accumulator at address 6000M"
Algorithm / Pseudo code, flowchart, program development steps
Algorithm: An algorithm is a step-by-step procedure for solving a computational problem. It
is a process or set of rules to be followed in calculations or other problem-solving operations.
Program: A program is a step-by-step machine instruction used for solving any problem or
computational task.

Difference between Algorithm and Program


Programs have been written recently but Algorithms have appeared for centuries. As a common
practice, mathematicians or scientists have been devising procedures for solving computational
problems. Those working on problems were giving solutions in form of step-by-step
procedures known as algorithms. Now we want that same procedure must be followed by
machines so we are writing programs.
An algorithm basically means how to solve a problem. First, we need to learn a few analytical
or problem-solving skills to write an algorithm.
Example:
1. Let’s consider a chef who knows how to prepare a dish then he/she can easily prepare the
recipe of that dish.
2. Let’s consider a chemist who is well versed with different chemical reactions then he/she can
easily prepare a chemical formula applying those reactions.
Once an algorithm is prepared, we need to convert it into a Program so that the computer can
execute it and perform the computational task. Any programming language can be used to write
a program but it must strictly follow the syntax of that programming language.

What is Pseudocode?
Pseudocode is an artificial and informal language that helps programmers in developing
algorithms. It is basically a “text-based” detail (algorithmic) design tool.
Algorithm and Program Example:
So here I have an example algorithm as well as a C++ program that is not a complete program
is just a function.
Algorithm.
The Algorithm is for finding the average of the list of elements. That is, we have a collection
of elements and we want to find out the average. First, we assign 0 to Sum. Then for each
element x in the list, we begin sum assigned sum+ x i.e. adding each value of x into the sum
variable. Then after that, the average is assigned sum by the number of elements, and then,
return the average. So, if you read the above algorithm, you can understand how to find the
average of a list of elements. Add all of them and divide by the number of elements. That’s it.
This is how we write our algorithm using pseudocode.

Examples-1:

Algorithm that compares two numbers and prints either the message identifying the greater
number or the message stating that both numbers are equal

1. START
2. PRINT “ENTER TWO NUMBERS”
3. INPUT A, B
4. IF A > B THEN PRINT “A IS GREATER THAN B”
5. IF B > A THEN PRINT “B IS GREATER THAN A”
6. IF A = B THEN PRINT “BOTH ARE EQUAL”
7. STOP
Examples-2: Algorithm to check whether a number given by the user is odd
or even

1. START
2. PRINT “ENTER THE NUMBER”
3. INPUT N
4. Q ← N/2 (Integer division)
5. R ←N – Q * 2
6. IF R = 0 THEN PRINT “N IS EVEN”
7. IF R != 0 THEN PRINT “N IS ODD”
8. STOP

Examples-3: Print the largest number among three numbers.

1. START
2. PRINT “ENTER THREE NUMBERS”
3. INPUT A, B, C
4. IF A >= B AND B >= C
5. THEN PRINT A
6. IF B >= C AND C >= A
7. THEN PRINT B
8. ELSE
9. PRINT C
10. STOP
Examples-4: Algorithm uses a variable MAX to store the largest number

1. START
2. PRINT “ENTER THREE NUMBERS”
3. INPUT A, B, C
4. MAX ← A
5. IF B > MAX THEN MAX ← B
6. IF C > MAX THEN MAX ← C
7. PRINT MAX
8. STOP

Example-5: Algorithm uses a nested if construct.

1. START
2. PRINT “ENTER THREE NUMBERS”
3. INPUT A, B, C
4. IF A > B THEN
5. IF A > C THEN
6. PRINT A
7. ELSE
8. PRINT C
9. ELSE IF B > C THEN
10. PRINT B
11. ELSE
12. PRINT C
13. STOP

Example-6: Take three sides of a triangle as input and check whether the
triangle can be drawn or not.

1. START
2. PRINT “ENTER LENGTH OF THREE SIDES OF A TRIANGLE”
3. INPUT A, B, C
4. IF A + B > C AND B + C > A AND A + C > B
5. THEN
6. PRINT “TRIANGLE CAN BE DRAWN”
7. ELSE
8. PRINT “TRIANGLE CANNOT
9. BE DRAWN”: GO TO 5
10. STOP
Example-7:

1. START
2. PRINT “ENTER THE OBTAINED PERCENTAGE MARKS”
3. INPUT N
4. IF N > 0 AND N <= 50 THEN PRINT “F”
5. IF N > 50 AND N <= 60 THEN PRINT “C”
6. IF N > 60 AND N <= 70 THEN PRINT “B”
7. IF N > 70 AND N <= 80 THEN PRINT “A”
8. IF N > 80 AND N <= 90 THEN PRINT “E”
9. IF N > 90 AND N <= 100 THEN PRINT “O”
10. STOP

Example-8: Algorithm for incrementing the value of a variable that starts


with an initial value of 1 and stops when the value becomes 5.

1. START
2. C ← 1
3. WHILE C <= 5
4. BEGIN
5. PRINT C
6. C ← C + 1
7. END
8. STOP

Example-9: Algorithm for the addition of N given numbers.

1. START
2. PRINT “HOW MANY NUMBERS?”
3. INPUT N
4. S← 0
5. C ←1
6. PRINT “ENTER NUMBER”
7. INPUT A
8. S← S + A
9. C ←C + 1
10. IF C <= N THEN GOTO 6
11. PRINT S
12. STOP
Program.
Now the same thing for finding the average list of elements, we have written the program using
C++ language. It’s a function, it’s not a complete program, just a function inside a program. If
we don’t use a semicolon to end the statement, it’s an error, and instead of assignment if we
write less than or a hyphen symbol, then also it is an error. So, if you want to store the value
then you must use an equal symbol and that is called an assignment.
So, it means you should follow the proper syntax of a language. Because this is not for you.
You are writing the program for the compiler to understand and convert it into machine code.
You will write a C++ program and that gets converted into machine code or machine language.
So, you are actually talking to the compiler. You should talk in such a way that you can easily
understand.
If the compiler is not understanding your program, then the compiler cannot convert your
program into machine code. So, you should follow the syntax perfectly. That is the reason you
have to put some little extra effort into learning programming.

What is a Flowchart?
A flowchart is used for showing the flow of control in a program and the sequence of steps
involved in a hierarchical manner. It is basically a diagrammatic representation of an algorithm,
workflow, or process.
So, if a program is very big then it is very difficult to figure out how the flow of the program
is, Flow charts are useful for understanding the program, instead of one is reading the program
and understanding it, he can see the flow chart and understand how the program is working.
It is just like if you talk about electrical wiring in a home. Then from where the wires or the
cables are moving through the walls. If you have a plan then you can know where exactly they
are flowing and where the important points are, everything you can know. Otherwise, if there
is any problem with the wiring, then you have to dig the whole wall to find out the problem. If
there is a proper plan then you can understand. So before laying the wire or pulling the wires
we will make a plan. In the same way, before writing the program we make a flowchart. So
based on the flow chart we will write the program. This will help us to understand the program.
Use of Flowchart
Flowcharts were highly used at the times of Monolithic Programming. Then later on when the
concept of Procedural Programming came into practice, the usage of flowcharts was a little
reduced.
Steps in the flowchart:
Usually, when we are using a flow chart for the program, it consists of three steps:
1. Input
2. Process
3. Output
We will call it like this. First, it takes some input. Then it will process. Then it will give the
output. So, any procedure you take will have similar steps. For example, preparing a dish. Input
is the ingredients. That process is the process of making a dish and the output is the dish ready.
If you take a chemistry experiment that is done usually in laboratories will have input means
chemicals and the vessels or instruments whatever you need. Then the process of what you will
do with that and then it gets done successfully. So, every procedure will have these 3 things
and the program is also used to look like this.

Elements of Flowchart:
Now let us look at the elements of the flow chart. The following image shows the different
elements of a flowchart.
Terminal: The oval symbol indicates Start, Stop and Halt in a program’s logic flow. A
pause/halt is generally used in programming logic under some error conditions. The terminal
is the first and last symbol in the flowchart.

Input/Output: A parallelogram denotes any function of input/output type. Program


instructions that take input from input devices and display output on output devices are
indicated with a parallelogram in a flowchart.

Processing: A box represents arithmetic instructions. All arithmetic processes such as addition,
subtraction, multiplication, and division are indicated by the action/process symbol.

Decision: Diamond-shaped symbol represents a decision point. Decision-based operations


such as Yes/No, question, or True/False are indicated by diamond shape in the flowchart.
Flow lines: Flow lines indicate the exact sequence in which instructions are executed. Arrows
represent the direction of flow of control and the relationship among different symbols of the
flowchart.

Now let us draw a few flow charts and try to understand idea of how flowcharts are used and
how they are useful for writing the programs.

Flowchart for adding two numbers

Algorithm Steps For above Flowchart


Step 1: Start.
Step 2: Declare variables Number1 and Number2.
Step 3: Read values Number1 and Number2.
Step 4: Add Number1 and Number2 and store the result in Sum. (Sum = Number1 + Number2).
Step 5: Display Sum.
Step 6: Stop.

Example-1:Draw a flowchart to find the sum of the first 50 natural


numbers.
Example-2: Draw a flowchart to ſind the largest of three numbers A, B,
and C.

Example-3: Draw a flowchart for computing factorial N (N!) where


N! = 1 × 2 × 3 × … × N.
Computer Languages:
(1) Low Level

(ii) Middle Level

(iii) High Level

Low-Level
Of all of the categories, it’s probably easiest to define what it means to be a low-level language.
Machine code is low level because it runs directly on the processor. Low-level languages are
appropriate for writing operating systems or firmware for micro-controllers. They can do just
about anything with a little bit of work, but obviously you wouldn’t want to write the next
major web framework in one of them (I can see it now, “Assembly on Rails”).
Characteristics
• Direct memory management
• Little-to-no abstraction from the hardware
• Register access
• Statements usually have an obvious correspondence with clock cycles
• Superb performance
C is actually a very interesting language in this category (more so C++) because of how broad
its range happens to be. C allows you direct access to registers and memory locations, but it
also has a number of constructs which allow significant abstraction from the hardware itself.
Really, C and C++ probably represent the most broad spectrum languages in existence, which
makes them quite interesting from a theoretical standpoint. In practice, both C and C++ are too
low-level to do anything “enterprisy”.
Mid-Level
This is where things start getting vague. Most high-level languages are well defined, as are
low-level languages, but mid-level languages tend to be a bit difficult to box. I really define
the category by the size of application I would be willing to write using a given language. I
would have no problem writing and maintaining a large desktop application in a mid-level
language (such as Java), whereas to do so in a low-level language (like Assembly) would lead
to unending pain.
This is really the level at which virtual machines start to become common-place. Java, Scala,
C# etc all use a virtual machine to provide an execution environment. Thus, many mid-level
languages don’t compile directly down to the metal (at least, not right away) but represent a
blurring between interpreted and compiled languages. Mid-level languages are almost always
defined in terms of low-level languages (e.g. the Java compiler is bootstrapped from C).
Characteristics
• High level abstractions such as objects (or functionals)
• Static typing
• Extremely commonplace (mid-level languages are by far the most widely used)
• Virtual machines
• Garbage collection
• Easy to reason about program flow

High-Level
High-level languages are really interesting if you think about it. They are essentially mid-level
languages which just take the concepts of abstraction and high-level constructs to the extreme.
For example, Java is mostly object-oriented, but it still relies on primitives which are
represented directly in memory. Ruby on the other hand is completely object-oriented. It has
no primitives (outside of the runtime implementation) and everything can be treated as an
object.
In short, high-level languages are the logical semantic evolution of mid-level languages. It
makes a lot of sense when you consider the philosophy of simplification and increase of
abstraction. After all, people were n times more productive switching from C to Java with all
of its abstractions. If that really was the case, then can’t we just add more and more layers of
abstraction to increase productivity exponentially?
High-level languages tend to be extremely dynamic. Runtime flow is changed on the fly
through the use of things like dynamic typing, open classes, etc. This sort of technique provides
a tremendous amount of flexibility in algorithm design. However, this sort of mucking about
with execution also tends to make the programs harder to reason about. It can be very difficult
to follow the flow of an algorithm written in Ruby. This “obfuscation of flow” is precisely why
I don’t think high-level languages like Ruby are suitable for large applications. That’s just my
opinion though.
Characteristics
• Interpreted
• Dynamic constructs (open classes, message-style methods, etc)
• Poor performance
• Concise code
• Flexible syntax (good for internal DSLs)
• Hybrid paradigm (object-oriented and functional)
• Fanatic community

Program Execution on GCC Compiler


(1) For windows use Sygwin to install GCC Compiler
GCCs in Cygwin
Other GCC packages in Cygwin are:
• gcc-core, gcc-g++: Basic 64-bit C/C++ compiler target 64-bit Cygwin. You probably
should install these two packages too. However, to distribute the code produced, you need
to distribute Cygwin Runtime Environment (cygwin1.dll). This is because Cygwin is a
Unix emulator under Windows.
• cygwin32-gcc-core, cygwin32-gcc-g++: Older 32-bit C/C++ compiler for target 32-bit
Cygwin (Obsoleted by gcc-code and gcc-g++?).
• mingw-gcc-core, mingw-gcc-g++: Older MinGW 32-bit C/C++ compiler for 32-bit
Windows (Obsoleted by MinGW-W64 packages?).

Compile/Link a Simple C Program - hello.c


// hello.c
#include <stdio.h>

int main() {
printf("Hello, world!\n");
return 0;
}

To compile the hello.c:

// Compile and link source file hello.c into executable a.exe (Windows) or a (Unixes)
>gcc hello.c

The default output executable is called "a.exe" (Windows) or "a.out" (Unixes and Mac OS X).
To run the program:

// (Windows) In CMD shell


>a

// (Unixes / Mac OS X) In Bash Shell - include the current path (./)


$ chmod a+x a.out
$ ./a.out

To specify the output filename, use -o option:


// (Windows) In CMD shell
> gcc -o hello.exe hello.c
// Compile and link source file hello.c into executable hello.exe
> hello
// Execute hello.exe under CMD shell

// (Unixes / Mac OS X) In Bash shell


$ gcc -o hello hello.c
$ chmod a+x hello
$ ./hello

You might also like