Cmpe 150 Fortran HW 1 by hcw25539

VIEWS: 8 PAGES: 4

									                                                                               1/4



Cmpe 150 Fortran HW 1
Name:     ______________
Lastname: ______________

1.    Convert 1234.5678
      a. to binary
      b. then from binary to hexadecimal
      c. then from hexadecimal back to decimal.
      Show your calculations.



1. a. convert 1234.5678 to binary.

      1234 2                         1234 = ( __ __ __ __ __ __ __ __ __ __ __ )2
                     2




      0.5678
           2
                                     0.5678 = (0. __ __ __ __ __ __ __ __ )2
Name Lastname: _______________________                                               2/4



       1234.5678 = ( __ __ __ __ __ __ __ __ __ __ __ . __ __ __ __ __ __ __ __ )2

    1. b. Convert this number from binary to hexadecimal.

        ( __ __ __ __ __ __ __ __ __ __ __ . __ __ __ __ __ __ __ __ )2


                              (__ __ __ . __ __ )16

    1. c. Convert this number from hexadecimal to decimal.




                                                         (__ __ __ __ . __ __ __ __ )10
                                                                                  3/4
Name Lastname: _______________________

    2.    Convert 43.21
          a. to hexadecimal
          b. then from hexadecimal to binary
          c. then from binary back to decimal.
          Show your calculations.



    2. a. convert 43.21 to hexadecimal.




                                                 43.21 = ( __ __ . __ __ __ )16
Name Lastname: _______________________                                              4/4




    2. b. Convert this number from hexadecimal to binary.

                              ( __ __ . __ __ __ )16


        ( __ __ __ __ __ __ __ __ __ . __ __ __ __ __ __ __ __ __ __ __ __ ) 2


    2. c. Convert this number from binary to decimal.




                                                         (__ __ __ __ . __ __ __ __ )10

								
To top