me
Superdanby

Logic Operations

  • Example: 23, 11

Shift Operations

  • Example: 15, -15

Questions

  1. Let X and Y be 39 and 127 respectively. Both are 8-bit unsigned numbers.
    1. Apply 1-bit logical/arithmetic left/right shift on X and Y. Show the process in binary format.
    2. Apply NOT, AND, NAND, OR, NOR, XOR, and XNOR on X and Y. Show the process in binary format.
  2. Show the results of problem 1. Conditions are the same, except that both numbers are now signed.

Arithmetic Operations

  • Integer: 2’s complement
  • Float: Sign and magnitude
  • 1’s complement

Questions

  1. Show the following processes in binary format:
    1. 8-bit integer:
      • 102 + 23
      • -23 + 3
      • -163 - 134
    2. IEEE 754:
      • 34.75 + 23.125
      • -34.75 + 23.125
      • 34.75 - 23.125
      • -34.75 - 23.125