Question

# Register Value \$9 0xA136 \$10 0x1234A136 \$11 0x5555 \$12 0x70000974 \$13 7 (decmial) \$14 0x9AB Give...

 Register Value \$9 0xA136 \$10 0x1234A136 \$11 0x5555 \$12 0x70000974 \$13 7 (decmial) \$14 0x9AB

Give the result of the following instruction. Assume the initial values for the register above. Give the answer in hexadecimal using the 0x notation.

`or \$9, \$10, \$11`

\$9 =

The Given Instruction is

`or \$9, \$10, \$11`

This means perform OR operation bit by bit between registers \$10 and \$11 and store the result in \$9

We Know How OR operation behaves .

OR operation between two bits is 1 when at-least one bit is 1 otherwise output is 0

So To do OR bit by bit first lets write hexadecimal values into binary

We have \$10=  0x1234A136 = 10010001101001010000100110110

And \$11= 0x5555 = 101010101010101

Now Do OR Between Them Bit by Bits . To match length of both extend value of \$11 by adding 0's on left of MSB .

Result is : 10010001101001111010101110111

Now Represent in Hex we get = 0x 1234F577

Hence Value Store in \$9 = 0x 1234F577

This is how we can do OR operation between two hex numbers

Thank You

If u like the answer do Upvote it and have any doubt ask in comments

#### Earn Coins

Coins can be redeemed for fabulous gifts.