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

A

Micro Project Report


On
Title of Micro project: “Conversion of number system”
Submitted to
MSBTE
In partial Fulfillment of the Requirement
For the Diploma in Computer Science &Engineering
Submitted by
Mr. Harshal B. Patil
Mr. Aniket S. Shekokar
Mr. Ajay A. Wagh
Mr. Saurav S. Fulpagare
Under the Guidance of
Prof. A. R. Warkhede

Department of Computer Science & Engineering


Padm. Dr. V.B. Kolte College of Engineering, Malkapur 443101

2022-23

1
CERTIFICATE

This is to certify that Mr. Harshal B. Patil, Mr. Aniket S. Shekokar, Mr. Ajay A. Wagh,
Mr. Saurav .S. Fulpagare of Polytechnic second Year Computer Engineering have submitted
a micro project titled “Conversion of number system” during the academic year 2022-
2023 satisfactory manner in partial fulfilment of the requirement for the Diploma in
Computer Engineering of MSBTE, Mumbai.

Mr. Harshal B. Patil

Mr. Aniket S. Shekokar


Mr. Ajay A. Wagh
Mr. Saurav S. Fulpagare

Prof. A. R. Warkhede Prof. M.V.Shastri


(Guide) (Head of Department)

Prof. S.N.Khachane
(Principal)

2
DECLARATION

I hereby declare that the micro project entitled Resource Required

Sr. Name of resources Specification Quantity Remark


No

1 Textbook Microprocessor Textbook 1

2 Reference Book ………………..

3 Internet www.wikipedia.comwkivicypidiy 1
a

Completed and written by me and has not been previously formed the basis for the
award of any diploma certificate.

Mr. Harshal B. Patil


Mr. Aniket S. Shekokar

Mr. Ajay A. Wagh


Mr. Saurav S. Fulpagare

Diploma in Computer Science & Engineering.


VBKCOE Malkapur

3
ACKNOWLEDGEMENT

The real spirit of achieving a goal is through the way of excellence and lustrous discipline. I would have
never succeeded in completing my task without the cooperation, encouragement and help provided to me by
various personalities.

I would like to take this opportunity to express my heartfelt thanks to my guide Prof.
A.R.Warkhede her esteemed guidance and encouragement, especially through difficult times. His
suggestions broaden my vision and guided me to succeed in this work. I am also very grateful for his
guidance and comments while studying part of my seminar and learnt many things under his leadership.

I extend my thanks to Prof. M. V. Shastri Head of computer Science &Engineering Department,


Padm. Dr. V. B. Kolte college of Engineering (Polytechnic 1st shift) Malkapur for their valuable support
that made me consistent performer.

I also extend my thanks Prof S .N. Khachane Principal, Padm. Dr. V. B. Kolte college of
Engineering (Polytechnic !st shift) Malkapur for their valuable support.

Also I would like to thanks to all teaching and non-teaching staff of the department for their
encouragement, cooperation and help. My greatest thanks are to all who wished me success especially my
parents, my friends whose support and care makes me stay on earth.

Place: VBKCOE, Malkapur

4
PART A

Title of micro project: “Conversion of number system”

Brief Introduction: In the micro project report we have explained the conversion of number system
What is number system and conversion of number system i.e.

 Hexadecimal to equivalent BCD


 BCD to hexadecimal

Aim of micro project:


 To convert the numbers into its equivalent number.
 To convert hexadecimal to its equivalent BCD
 To convert BCD to its equivalent hexadecimal number.

Resource Required:
Sr. Name of resources Specification Quantity Remark
No

1 Textbook Microprocessor Textbook 1

2 Reference Book ………………..

3 Internet www.wikipedia.comwki 1
vicypidiya

5
PART B

Title of micro project: “Conversion of number system”

Brief Introduction: In the micro project report we have explained the conversion of number system
What is number system and conversion of number system i.e.

 Hexadecimal to equivalent BCD


 BCD to hexadecimal

Course outcome: Use instruction for different addressing modes

Actual procedure followed:


1. First we selected topics on that we make a microproject
2. Then we solve the problems of conversions.
3. Then discuss with our subject teacher.
4. Then prepare report on it
Actual Process Used:
Sr. Details of activity Planned start Planned Name of
No. date finished team
date members

1 First select topics whichcan 18/03/23 19/03/23 Mr. Harshal


study B. Patil

2 Then search information about 18/03/23 20/03/23 Mr. Aniket


how to Prepare Chart S. Shekokar
Displaying Ionization
Phenomenon

3 Then discuss with our 21/03/23 24/03/23 Mr. Ajay A.


subject teacher Wagh

4 Then prepare Report on it 26/03/23 01/04/23 Mr. SauravS.


Fulpagare

6
Output of the project:-

Introduction of Hexa-Decimal to BCD conversion:-


Hexadecimal (Hexa) to binary-coded decimal (BCD) conversion is the process of converting
a Hexa number to its equivalent BCD representation. BCD is a way of representing decimal numbers
using binary notation, where each decimal digit is represented by a 4-bit binary code.

The conversion process involves dividing the Hexa number into its individual digits, converting each
digit to its decimal equivalent, and then converting the decimal digits to their BCD representation.

For example, let's consider the Hexa number 2Bh. To convert this to BCD, we first separate the two
hexadecimal digits, 2 and B. We then convert each digit to its decimal equivalent, which is 2 and 11,
respectively.

Next, we convert each decimal digit to its 4-bit BCD representation. The decimal digit 2 is
represented by the BCD code 0010, while the decimal digit 1 is represented by the BCD code 0001.

Finally, we combine the two BCD codes to get the BCD representation of the original Hexa number.
In this case, the BCD representation of 2Bh is 0010 0001.

The conversion process can be done manually, but it can also be implemented in software or
hardware. In software, the conversion can be done using programming languages or assembly
language. In hardware, BCD converters can be implemented using digital circuits or
microcontrollers.

Example:-
To convert (213AFE)H to BCD, first it has to be converted to binary which gives (2177790)D
. Now each digit is converted to its BCD code which gives (0010 0001 0111 0111 0111 1001
0000)BCD .

 Steps of conversion of Hexadecimal to equivalent BCD:-

Binary Coded Decimal (BCD) is a system of representing decimal numbers using binary
digits. In BCD, each decimal digit is represented by a 4-bit binary code. This system is used in
applications that require high precision and accuracy, such as financial calculations and
measurements. Hexadecimal, on
the other hand, is a base-16 numbering system that uses 16 symbols, including 0-9 and A-F,
to represent numbers. In this section, we will describe the steps involved in converting a hexadecimal
number to its equivalent BCD format.

Step 1: Write down the hexadecimal number that you want to convert.

For example, let's say we want to convert the hexadecimal number "5A" to BCD.

Step 2: Convert each hexadecimal digit into its 4-bit binary equivalent.

To do this, you can use a hexadecimal to binary conversion table or the method of repeatedly
7
dividing
the hexadecimal number by 2 and writing down the remainder until you reach 0. For example, the
hexadecimal digit "5" can be converted to binary as "0101", and the hexadecimal digit "A" can be
converted to binary as "1010".

Step 3: Write down the binary equivalent of each hexadecimal digit next to each other, to get a binary
number.

For example, the binary equivalent of "5A" is "01011010".

Step 4: Divide the binary number into groups of 4 bits, starting from the rightmost bit.

If the number of bits is not a multiple of 4, you can add leading zeros to make it divisible by 4. For
example, "01011010" can be divided into "0101" and "1010".

Step 5: Convert each group of 4 bits into its decimal equivalent.

Each group of 4 bits can represent a decimal digit from 0 to 9, so you can use a conversion table or
convert the binary to decimal manually. For example, "0101" is equivalent to the decimal number "5"
and "1010" is equivalent to the decimal number "10".

Step 6: Write down the decimal equivalent of each group of 4 bits next to each other, to get the BCD
representation of the original hexadecimal number.

For example, the BCD representation of "5A" is "0101 1010", which is equivalent to the decimal
number "59".

Overall, converting hexadecimal to BCD requires converting each hexadecimal digit to binary,
grouping the binary digits into sets of 4 bits, and then converting each group to its decimal
equivalent. By following these steps, you can convert a hexadecimal number to its equivalent BCD
format.

It is important to note that BCD can be an inefficient way to represent numbers, as it uses more bits
than other formats. For example, a 4-digit BCD number requires 16 bits, while a 4-digit binary
number only requires 4 bits. BCD is often used in applications where decimal arithmetic is required,
such as in calculators and financial systems. However, in most cases, binary or other formats are
more efficient and easier to work with.

Additionally, there are some cases where the conversion from hexadecimal to BCD can be more
complicated, such as when dealing with negative numbers or fractional numbers. In these cases,
additional steps may be required to properly represent the number in BCD format.

In conclusion, converting hexadecimal to BCD involves a few simple steps, but it is important to
understand the limitations and complexities of this system. With the right knowledge and tools, you
can easily convert hexadecimal numbers to their equivalent BCD format for use in various
applications.

8
Algorithm for converting hexadecimal to equivalent BCD:-

Step I Initialize the data segment.


Step II Initialize BX = 0000 H and DH = 00H.
Step III Load the number in AX.
Step IV Compare number with 10000 decimal. If below goto step VII else goto step V.
Step V Subtract 10,000 decimal from AX and add 1 decimal to DH
Step VI Jump to step IV.
Step VII Compare number in AX with 1000, if below goto step X else goto step VIII.
Step VIII Subtract 1000 decimal from AX and add 1000 decimal to BX.
Step IX Jump to step VII.
Step X Compare the number in AX with 100 decimal if below goto step XIII
Step XI Subtract 100 decimal from AX and add 100 decimal to BX.
Step XII Jump to step X
Step XIII Compare number in AX with 10. If below goto step XVI
Step XIV Subtract 10 decimal from AX and add 10 decimal to BX..
Step XV Jump to step XIII.
Step XVI Add remainder in AX with result in BX.
Step XVII Display the result in DH and BX.
Step XVIII Stop.

9
 Flowchart for converting Hexadecimal to equivalent BCD:-

10
 Program For Hex to BCD Conversion Code:-

ORG 100h ; Set the origin to 100h

MOV AL, 4Ah ; Load hex number (4Ah) into AL

MOV BL, 10 ; Load 10 into BL (used for division)

MOV CL, 0 ; Clear CL (used for counting digits)

MOV DH, 0 ; Clear DH (used for storing high digit)

LOOP1:
DIV BL ; Divide AL by 10

ADD AH, 30h ; Convert remainder to ASCII

PUSH AX ; Store remainder on stack

INC CL ; Increment digit count

CMP AL, 0 ; Check if quotient is zero


JNE LOOP1 ; If not, repeat loop

LOOP2:
POP AX ; Pop remainder from stack

MOV DL, AH ; Move remainder to DL

MOV AH, 0 ; Clear AH

MOV AL, DL ; Move remainder back to AL

AAM ; Convert AL to BCD

MOV DL, AH ; Move high digit to DL

11
ADD DL, 30h ; Convert high digit to ASCII

MOV DH, DL ; Store high digit in DH

ADD AL, 30h ; Convert low digit to ASCII

; Output low and high digits


; (you can use any output method you prefer)

DEC CL ; Decrement digit count

CMP CL, 0 ; Check if all digits have been processed


JNE LOOP2 ; If not, repeat loto op

HLT ; Halt program

END ; End of program

12
Example:-
; Convert Hex to BCD
MOV AH, 0 ; Clear AH register
MOV BL, AL ; Move AL value to BL register

AND AL, 0Fh ; Clear upper nibble


AND BL, 0F0h ; Clear lower nibble
SHR BL, 4 ; Shift right 4 bits to get upper nibble

ADD AL, 30h ; Convert lower nibble to ASCII


ADC AH, 0 ; Add carry to AH
ADD BL, 30h ; Convert upper nibble to ASCII
ADC AH, 0 ; Add carry to AH

RET ; Return from subroutine

13
Example:-
hex_to_bcd:
MOV BL, AL ; Move hex number to BL
AND BL, 0FH ; Clear upper nibble
MOV AH, 0 ; Clear AH

cmp BL, 10h ; Check if lower nibble is greater than 9


JBE skip_adjustment ; Jump if lower nibble is less than or equal to 9

sub BL, 10h ; Adjust lower nibble for BCD conversion


ADD AH, 10h ; Add 1 to AH to represent the adjustment

skip_adjustment:
ADD AH, BL ; Add the lower nibble to AH
SHL AH, 4 ; Shift AH left 4 bits to make room for upper nibble

MOV BL, AL ; Move hex number to BL again


SHR BL, 4 ; Shift right 4 bits to get upper nibble
AND BL, 0FH ; Clear lower nibble

cmp BL, 10h ; Check if upper nibble is greater than 9


JBE skip_upper_adjustment ; Jump if upper nibble is less than or equal to 9

sub BL, 10h ; Adjust upper nibble for BCD conversion


ADD AH, 1 ; Add 1 to AH to represent the adjustment

skip_upper_adjustment:
ADD AH, BL ; Add the upper nibble to AH

RET ; Return from subroutine

Skills Developed

 Ability to know about grouped and ungrouped data.


 Develop the collaborative approach.
 Develop the logical thinking.
 Develop the ability to achieve the given target.
 Develop attitude of inquisitiveness.

14
TEACHER EVALUATION SHEET
Name of Student: - Mr. Harshal B. Patil EnrollmentNo.:-2115650096
Name of Program:-Computer Science &Engineering Semester:Fourth
Course Title: - Microprocessor Code: - 22415
Title of the Micro-project: - “Conversion of number system”
Course Outcomes Achieved:-Use instruction for different addressing modes
..……………………………………………………………………………………………………………………

Sr. Characteristic To Poor Average Good Excellent


No. BeAssessed Marks 1- Marks4-5 Marks6- Marks9-10
3 8
1 Relevance to course
2 Literature survey

3 Project proposal
4 Completion of target

Analysis & representation


5
of data

Quality of
6
Prototype/Model

7 Report preparation
8 Presentation

9 Defense

Process Assessment Product Assessment

Part B Project
Part A Project Individual Total Marks 10
Report /
Project Methodology Presentation Viva
Working Model
Proposal
2 4 Marks
2 Marks
2 Marks Marks

Comments / Suggestion about team work / leadership / inter-personal communication (if any )
------------------------------------------------------------------------------------------------------------------------
--
Any other comments:--------------------------------------------------------------------------------------------------------------
---
---------
Signature: - -----------------------
Name and designation of A. R. Warkhede
15
TEACHER EVALUATION SHEET
Name of Student: - Mr. Aniket S. Shekokar EnrollmentNo.:-2115650104
Name of Program :-Computer Science &Engineering Semester:Fourth
Course Title: - Microprocessor Code :- 22415
Title of the Micro-project:- “Conversion of number system”
Course Outcomes Achieved:- Use instruction for different addressing modes
..………………………………………………………………………………………………………………………………
……………………

Sr. Characteristic To Be Poor Average Good Excellent


No. Assessed
Marks 1-3 Marks4-5 Marks6-8 Marks9-10

1 Relevance to course

2 Literature survey

3 Project proposal

4 Completion of target

Analysis & representationof


5
data

Quality of
6
Prototype/Model

7 Report preparation

8 Presentation

9 Defense

Process Assessment Product Assessment

Part B Project
Part A Project Project Individual Presentation Total Marks 10
Report / Working
Proposal Methodology Viva
Model
2 Marks 2 Marks 4 Marks
2 Marks

Comments / Suggestion about team work / leadership / inter-personal communication (if any )
--------------------------------------------------------------------------------------------------------------------------
Any other comments:
--------------------------------------------------------------------------------------------------------------------------
Signature: - -----------------------
Name and designation of A. R. Warkhede

16
TEACHER EVALUATION SHEET
Name of Student: -- Mr. Ajay A. Wagh Enrollment No.:-2115650005
Name of Program :-Computer Science &Engineering Semester:-Fourth

Course Title: - Microprocessor Code :- 22415

Title of the Micro-project:- : - “Conversion of number system”

Course Outcomes Achieved:- Use instruction for different addressing modes


..………………………………………………………………………………………………………………………………
……………………

Sr. Characteristic To Be Poor Average Good Excellent


No. Assessed
Marks 1-3 Marks4-5 Marks6-8 Marks9-10

1 Relevance to course

2 Literature survey

3 Project proposal

4 Completion of target

Analysis &
5
representation of data

Quality of
6
Prototype/Model

7 Report preparation

8 Presentation

9 Defense

Process Assessment Product Assessment

Part B Project
Part A Project Project Individual Total Marks 10
Report / Working
Proposal Methodology Presentation Viva
Model
2 Marks 2 Marks 4 Marks
2 Marks

Comments / Suggestion about team work / leadership / inter-personal communication (if any )
--------------------------------------------------------------------------------------------------------------------------
Any other comments:
-
Signature: - -----------------------
Name and designation of : A. R. Warkhede

17
TEACHER EVALUATION SHEET
Name of Student: - Mr. Saurav S. Fulpagare Enrollment No.:-2115650016
Name of Program:-Computer Science &Engineering Semester:-Fourth

Course Title: - Microprocessor Code: - 22415

Title of the Micro-project:- “Conversion of number system”

Course Outcomes Achieved:- Use instruction for different addressing modes


..………………………………………………………………………………………………………………………………
……………………

Sr. Characteristic To Be Poor Average Good Excellent


No. Assessed
Marks 1-3 Marks4-5 Marks6-8 Marks9-10

1 Relevance to course

2 Literature survey

3 Project proposal

4 Completion of target

Analysis &
5
representation of data

Quality of
6
Prototype/Model

7 Report preparation

8 Presentation

9 Defense

Process Assessment Product Assessment

Part B Project
Part A Project Project Individual Total Marks 10
Report / Working
Proposal Methodology Presentation Viva
Model
2 Marks 2 Marks 4 Marks
2 Marks

Comments / Suggestion about team work / leadership / inter-personal communication (if any )
--------------------------------------------------------------------------------------------------------------------------
Any other comments:
Signature: - -----------------------

Name and designation of: A. R. Warkhede

18

You might also like