Calculate X and store the final result at memory location 0090:0020.

QUESTION

Calculate X and store the final result at memory location 0090:0020.

X = (2C – 3B) * 49 / 2C

 

SUMMARY

In the above expression, it is seen that all the constants are in hexadecimal numbers. 

First, they are converted into decimal numbers and then the expression can be solved.

The value of ‘X’ = 24.886 (in decimal notation).

 

EXPLANATION

Since all the constants are represented in hexa-decimal notation,

We first represent them in decimal notation:

2C in decimal

C*(16^0) + 2*(16^1) = 12 + 32 = 44

3B in decimal

B*(16^0) + 3*(16^1) = 11 + 48 = 59

49 in decimal

9*(16^0) + 4*(16^1) = 9 + 64 = 73

2C in decimal

C*(16^0) + 2*(16^1) = 12 + 32 = 44

therefore,

X = (2C – 3B) * 49 / 2C

   = (44 – 59) * 73 / 44 

   = (-15*73) / 44

   = -1095/44

   = 24.886

Hence the final value of X in decimal is 24.886

The value of ‘X’ will be stored in the given memory location 0090:0020.

 

 

Also, read normalize up to and including BCNF

 

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *