edited by
6,989 views

4 Answers

Best answer
12 votes
12 votes
0x14=14

0x08=8

15 + 8 = 22. In BCD representation 4 bits represent a decimal digit from 0-9. So, here forst 4 bits represent 2, and next four bots represent 2 again.

0010 0010 = 0x22

Option A.
selected by
15 votes
15 votes

as far I know we need to add a correction of 6 whenever the sum in BCD addition is greater than 9.

0x14  -->      0001   0100

0x08   -->     0000   1000 

---------------------------------

                                 1100   (sum of last 4 bits)

                                  0110    (add correction 6)

------------------------------------------

                    0010     0010      --------------> 0x22

--------------------------------------------------

     

6 votes
6 votes

0means the numbers are given in hexadecimal format.

Now 0x14 means it's simple 14 and not E iin hexadecimal.

so writing BCD of 14 = 0001 0100

BCD of 8 =                 0000 1000

Adding above two gives 0001 1100

Now since there is an overflow in the LSB (8+4) part of the numbers, add 0110( decimal equivalent 6) to this as per bcd rules of addition.

0001 1100

0000 0110

Adding gives 0010 0010

which is 22 in BCD.

and so in hexadecimal each digit of BCD can be represented directly.

so Answer 0x22 Option (A)

0 votes
0 votes

0x14 = 0001 0100 (These numbers are not simple binary, but BCD, ie, they represent decimal values) = 14

0x08 = 0000 1000 = 08.

Add 14 and 8 = 22. 22 in BCD is 0010 0010 (each digit is encoded to equivalent binary)

0010 0010 = 0x22

 

Option A

Answer:

Related questions

5 votes
5 votes
2 answers
1
makhdoom ghaya asked May 13, 2016
2,904 views
The binary equivalent of the decimal number $42.75$ is$101010 . 110$$100110 . 101$$101010 . 101$$100110 . 110$
7 votes
7 votes
6 answers
2
makhdoom ghaya asked Apr 26, 2016
6,970 views
Two eight bit bytes $1100 0011$ and $0100 1100$ are added. What are the values of the overflow, carry and zero flags respectively, if the arithmetic unit of the CPU use...
5 votes
5 votes
1 answer
3
makhdoom ghaya asked Apr 26, 2016
5,311 views
The number $1102$ in base $3$ is equivalent to $123$ in which base system?$4$$5$$6$$8$
5 votes
5 votes
3 answers
4
makhdoom ghaya asked Apr 25, 2016
7,406 views
Which logic gate is used to detect overflow in 2's compliment arithmetic?OR gateAND gateNAND gateXOR gate