Question

Note: To convert from ASCII to unpacked BCD you have to follow the following steps: 1- Load the ASCII code of Decimal digit in AL or AH or BL or BH or CL or CH or DL or DH register 2- AND the contents of Register with OFH, after this step you will have the unpacked BCD digit in one byte 3- Store the contents of register into unpacked array BCD 4- Repeat from step 1 until all ASCII codes have been converted Note: To convert from ASCII to packed BCD you have to follow the following steps: 1- Load the ASCII code of Decimal digit and the adjacent in AX or BX or CX or DX 2- AND the contents of the Register with OFOFH, after this step you will have two unpacked BCD digit each is in 8-bit register. 3- 4- Shift left the contents of high half of register 4-bit positions like this: MOV CL,4 SHL register name,CL Convert the contents of two halves of register into packed BCD By using OR instruction OR low half of register, high half of register In the result you have packed BCD 5- Store the contents of register into packed array 6- Repeat from step 1 until all ASCII codes have been converted

          Note: To convert from ASCII to unpacked BCD you have to follow the
following steps:
1- Load the ASCII code of Decimal digit in AL or AH or BL or BH or CL or
CH or DL or DH register
2- AND the contents of Register with OFH, after this step you will have
the unpacked BCD digit in one byte
3- Store the contents of register into unpacked array BCD
4- Repeat from step 1 until all ASCII codes have been converted
Note: To convert from ASCII to packed BCD you have to follow the following
steps:
1-
Load the ASCII code of Decimal digit and the adjacent in AX or BX
or CX or DX
2-
AND the contents of the Register with OFOFH, after this step you
will have two unpacked BCD digit each is in 8-bit register.
3-
4-
Shift left the contents of high half of register 4-bit positions like
this:
MOV CL,4
SHL register name,CL
Convert the contents of two halves of register into packed BCD
By using OR instruction
OR low half of register, high half of register
In the result you have packed BCD
5-
Store the contents of register into packed array
6- Repeat from step 1 until all ASCII codes have been converted
        
Show more…
Note: To convert from ASCII to unpacked BCD you have to follow the
following steps:
1- Load the ASCII code of Decimal digit in AL or AH or BL or BH or CL or
CH or DL or DH register
2- AND the contents of Register with OFH, after this step you will have
the unpacked BCD digit in one byte
3- Store the contents of register into unpacked array BCD
4- Repeat from step 1 until all ASCII codes have been converted
Note: To convert from ASCII to packed BCD you have to follow the following
steps:
1-
Load the ASCII code of Decimal digit and the adjacent in AX or BX
or CX or DX
2-
AND the contents of the Register with OFOFH, after this step you
will have two unpacked BCD digit each is in 8-bit register.
3-
4-
Shift left the contents of high half of register 4-bit positions like
this:
MOV CL,4
SHL register name,CL
Convert the contents of two halves of register into packed BCD
By using OR instruction
OR low half of register, high half of register
In the result you have packed BCD
5-
Store the contents of register into packed array
6- Repeat from step 1 until all ASCII codes have been converted

Added by Summer M.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
To convert from ASCII to unpacked BCD, you have to follow the following steps: 1- Load the ASCII code of the decimal digit in AL, AH, BL, BH, CL, CH, DL, or DH register. 2- AND the contents of the register with 0FH. After this step, you will have the unpacked BCD digit in one byte. 3- Store the contents of the register into the unpacked BCD array. 4- Repeat from step 1 until all ASCII codes have been converted. To convert from ASCII to packed BCD, you have to follow the following steps: 1- Load the ASCII code of the decimal digit and the adjacent digit in AX, BX, CX, or DX. 2- AND the contents of the register with 0F0FH. After this step, you will have two unpacked BCD digits, each in an 8-bit register. 3- Shift left the contents of the high half of the register 4-bit positions like this: MOV CL, 4 SHL register name, CL. 4- Convert the contents of the two halves of the register into packed BCD by using the OR instruction: OR low half of register, high half of register. In the result, you will have packed BCD. 5- Store the contents of the register into the packed BCD array. 6- Repeat from step 1 until all ASCII codes have been converted.
Close icon
Play audio
Feedback
Powered by NumerAI
Jennifer Stoner David Collins
Danielle Fairburn verified

Adi S and 99 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
1-convert-decimal-6514-to-both-bcd-and-ascii-codes-for-ascii-an-even-parity-bit-is-to-be-appended-at-the-left-10-point-2decode-the-following-ascil-code-1010011-1110100-1100101-1110110-110010-05406

Adi S.

design-bcd-to-ascii-and-ascii-to-bcd-converters-using-8085-microprocessor-based-assembly-language-show-design-steps-using-a-flowchart-02748

Design BCD to ASCII and ASCII to BCD converters using 8085 microprocessor based assembly language. Show design steps using a flowchart

Sri K.

assembly-programming-in-mips-write-a-program-in-mips-assembler-that-performs-the-following-computations-prompts-the-user-to-enter-two-integers-and-stores-the-smaller-one-in-the-first-data-me-85278

Title: Assembly Programming in MIPS Write a program in MIPS assembler that performs the following computations: Prompt the user to enter two integers and store the smaller one in the first data memory word (with the lowest address) and the larger one in the second data memory word. Then divide the larger word by the smaller one in integer and store the integer quotient in the third data memory word and the remainder in the fourth data memory word. Finally, print the four data memory words on separate lines, each starting with a label (first integer, second integer, quotient, remainder). Requirements and restrictions: - Use integer arithmetic only. - Include at least one instruction from each instruction type: R-type arithmetic, I-type arithmetic, Memory transfer (lw, sw), and Branch (beq, bne). - Use input and output through system calls, including print string for prompting the user and printing labels. - Do NOT use pseudo-instructions or non-machine level instructions. The program must load and run with "Allow pseudo instructions" unchecked (in Simulator/Settings). - For each instruction, include a comment in the source file indicating its type, format, and meaning in the program. - Use the SPIM simulator to run the program.

Akash M.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,355 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,697 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,719 solutions

*

Transcript

-
00:01 From the question we can write the remainders at each step will give us the bcd representation...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever