Skip to content

Task Two

1. Convert the following decimal numbers to binary and then to hexadecimal:

a. 157

  • Decimal to Binary: Divide by 2 and track remainders:

    • 157÷2=78 remainder 1
    • 78÷2=39 remainder 0
    • 39÷2=19 remainder 1
    • 19÷2=9 remainder 1
    • 9÷2=4 remainder 1
    • 4÷2=2 remainder 0
    • 2÷2=1 remainder 0
    • 1÷2=0 remainder 1

    So, 157 in binary is 10011101.

  • Binary to Hexadecimal: Group binary digits in sets of 4 (from right):

    • 1001 1101 = 9D in hexadecimal.

b. 365

  • Decimal to Binary:

    • 365÷2=182 remainder 1
    • 182÷2=91 remainder 0
    • 91÷2=45 remainder 1
    • 45÷2=22 remainder 1
    • 22÷2=11 remainder 0
    • 11÷2=5 remainder 1
    • 5÷2=2 remainder 1
    • 2÷2=1 remainder 0
    • 1÷2=0 remainder 1

    So, 365 in binary is 101101101.

  • Binary to Hexadecimal:

    • Pad binary: 0001 0110 1101 = 16D in hexadecimal.

c. 1023

  • Decimal to Binary: 1023 in binary is 1111111111.
  • Binary to Hexadecimal: Group binary digits in sets of 4: 11 1111 1111 = 3FF in hexadecimal.

2. Convert the following hexadecimal numbers to binary and then to decimal:

a. 3F

  • Hexadecimal to Binary: 3F = 0011 1111
  • Binary to Decimal: 3F is 3×16+15=63 in decimal.

b. C7A

  • Hexadecimal to Binary: C7A = 1100 0111 1010
  • Binary to Decimal: C7A is 12×256+7×16+10=3194 in decimal.

c. 4B2

  • Hexadecimal to Binary: 4B2 = 0100 1011 0010
  • Binary to Decimal: 4B2 is 4×256+11×16+2=1202 in decimal.

3. Convert the following octal numbers to binary and then to decimal:

a. 127

  • Octal to Binary: 127 = 001 010 111
  • Binary to Decimal: 001010111 = 87 in decimal.

b. 345

  • Octal to Binary: 345 = 011 100 101
  • Binary to Decimal: 011100101 = 229 in decimal.

4. Given the binary number 11100110, convert it to octal and then to hexadecimal.

  • Binary to Octal: Group in sets of 3: 111 001 110 = 716 in octal.
  • Binary to Hexadecimal: Group in sets of 4: 1110 0110 = E6 in hexadecimal.

5. Convert the following decimal numbers to octal, then to binary, and finally to hexadecimal:

a. 145

  • Decimal to Octal: 145 in octal is 221.
  • Octal to Binary: 221 in binary is 010 010 001.
  • Binary to Hexadecimal: 01001001 = 91 in hexadecimal.

b. 511

  • Decimal to Octal: 511 in octal is 777.
  • Octal to Binary: 777 in binary is 111 111 111.
  • Binary to Hexadecimal: 11111111 = FF in hexadecimal.

6. Convert the binary number 101101001 to octal and then to decimal.

  • Binary to Octal: Group in sets of 3: 101 101 001 = 551 in octal.
  • Binary to Decimal: 101101001 is 361 in decimal.

7. Show the steps for converting the decimal number 250 to binary and then to hexadecimal.

  • Decimal to Binary: 250 in binary is 11111010.
  • Binary to Hexadecimal: 1111 1010 = FA in hexadecimal.

8. If you have the binary number 11101100, explain how you would convert it to octal and then to decimal.

  • Binary to Octal: Group in sets of 3: 111 011 100 = 734 in octal.
  • Binary to Decimal: 11101100 is 236 in decimal.

9. Explain the steps to convert the octal number 63 to hexadecimal.

  • Octal to Binary: 63 in binary is 110 011.
  • Binary to Hexadecimal: Group in sets of 4: 1100 11 = 33 in hexadecimal.

10. If you have the octal number 375, first convert it to decimal and then to hexadecimal.

  • Octal to Decimal: 375 in decimal is 3×64+7×8+5=253.
  • Decimal to Hexadecimal: 253 in hexadecimal is FD.

11. Convert the octal number 1000 to hexadecimal and explain your process.

  • Octal to Binary: 1000 in binary is 001 000 000 000.
  • Binary to Hexadecimal: 0010 0000 0000 = 200 in hexadecimal.