MIC Microproject 22415 Final

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

MAHARASHTRA BORAD OF TECHNICAL EDUCATION,MUMBAI

NASHIK GRAMIN SHIKSHAN PRASARK MANDAL’S

BRAHMA VALLEY COLLEGE OF TECHNICAL EDUCATION

ANJANERI, NASHIK

ACADEMIC YEAR: 2024-2025

MICROPROCESSOR (SUBJECT CODE : 22415)

MICRO PROJECT
ON
“CONVERSION OF NUMBER SYSTEM”

COMPUTER TECHNOLOGY(4th SEMESTER)

SUBMITTED BY
SR.NO GROUP MEMBER’S NAME SEAT NO ENROLLNMENT
NO
1 Gayatri Pramod Mahajan 437221 2207780027
2 Rohini Chandrakant Jadhav 437240 2207780047
3 Madhuri Kashinath Barve 437213 2207780019
4 Payal Bhausaheb Chavan 437197 2207780001

UNDER THE GUIDENCE OF


[PROF. S.A.BHAMARE]

NASHIK GRAMIN SHIKSHAN PRASARK MANDAL’S


BRAHMA VALLEY COLLEGE OF TECHNICAL EDUCATION
ANJANERI, NASHIK

CERTIFICATE
THIS IS TO CERTIFY THAT

[Gayatri Pramod Mahajan]

[Rohini Chandrakant Jadhav]

[Madhuri Kashinath Barve]

[Payal Bhausaheb Chavan]

Have successfully completed their project “ Conversion of Number


System” Brahma Valley College of Technical Education Anjaneri Nashik, in the
partial fulfillment of the diploma course in computer Technology in Academic
Year 2024-2025.

Prof. S . A . Bhamare Prof

Guide External

Prof. M . M . Kulkarni Prof. V . P.Nikhade

Head of Department Principal

TABLES OF CONTENTS
SR. NO CONTENTS PAGE.NO

1. INTROUDCTION 1

NUMBER OF SYSTEM CONVERSION TABLE


2 ALORITHM 2

FLOWCHART
3 NUMBER OF BASE CONVERSION 3
1.BINARY TO OTHER
2.DECIMAL TO OTHER
3.OCTAL TO OTHER
4.HEADECIMAL TO OTHER
4 CONVERSION 4-11

5 PROGRAM 12-14

6 OUTPUT 15

7 CONCLUSION 16

1.INTRODUCTION :
In this project we use assembly language to create a program.In our project
we use tasm software for run our program.In that we convert a number from
BCD to hexadecicimal number.for that project we create a program for 16 bit
means we create a program for 8086 microprocessor.In that we use Assembly
directives like ASSUME.
Means In that we understand the concept of assembly Directives.In that we
understand about how to step follow for run the program.We understand
about Program Development tools and their use while running our program.

As we know, the number system is a form of expressing the numbers. In


number system conversion, we will study to convert a number of one base, to a
number of another base. There are a variety of number systems such as binary
numbers, decimal numbers, hexadecimal numbers, octal numbers, which can
be exercised.

In this article, you will learn the conversion of one base number to another
base number considering all the base numbers such as decimal, binary, octal
and hexadecimal with the help of examples. Here, the following number system
conversion methods are explained.

• Binary to Decimal Number System


• Decimal to Binary Number System
• Octal to Binary Number System
• Binary to Octal Number System
• Binary to Hexadecimal Number System
• Hexadecimal to Binary Number System
Get the pdf of number system with a brief description in it. The general
representation of number systems are;

Decimal Number – Base 10 – N10

Binary Number – Base 2 – N2

Octal Number – Base 8 – N8

Hexadecimal Number – Base 16 – N16


1.1 NUMBER SYSTEM CONERSION TABLE :

Binary Octal Decimal Hexadecimal


Numbers Numbers Numbers Numbers

0000 0 0 0

0001 1 1 1

0010 2 2 2

0011 3 3 3

0100 4 4 4

0101 5 5 5

0110 6 6 6

0111 7 7 7

1000 10 8 8

1001 11 9 9

1010 12 10 A

1011 13 11 B

1100 14 12 C

1101 15 13 D

1110 16 14 E

1111 17 15 F

1
2. ALOGORITHM :

Step 1 : Start
Step 2 :Display Menu
BCD to HEX
Step 3 :Read The Option
It option is 3 exit
Do BCD To HEX conversion

Step 4 :Stop

2.1 FLOWCHART :

2
3. NUMBER OF BASE CONVERSION :

1.BINARY NUMBER SYSTEM :


A Binary number system has only two digits that are 0 and 1. Every number
(value) represents with 0 and 1 in this number system. The base of binary
number system is 2, because it has only two digits.

2.OCTAL NUMBER SYSTEM :


Octal number system has only eight (8) digits from 0 to 7. Every number
(value) represents with 0,1,2,3,4,5,6 and 7 in this number system. The base of
octal number system is 8, because it has only 8 digits.

3. DECIMAL NUMBER SYSTEM :


Decimal number system has only ten (10) digits from 0 to 9. Every number
(value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number system. The
base of decimal number system is 10, because it has only 10 digits.

4.HEXADECIMAL NUMBER SYSTEM :


A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to
9 and A to F. Every number (value) represents with 0,1,2,3,4,5,6,
7,8,9,A,B,C,D,E and F in this number system. The base of hexadecimal number
system is 16, because it has 16 alphanumeric values. Here A is 10, B is 11, C is
12, D is 14, E is 15 and F is 16.

3
4. CONVERSION :

1.DECIMAL TO OTHER :

DECIMAL TO BINARY
Decimal Number System to Other Base

To convert Number system from Decimal Number System to Any Other


Base is quite easy; you have to follow just two steps: A) Divide the Number
(Decimal Number) by the base of target base system (in which you want to
convert the number: Binary (2), octal (8) and Hexadecimal (16)). B) Write
the remainder from step 1 as a Least Signification Bit (LSB) to Step last as a
Most Significant Bit (MSB). Decimal to Binary Conversion.

4
DECIMAL TO OCTAL :

DECIMAL TO HEXADECIMAL :

5
2. BINARY TO OTHER :

Multiply the digit with 2(with place value exponent). Eventually add all the
multiplication becomes the Decimal number.

BINARY TO DECIMAL :

BINARY TO OCTAL :

An easy way to convert from binary to octal is to group binary digits into
sets of three, starting with the least significant (rightmost) digits.

6
BINARY TO HEXADECIMAL :

An equally easy way to convert from binary to hexadecimal is to group


digits into sets of four, starting with the least significant (rightmost) digits.

Binary: 11100101 = 1110 0101

Then, look up each group in a table:

7
3.OCTAL TO OTHER :

OCTAL TO DECIMAL :

The conversion can also be performed in the conventional mathematical


way, by showing each digit place as an increasing power of 8.

345 octal = (3 * 82 ) + (4 * 81 ) + (5 * 80 ) = (3 * 64) + (4 * 8) + (5 * 1) =


229 decimal

OR

Converting octal to decimal can be done with repeated division.

1. Start the decimal result at 0.

2. Remove the most significant octal digit (leftmost) and add it to the result.

3. If all octal digits have been removed, you’re done. Stop.

4. Otherwise, multiply the result by 8

5. Go to step 2. Octal Digits Operation Decimal Result O

(345)8 =(229)10

OCTAL TO BINARY :

Converting from octal to binary is as esay as converting from binary to


octal. Simply look up each octal digit to obtain the equivalent group of three
binary digits.

OCTAL TO HEXADECIMAL :

8
When converting from octal to hexadecimal, it is often easier to first
convert the octal number into binary and then from binary into
hexadecimal. For example, to convert 345 octal into hex:

Drop any leading zeros or pad with leading zeros to get groups of four
binary digits (bits): Binary 011100101 = 1110 0101 Then, look up the
groups in a table to convert to hexadecimal digits.

4.HEXADECIMAL TO OTHER :

9
HEXADECIMAL TO BINARY :

converting from hexadecimal to binary is as esay as convering from binary


to hexadecimal. Simply look up each hexadecimal digit to obtain the
equivalent group of four binary digits.

HEXADECIMAL TO OCTAL :

For converting hexadecimal to octal, there are two steps required to

performs

In the first step, we will find the binary equivalent of the hexadecimal
number.

Next, we have to make the pairs of three bits on both sides of the binary
point. If there will be one or two bits left in a pair of three bits pair, we add
the required number of zeros on extreme sides and write the octal digits
corresponding to each pair.

HEXADECIMAL TO DECIMAL :

10
The process of converting hexadecimal to decimal is the same as binary to
decimal. The process starts from multiplying the digits of hexadecimal
numbers with its corresponding positional weights. And lastly, we add
all those products.

Let's take an example to understand how the conversion is done from


hexadecimal to decimal.

5. PROGRAM :
11
1.In our project first we created code for converting BCD number to Hexadecimal
number. This code as follows:
DATA SEGMENT
BCD_NO DB 1 DUP(?) ;BCD(2 DIGIT Packed BCD)
HEX_NO DB 1 DUP(0) ;Store Hex Equivalent Here
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
MOV DX,DATA ; initialization of Data
MOV DS,DX ;Segment resister
MOV AL,BCD_NO ;Load the BCD_NO in AL
MOV BL,AL ;Store it in BL
AND BL,0FH ;mask the lower BCD Digit
AND AL,0F0H ;mask the upper BCD Digit
MOV CL,04H ;Swap the nibbles
ROR AL,CL
MOV DL,0AH ;multiplay the upper BCD Digit with
0AH
MUL DL
ADD AL,BL
MOV HEX_NO,AL ;Store the hex Equivalent Result
MOV AH,4CH ;program Termination with
INT 21H ;return code
CODE ENDS ;End of the code segment
END

2.Open the TASM and type edit MICROPRO.asm.Then We type this code in TASM
software are as follow:

12
3. Then we save this file and exit .then we type tasm MICROPROJ.asm

4. In our program there is no any error display.

5. Then MICROPROJ.obj means we create a object file

6. Then next step is the type following for linking our program by linkertlink
MICROPROJ.exe

7. Then for debugging out program we type following td MICROPROJ.exe.

8. Then our program run and our output displayed


Concept-
Algorithm-Algorithm is the step by step logic written in general English
languages to solve a specific problem.
Flowchart-Flowchart is the graphical representation of the Algorithm.
Assembler Directive-They are commands or a directions provided by
the assembler tool to perform certain function .or operation while
Assembling the source code of the Assembly languages program

SEGMENT Directive –The Segment Directive is used to indicate the start


of the logical segment .proceding the SEGMENT Directive is the name
we want to give the SEGMENT. for ex.the statement CODE SEGMENT
Declares to the assembler the start of the logical statement called CODE

13
ENDS Directive:The Directive used with the Name of the segment to
indicate the end of that logical Segment
For ex CODE SEGNENT
Declares Start of the logical segment named CODE,containing code
i.e.Instruction in the program
.............
............
CODE ENDS
Declares Ends of the Segment named CODE
END Directive-The END Directive is put after the last Statement of the
Program to tell that this is the END of the Program ModuleThe
Assembler Will ignore Any Statements After and END Directive,so One
Muist Take Sure To use Only One END Directive At the very end of our
Program Module.
Ex.
END Start
It declares that the Assembler Program has Come to end .Further it also
specified Exeucution Entry point from label Start
ASSUME Directive The ASSUME Directive is Used to tell the assembler the
Name of the logical Segment it Shoutld use for the specific Segment
For Ex.ASSUME CS:CODE
Tells the Assembler that the instructions for a program are in a logical
named CODE.
DB (DEFINE BYTE) Directive-To DB Directive Is Used to Declare a Byte
Type Vaiable or to allowcate or more Storage memery location of type
byte in Memory.

Ex.ITEMS DB 49H,98H,25H.

6 .OUTPUT :

14
7. CONCLUSION :

15
There are many different number systems that can be used, including binary
numbers, decimal numbers, hexadecimal numbers, and octal numbers, all of
which can be tested.

Number system conversions are concerned with the operations that are
performed in order to change the base of the numbers. Changing a decimal
number with base 10 to a binary number with base 2 is an example of this
transformation. On the number system, we can also perform arithmetic
operations such as addition, subtraction, and multiplication, among others.

8. BIBLOGRAPHY :

www.google.com
www.wikipedia.com
www.java.net.com

***

16

You might also like