Laboratory 1 - Exercises

Solve in your notebooks and explain the following exercises:

1. Convert the following numbers from base 10 to 2 and then to 16:

  • 4
  • 10
  • 15
  • 32

2. Convert the following numbers from base 10 to 16 and then to 2:

  • 3
  • 11
  • 16
  • 17

3. Convert the following numbers from base 2 to 16:

  • 1010
  • 0111
  • 1111
  • 10001010
  • 110101111

4. Convert the following numbers from base 16 to 2:

  • 3
  • A
  • F
  • 2B
  • 2F8

5. Compute the following expressions directly in base 2 (without converting to base 10):

  • 1+1
  • 10+10
  • 111+1
  • 1010-1
  • 1000-10

6. Compute the following expressions directly in base 16 (without converting to base 10):

  • 9+1
  • B+2
  • F+1
  • 10+A
  • 10-2
  • B-3

7. Check, using at least two of the complementary code rules, if:

  • (9A7D)16 and (7583)16 are complementary in a location of 2 bytes
  •   (000F095D)16 and (FFF0F6A3)16 are complementary in a location of 4 bytes
  • (4BA1)16  and (5C93)16 are complementary in a location of 2 bytes
  • (7F)16 and (81)16 are complementary in a location of 1 byte
  • (732A)16  and (4E58)16 are complementary in a location of 2 bytes

8. Write the 8-bits unsigned representation for the following numbers:

  • 8
  • 67
  • 230

9. Write the 16-bits signed representation for the following numbers:

  • -6
  • -121
  • 70