MPCOtill 07
MPCOtill 07
MPCOtill 07
DEVANGPATELINSTITUTEOFADVANCETECHNOLOGYAND
RESEARCH
DEPARTMENTOFCOMPUTERENGINEERING
LAB MANUAL
PRACTICAL INDEX
One of the earliest and most well-known devices was an abacus. Then in 1822, the father of
computers, Charles Babbage began developing what would be the first mechanical computer.
And then in 1833 he actually designed an Analytical Engine which was a general-purpose
computer.
1. What is computer?
• A computer is a programmable electronic device that accepts raw data as input and
processes it with a set of instructions (a program) to produce the result as output. It renders
output just after performing mathematical and logical operations and can save the output
for future use. It can process numerical as well as non-numerical calculations. The term
"computer" is derived from the Latin word "computare" which means to calculate.
• A computer is designed to execute applications and provides a variety of solutions through
integrated hardware and software components. It works with the help of programs and
represents the decimal numbers through a string of binary digits. It also has a memory that
stores the data, programs, and result of processing. The components of a computer such as
machinery that includes wires, transistors, circuits, hard disk are called hardware. Whereas,
the programs and data are called software.
• It is believed that the Analytical Engine was the first computer which was invented by
Charles Babbage in 1837. It used punch cards as read-only memory. Charles Babbage is
also known as the father of the computer.
Transistors were invented in Bell Labs. The use of transistors made it possible to perform
powerfully and with due speed. It reduced the dimensions and price and thankfully the warmth
too, which was generated by vacuum tubes. Central Processing Unit (CPU), memory,
programming language, and input, and output units also came into the force within the second
generation.
The programming language was shifted from high level to programming language and made
programming comparatively a simple task for programmers.
A single IC has many transistors, registers, and capacitors built on one thin slice of silicon. The
value size was reduced and memory space and dealing efficiency were increased during this
generation. Programming was now wiped out Higher level languages like BASIC (Beginners
All-purpose Symbolic Instruction Code). Minicomputers find their shape during this era.
The speed is the highest, size is the smallest and area of use has remarkably increased within the fifth
generation computers. Though not a hundred percent AI has been achieved to date but keeping in sight
the present developments, it is often said that this dream also will become a reality very soon.
3. Types of computer:
There are two bases on which we can define the types of computers. We will discuss the type of
computers on the basis of size and data handling capabilities. We will discuss each type of
computer in detail. Let’s see first what are the types of computers.
Super Computer
Mainframe computer
Mini Computer
Workstation Computer
PersonalComputer:
Server Computer (PC)
Server Computer:
Server Computer
Analog Computer
Digital Computer
Hybrid Computer
Tablets and Smartphone
Supercomputer:
When we talk about speed, then the first name that comes to mind when thinking of computers is
supercomputers. They are the biggest and fastest computers (in terms of speed of processing
data). Supercomputers are designed such that they can process a huge amount of data, like
processing trillions of instructions or data just in a second. This is because of the thousands of
interconnected processors in supercomputers. It is basically used in scientific and engineering
applications such as weather forecasting, scientific simulations, and nuclear energy research. It
was first developed by Roger Cray in 1976.
Mainframe computer:
Mainframe computers are designed in such a way that they can support hundreds or thousands of
users at the same time. It also supports multiple programs simultaneously. So, they can execute
different processes simultaneously. All these features make the mainframe computer ideal for big
organizations like banking, telecom sectors, etc., which process a high volume of data in general.
Minicomputer:
Minicomputer is a medium size multiprocessing computer. In this type of computer, there are
two or more processors, and it supports 4 to 200 users at one time. Minicomputer is similar to
Microcontroller. Minicomputers are used in places like institutes or departments for different
work like billing, accounting, inventory management, etc. It is smaller than a mainframe
computer but larger in comparison to the microcomputer.
Workstation Computer:
A workstation computer is designed for technical or scientific applications. It consists of a fast
microprocessor, with a large amount of RAM and a high-speed graphic adapter. It is a single-
user computer. It is generally used to perform a specific task with great accuracy.
Analog Computer:
Analog Computers are particularly designed to process analog data. Continuous data that
changes continuously and cannot have discrete values are called analog data. So, an analog
computer is used where we don’t need exact values or need approximate values such as speed,
temperature, pressure, etc. It can directly accept the data from the measuring device without first
converting it into numbers and codes. It measures the continuous changes in physical quantity. It
gives output as a reading on a dial or scale. For example speedometer, mercury thermometer, etc.
Digital Computer:
Digital computers are designed in such a way that they can easily perform calculations and
logical operations at high speed. It takes raw data as input and processes it with programs stored
in its memory to produce the final output. It only understands the binary input 0 and 1, so the raw
input data is converted to 0 and 1 by the computer and then it is processed by the computer to
produce the result or final output. All modern computers, like laptops, desktops including
smartphones are digital computers.
Hybrid Computer:
As the name suggests hybrid, which means made by combining two different things. Similarly,
the hybrid computer is a combination of both analog and digital computers. Hybrid computers
are fast like analog computers and have memory and accuracy like digital computers. So, it has
the ability to process both continuous and discrete data. For working when it accepts analog
signals as input then it converts them into digital form before processing the input data. So, it is
widely used in specialized applications where both analog and digital data are required to be
processed. A processor which is used in petrol pumps that converts the measurements of fuel
flow into quantity and price is an example of a hybrid computer.
5. Applications of Computer:
Information processing
Communication and connectivity
Automation and efficiency
Storage and retrieval of information
Entertainment and multimedia
Education and learning
Business and productivity
Scientific research and innovation
Creative pursuits
Personal convenience
CONCLUSION:
In this practical, we learn about what is computer, why it’s needed, applications of
computer, all 5 generation of computers and the types of computers.
Staff Signature:
Grade:
PROGRAM CODE:
#include<iostream>
using namespace std;
int main()
{
float n;
int ct=0,i;
int bin[32];
cout<<"Enter decimal number:";
cin>>n;
int temp=(int)n;
while(temp>0)
{
bin[ct]=temp%2;
temp=temp/2;
ct++;
}
cout<<"Binary value is:";
for(i=(ct-1);i>=0;i--)
{
cout<<bin[i];
}
float frac=n-(int)n;
if(frac!=0)
{
cout<<".";
}
while(frac!=0)
{
float c;
c=frac*2;
cout<<(int)c;
frac=c-(int)c;
}
OUTPUT:
CONCLUSION:
One of the most important applications of the number system is in computer technology.
Generally, a computer uses the binary number system, but humans will use the hexadecimal
number system, as it is easier to understand. For this reason, the number system conversion is
required.
Staff Signature:
Grade:
Remarks by the Staff:
2. Truth table:
CONCLUSION:
In this practical we learn about 7-segment display and got idea about how 0 to 9 digits can be diplay with
help of 7-segment display.
Staff Signature:
Grade:
Remarks by the Staff:
CONCLUSION:
In this practical, we learn about how to create adder and subtractor using only one circuit in
LOGISIM software.
Staff Signature:
Grade:
Remarks by the Staff:
complement(mt, brn);
while (sc != 0)
{
cout << qr[0] << "\t" << qn;
if ((qn + qr[0]) == 1)
Staff Signature:
Grade:
Addition:
Program Code:
org 100h
MOV AX,[4000H]
MOV BX,[4002H]
ADD AX,BX
MOV [4004H],AX
Ret
Output:
Subtraction:
Program Code:
org 100h
MOV AX,[4000H]
MOV BX,[4002H]
SUB AX,BX
MOV [4004H],AX
Ret
AIM:
2 :- Write a program to multiply & divide the number stored at 4000H by 08H and store
the resul at
4001H & 4002H.
Multiplication:
Program Code:
org 100h
MOV AX,[4000H]
MOV BX,08H
MUL BX
MOV [4001H],AX
ret
Output:
Output:
Conclusion:
Through this practical we can learn about microprocessor 8086 and how to implement
different operations on it and also about assembly language.
Staff Signature:
Grade:
AIM:
Consider two 8-bit data are stored at memory location 4001H and 4002H.
perform following logical operation on it and store result from 4002H location.
1.OR Operation
Program Code:
org 100h
MOV AL,[4001H]
MOV BL,[4002H]
OR AL,BL
MOV [4002H],AL
Ret
Output:
Program Code:
org 100h
MOV AL,[4001H]
MOV BL,[4002H]
AND AL,BL
MOV [4002H],AL
Ret
Output:
NOT Operation
Program Code:
org 100h
MOV AL,[4001H]
NOT AL
XOR Operation
org 100h
Program Code:
MOV AL,[4001H]
MOV BL,[4002H]
XOR AL,BL
MOV [4002H],AL
ret
Output:
Logical Left
Program Code:
org 100h
MOV AL,[4001H]
SHL AL,1
MOV [4002H],AL
ret
Output:
Logical Right:
Program Code:
org 100h
MOV AL,[4001H]
SHR AL,1
Program Code:
org 100h
MOV AL,[4001H]
SAL AL,1
MOV [4002H],AL
ret
Output:
Program Code:
org 100h
MOV AL,[4001H]
SAR AL,1
MOV [4002H],AL
ret
Output:
Rotate Left
Program Code:
org 100h
STC
MOV AL,[4001H]
RCL AL,1
MOV [4002H],AL
ret
Output:
Rotate Right
Program Code:
org 100h
STC
MOV AL,[4001H]
RCR AL,1
MOV [4002H],AL
ret
Rotate Left
Program Code:
org 100h
MOV AL,[4001H]
ROL AL,1
MOV [4002H],AL
ret
Output:
Program Code:
org 100h
MOV AL,[4001H]
ROR AL,1
MOV [4002H],AL
Ret
Output:
Conclusion:
Through this practical we can learn about different kind of operations performed
in microprocessor 8086
Grade: