Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose register dx is storing the following data: And the data segment has a variable named MONTH: .data MONTH BYTE ? And the goal of

Suppose register dx is storing the following data:

image text in transcribed

And the data segment has a variable named MONTH:

.data

MONTH BYTE ?

And the goal of the program is to move only the four bits for the month into the MONTH variable. Which of the options below is correct?

NOTE: The four bits for the month in dx are always storing a value between 1 - 12 (this is why exactly four bits are needed). When the four bits are moved to the MONTH variable, the value should ultimately be the same (i.e. if the four bits for the month in dx represent the number 12, then the number 12 should also be stored in the MONTH variable).

A.mov ax, dx

shr ax, 5

and al, 00001111b

mov MONTH, al

B.mov ax, dx

shl ax, 7

and ah, 11110000b

mov MONTH, ah

C.mov ax, dx

shl ax, 7

or ah, 11110000b

mov MONTH, ah

D.mov ax, dx

shr ax, 5

or al, 00001111b

mov MONTH, al

DH DL Field: Year Bit numbers: 9-15 Month 5-8 Day 0-4

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions