SlideShare a Scribd company logo
1 of 14
PROGRAMMING TECHNIQUES
PROGRAMMING TECHNIQUES
• Looping
• Counting
• Indexing
• The program is an implementation of certain
logic by executing group of instructions.
• To implement program logic, we need to take
help of some common programming
techniques such as looping, counting, and
indexing
PROGRAMMING TECHNIQUES
• Looping:
• This programming technique using
8085 is instructed to execute certain
set of instructions repeatedly to
perform a particular task number of
times.
• For example, to add ten numbers
stored in the consecutive memory
locations we have to perform addition
ten times.
• Counting:
• This technique allows programmer to
count how many times the instruction/set
of instructions are executed.
• Indexing:
• This technique allows programmer to
point or refer the data stored in
sequential memory locations one by one.
PROGRAMMING TECHNIQUES
• Example:
• Illustrate the steps needed to
add 10 bytes of data stored in
memory locations staring at a
given location, and display the
sum.
Procedure: the microprocessor needs:
• A counter to count 10 data bytes
• An index or a memory pointer to locate where
data bytes are stored
• To transfer the data from a memory location
to microprocessor (ALU)
• To perform addition
• Registers for temporary storage of partial
answers
• A flag to indicate the completion of task
• To store or output the result
Looping
• The Programming Techniques using 8085 loop is the basic structure which forces the
processor to repeat a sequence of instructions.
• There are two types of loops:
• Continuous loop-repeat task continuously
• Conditional loop-repeats a task until certain data conditions are met
Continuous loop
• Continuous loop: A Continuous
loop is set up by using the
unconditional Jump JMP
instruction.
Conditional loop
• A Conditional loop is set up by the conditional
jump instructions. These instructions check flags
(zero, sign, and parity etc.) and repeat the
specified task if condition is met.
• Loops have four sections.
• Initialization section.
• Processing section.
• Loop control section
• Result section.
Conditional loop
• 1. The initialization section establishes the starting values of
• loop counters for counting how many times loop is executed,
• address registers for indexing which give pointers to memory locations and
• other variables
• 2. The actual data manipulation occurs in the processing section. This is the section which
does the work.
• 3. The loop control section updates counters, indices (pointers) for the next
• 4. The result section analyzes and stores the results.
Code Conversion:
• This programming technique in 8085 to
translate a number represented using one
coding system to another.
• For example, when we accept any number from
the keyboard it is in ASCII code. But for
processing, we have to convert this number in
its hex equivalent.
• The code conversion involves some basic
conversions such as
• BCD to Binary conversion
• Binary to BCD conversion
• BCD to seven segment code
conversion
• Binary to ASCII conversion and
• ASCII to binary conversion
BCD to Binary Conversion
• BCD to Binary Conversion:
• We are more familiar with the decimal number system. But the microprocessor
understands the binary/hex number system. To convert BCD number into its binary
equivalent we have to use the principle of positional weighting in a given number.
• To perform above operation it is necessary to separate an 8-bit packed BCD number into
two 4-bit unpacked BCD digits: BCD1 and BCD2 and then convert each digit into its binary
value according to its positions. Finally, add both binary numbers to obtain the binary
equivalent of the BCD number.
Binary to BCD Conversion
• Binary to BCD Conversion:
• We know that microprocessor processes data in the binary form. But when it is displayed, it
is in the BCD form. In this case we need binary to BCD conversion of data. The conversion
of binary to BCD is performed by dividing the number by the power of ten.
BCD to Seven Segment Conversion:
• BCD to Seven Segment Conversion:
• Many times 7-segment LED display is used to display the results or parameters in the
microprocessor system.
• In such cases we have to convert the result or parameter in 7-segment code.
• This conversion can be done using look-up technique.
• In the look-up table the codes of the digits (0-9) to be displayed are stored sequentially in
the memory. The conversion program locates the code of a digit based on its BCD digit. Let
us see the Programming Techniques using 8085 for BCD to common cathode 7-segment
code conversion.
Binary to ASCII Code Conversion:
• Binary to ASCII Code Conversion:
• The ASCII Code (American Standard Code for Information Interchange) is commonly used
for communication.
• In such cases we need to convert binary number to its ASCII equivalent.
• It is a seven bit code. In this code number 0 through 9 are represented as 30 through 39
respectively and letters A through Z are represented as 41H through 5AH. Therefore, by
adding 30H we can convert number into its ASCII equivalent and by adding 37H we can
convert letter to its ASCII equivalent.
ASCII Code to Binary Conversion:
• ASCII Code to Binary Conversion:
• It is exactly reverse process to binary to ASCII conversion.
• Here, if ASCII code is less than 3AH then 30H is subtracted to get the
binary equivalent and if it is in between 41H and 5AH then 37H is
subtracted to get the binary equivalent of letter (A-F).

More Related Content

Similar to Programming Techniques.pptx

CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)guptakrishns23
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptxHebaEng
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxAKumaraGuru
 
Assembly Language Paper.docx
Assembly Language Paper.docxAssembly Language Paper.docx
Assembly Language Paper.docxwrite22
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptxSachinKupade
 
Making Of 0-9 Decade Counter with 7 segment display
Making Of 0-9 Decade Counter with 7 segment displayMaking Of 0-9 Decade Counter with 7 segment display
Making Of 0-9 Decade Counter with 7 segment displayOmkar Rane
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...Rai University
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Rai University
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...Rai University
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1Dilawar Khan
 
Introduction to 8086 microprocessor
Introduction to 8086 microprocessorIntroduction to 8086 microprocessor
Introduction to 8086 microprocessorShreyans Pathak
 

Similar to Programming Techniques.pptx (20)

Mod.2.pptx
Mod.2.pptxMod.2.pptx
Mod.2.pptx
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
 
Unit 3 The processor
Unit 3 The processorUnit 3 The processor
Unit 3 The processor
 
instruction format.pptx
instruction format.pptxinstruction format.pptx
instruction format.pptx
 
6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx6_2018_11_23!09_24_56_PM (1).pptx
6_2018_11_23!09_24_56_PM (1).pptx
 
LU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptxLU3- 4 Instructions and Sequencing.pptx
LU3- 4 Instructions and Sequencing.pptx
 
8051d
8051d8051d
8051d
 
Assembly Language Paper.docx
Assembly Language Paper.docxAssembly Language Paper.docx
Assembly Language Paper.docx
 
module-3.pptx
module-3.pptxmodule-3.pptx
module-3.pptx
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptx
 
decade counter
decade counterdecade counter
decade counter
 
Dsa 170930180124
Dsa 170930180124Dsa 170930180124
Dsa 170930180124
 
Making Of 0-9 Decade Counter with 7 segment display
Making Of 0-9 Decade Counter with 7 segment displayMaking Of 0-9 Decade Counter with 7 segment display
Making Of 0-9 Decade Counter with 7 segment display
 
MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...MCA-I-COA- overview of register transfer, micro operations and basic computer...
MCA-I-COA- overview of register transfer, micro operations and basic computer...
 
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.2-overview of register transfer, micro operations and basic c...
 
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
B.sc cs-ii-u-2.2-overview of register transfer, micro operations and basic co...
 
EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1
 
Embedded _c_
Embedded  _c_Embedded  _c_
Embedded _c_
 
Introduction to 8086 microprocessor
Introduction to 8086 microprocessorIntroduction to 8086 microprocessor
Introduction to 8086 microprocessor
 

Recently uploaded

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

Programming Techniques.pptx

  • 2. PROGRAMMING TECHNIQUES • Looping • Counting • Indexing • The program is an implementation of certain logic by executing group of instructions. • To implement program logic, we need to take help of some common programming techniques such as looping, counting, and indexing
  • 3. PROGRAMMING TECHNIQUES • Looping: • This programming technique using 8085 is instructed to execute certain set of instructions repeatedly to perform a particular task number of times. • For example, to add ten numbers stored in the consecutive memory locations we have to perform addition ten times. • Counting: • This technique allows programmer to count how many times the instruction/set of instructions are executed. • Indexing: • This technique allows programmer to point or refer the data stored in sequential memory locations one by one.
  • 4. PROGRAMMING TECHNIQUES • Example: • Illustrate the steps needed to add 10 bytes of data stored in memory locations staring at a given location, and display the sum. Procedure: the microprocessor needs: • A counter to count 10 data bytes • An index or a memory pointer to locate where data bytes are stored • To transfer the data from a memory location to microprocessor (ALU) • To perform addition • Registers for temporary storage of partial answers • A flag to indicate the completion of task • To store or output the result
  • 5. Looping • The Programming Techniques using 8085 loop is the basic structure which forces the processor to repeat a sequence of instructions. • There are two types of loops: • Continuous loop-repeat task continuously • Conditional loop-repeats a task until certain data conditions are met
  • 6. Continuous loop • Continuous loop: A Continuous loop is set up by using the unconditional Jump JMP instruction.
  • 7. Conditional loop • A Conditional loop is set up by the conditional jump instructions. These instructions check flags (zero, sign, and parity etc.) and repeat the specified task if condition is met. • Loops have four sections. • Initialization section. • Processing section. • Loop control section • Result section.
  • 8. Conditional loop • 1. The initialization section establishes the starting values of • loop counters for counting how many times loop is executed, • address registers for indexing which give pointers to memory locations and • other variables • 2. The actual data manipulation occurs in the processing section. This is the section which does the work. • 3. The loop control section updates counters, indices (pointers) for the next • 4. The result section analyzes and stores the results.
  • 9. Code Conversion: • This programming technique in 8085 to translate a number represented using one coding system to another. • For example, when we accept any number from the keyboard it is in ASCII code. But for processing, we have to convert this number in its hex equivalent. • The code conversion involves some basic conversions such as • BCD to Binary conversion • Binary to BCD conversion • BCD to seven segment code conversion • Binary to ASCII conversion and • ASCII to binary conversion
  • 10. BCD to Binary Conversion • BCD to Binary Conversion: • We are more familiar with the decimal number system. But the microprocessor understands the binary/hex number system. To convert BCD number into its binary equivalent we have to use the principle of positional weighting in a given number. • To perform above operation it is necessary to separate an 8-bit packed BCD number into two 4-bit unpacked BCD digits: BCD1 and BCD2 and then convert each digit into its binary value according to its positions. Finally, add both binary numbers to obtain the binary equivalent of the BCD number.
  • 11. Binary to BCD Conversion • Binary to BCD Conversion: • We know that microprocessor processes data in the binary form. But when it is displayed, it is in the BCD form. In this case we need binary to BCD conversion of data. The conversion of binary to BCD is performed by dividing the number by the power of ten.
  • 12. BCD to Seven Segment Conversion: • BCD to Seven Segment Conversion: • Many times 7-segment LED display is used to display the results or parameters in the microprocessor system. • In such cases we have to convert the result or parameter in 7-segment code. • This conversion can be done using look-up technique. • In the look-up table the codes of the digits (0-9) to be displayed are stored sequentially in the memory. The conversion program locates the code of a digit based on its BCD digit. Let us see the Programming Techniques using 8085 for BCD to common cathode 7-segment code conversion.
  • 13. Binary to ASCII Code Conversion: • Binary to ASCII Code Conversion: • The ASCII Code (American Standard Code for Information Interchange) is commonly used for communication. • In such cases we need to convert binary number to its ASCII equivalent. • It is a seven bit code. In this code number 0 through 9 are represented as 30 through 39 respectively and letters A through Z are represented as 41H through 5AH. Therefore, by adding 30H we can convert number into its ASCII equivalent and by adding 37H we can convert letter to its ASCII equivalent.
  • 14. ASCII Code to Binary Conversion: • ASCII Code to Binary Conversion: • It is exactly reverse process to binary to ASCII conversion. • Here, if ASCII code is less than 3AH then 30H is subtracted to get the binary equivalent and if it is in between 41H and 5AH then 37H is subtracted to get the binary equivalent of letter (A-F).