Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 - 2 : Suppose that each of num 1 , num 2 , and num 3 references a byte in memory and that an

1-2: Suppose that each of num1, num2, and num3 references a byte in memory and that an unsigned number is stored in each byte. Assume that the first number is no larger than 7(three significant bits), the second number is no larger than 63(six significant bits), and the third number is no larger than 127(seven significant bits).1. Suppose we pack all three of these numbers into a 16-bit word in the AX register, copying the low order three bits from num1 to bits 13-15 of AX, the low order six bits from num2 to bits 7-12 of AX, and the low order seven bits from num3 to bits 0-6 of AX. If numbers 5,57, and 111 are at num1, num2, and num3, respectively, what will be in AX after packing ?______________(hex) Show work.2. Give an 80x86 code fragment that packs all three of these numbers into a 16-bit word in the AX register as described above. Hint: Use logical and shift instructions. Be sure to include appropriate comments. 2. Give an 80x86 code fragment that unpacks the 16 bit number in the AX register into three-bit, six-bit, and seven-bit numbers, padding each value with zeros on the left to make eight bits, and storing the resulting bytes at num4, num5, and num6, respectively. The value stored in AX must NOT be altered after unpacking. Do NOT use other registers or memory labels. Be sure to include appropriate comments.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Have ground rules been established for the team?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago