Microprocessor Microproject
Microprocessor Microproject
(Polytechnic)
Micro Project
On
Submitted to
Subject Incharge:- Mr Gaurav Thakur HOD:- Mrs Rohini Thombre Collage Incharge:- Mr
Daune
1
Submitted by
2
INDEX
Title Page No
Abstract 4
Introduction 5
Objective 7
Implementation 10
Design 13
Conclusion 25
References 26
3
Abstract
• Input: 11F.
• Explanation: Binary of 1 – 0001. Binary of F – 1111. Thus, Equivalent BCD is 0001 0001 1111.
• Input: A D.
• Explanation: Binary of A – 1010. Binary of D – 1101. Thus, Equivalent BCD is 1010 1101.
Introduction
4
add 100 decimal to BX to obtain BCD equivalent. Then we compare
number obtained in AX with 10 decimal. Each time we subtract 10
decimal from AX and we add 10 decimal to BX. Finally we add the
result in BX with remainder in AX. The final result is present in
Objective
To convert from HEX to BCD, you have to first convert the HEX to Decimal, then convert the Decimal
digits to BCD digits, by converting each Decimal digit to 4 binary digits.
Decimal 01715004 = BCD 0000 0001 0111 0001 0101 0000 0000 0100.
So Hex 1A2B3C = 0000 0001 0111 0001 0101 0000 0000 0100 BCD.
5
Implementation
• Hexadecimal
• The following is a JavaScript implementation of the above algorithm
for converting any number to a hexadecimal in String representation. Its purpose is
• Character encoding
vendors of the era had their own character codes, often 6 bit, but usually had the ability to read tapes
produced on IBM equipment. BCD was the precursor
• Byte (redirect from The Evolution of the Byte)
conveniently represented by a single hexadecimal digit. The term octet is used to unambiguously
specify a size of eight bits. It is used extensively in
6
7
8
Design
9
Conclusion
Adjusts it to BCD code. Since the entire calculation is implemented in successive shifts,
ABCDE is obtained after shifting one bit (E is from low displacement and its value is
either 0 or 1). At this time, it should be judged whether the value is greater than or equal
to 10. If so, the value is increased by 6 to adjust it to within 10, and the carry is shifted to
the upper 4-bit BCD code. Here, the pre-movement adjustment is used to first
determine whether ABCD is greater than or equal to 5 (half of 10), and if it is greater
than 5, add 3 (half of 6) and then shift
References
Microcontroller firmware with hexadecimal code. You sometimes need to display the content
of registers, which requires a hexadecimal-to-BCD (binary-coded-decimal)-code conversion.
The for this conversion is an add-three algorithm. Fortunately, you can adapt this technique
for use with an8-bit microcontroller assembler. You can, however, easily adapt this any
assemblers because the approach uses a set of standard instructions.
10