Part A, convert 157 (decimal) to binary.
| Division | Quotient | Remainder |
|---|
| 157 ÷ 2 | 78 | 1 |
| 78 ÷ 2 | 39 | 0 |
| 39 ÷ 2 | 19 | 1 |
| 19 ÷ 2 | 9 | 1 |
| 9 ÷ 2 | 4 | 1 |
| 4 ÷ 2 | 2 | 0 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Reading the remainders from bottom to top gives 10011101. Grouping in threes from the right (10 011 101) gives octal 235; grouping in fours (1001 1101) gives hexadecimal 9D.
Part B, add 101101 and 11011. In decimal these are 45 and 27. Adding column by column with carries gives 1001000, which is 72 in decimal, and 45 + 27 = 72 confirms it.
Part C, subtract 27 from 45 by 2's complement. Write both in 6 bits: 45 is 101101 and 27 is 011011. The 2's complement of 011011 is 100100 + 1 = 100101. Then 101101 + 100101 = 1010010. Drop the carry out of the sixth bit to get 010010, which is 18, and 45 − 27 = 18 confirms it.
Part D, multiply 1101 by 1011. That is 13 × 11. Shifted partial products added together give 10001111, which is 143, and 13 × 11 = 143.
Always show the decimal check at the end. It costs one line and catches most slips.