Original number = 1010

Odd parity

For 4-bit, 3 parity bits $p_1, p_2, p_3$ are appended in locations 1,2,4 respectively.

Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|

- | P1 | P2 | D1 | P3 | D2 | D3 | D4 |

original number | - | - | 1 | - | 0 | 1 | 0 |

odd parity in positions 1.3.5.7 requires P1 = 0 | 0 | - | 1 | - | 0 | 1 | 0 |

odd parity in positions 2,3,6,7 requires P2 = 1 | 0 | 1 | 1 | - | 0 | 1 | 0 |

odd parity in positions 4,5,6,7 requires P3 = 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |

$\therefore$ Hamming code for 1010 with odd parity os 0110010

$(-89)_{10}$

**Binary :**

$\therefore$ $(89)_{10}$

$= (01011001)_2$

**1. signed magnitude**

since, the number is negative, sign bit = 1

magnitude = 01011001

$\therefore$ $(-89)_{10} = (101011001)_2$

**2. 1's complement,**

$(-89)_{10} = (10100110)_2$

1's complement of $(-89)_{10}$ = 10100110

**3. 2's complement,**

2's complement = 1's complement + 1

$\therefore$ 2's complement of $(-89)_{10} = 10100111$

**$(BC5)_H - (A2B)_H$**

15's complement of A2B,

$\therefore$ 16's complement of A2B = 5D4 + 1 = 5D5

since, carry is generated answer is positive, and discard carry to get final answer.