d

  • Convert 0.1015625 to IEEE 32-bit floating point format.
    1. Converting:
      0.1015625× 2 =0.2031250Generate 0 and continue.
      0.203125× 2 =0.406250Generate 0 and continue.
      0.40625× 2 =0.81250Generate 0 and continue.
      0.8125× 2 =1.6251Generate 1 and continue with the rest.
      0.625× 2 =1.251Generate 1 and continue with the rest.
      0.25× 2 =0.50Generate 0 and continue.
      0.5× 2 =1.01Generate 1 and nothing remains.
      So 0.101562510 = 0.00011012.
    2. Normalize: 0.00011012 = 1.1012 × 2-4.
    3. Mantissa is 10100000000000000000000, exponent is -4 + 127 = 123 = 011110112, sign bit is 0.
    So 0.1015625 is 00111101110100000000000000000000 = 3dd0000016
  • Convert 39887.5625 to IEEE 32-bit floating point format.
    1. The integral part is 3988710 = 10011011110011112. The fractional:
      0.5625× 2 =1.1251Generate 1 and continue with the rest.
      0.125× 2 =0.250Generate 0 and continue.
      0.25× 2 =0.50Generate 0 and continue.
      0.5× 2 =1.01Generate 1 and nothing remains.
      So 39887.562510 = 1001101111001111.10012.
    2. Normalize: 1001101111001111.10012 = 1.00110111100111110012 × 215.
    3. Mantissa is 00110111100111110010000, exponent is 15 + 127 = 142 = 100011102, sign bit is 0.
    So 39887.5625 is 01000111000110111100111110010000 = 471bcf9016
  • Convert the 32-bit floating point number a3358000 (in hex) to decimal.
    1. Convert and separate: a335800016 = 10100011001101011000000000000000 2
    2. Exponent: 010001102 = 7010; 70 − 127 = -57.
    3. Since the exponent is far from zero, convert the original (normalized) mantissa:
      Exponents202-12-22-32-42-52-62-72-8
      Place Values10.50.250.1250.06250.031250.0156250.00781250.00390625
      Bits1.01101011
      Value1+0.25+0.125+0.03125+0.0078125+0.00390625=1.41796875
    4. Use calculator to find 1.41796875 × 2-57. You should get something like 9.83913471531 × 10-18 .
    5. Sign: negative
    Result: a3358000 is about -9.83913471531 × 10-18 .
  • Convert the 32-bit floating point number 76650000 (in hex) to decimal.
    1. Convert and separate: 7665000016 = 01110110011001010000000000000000 2
    2. Exponent: 111011002 = 23610; 236 − 127 = 109.
    3. Since the exponent is far from zero, convert the original (normalized) mantissa:
      Exponents202-12-22-32-42-52-62-7
      Place Values10.50.250.1250.06250.031250.0156250.0078125
      Bits1.1100101
      Value1+0.5+0.25+0.03125+0.0078125=1.7890625
    4. Use calculator to find 1.7890625 × 2109. You should get something like 1.16116794981 × 1033 .
    5. Sign: positive
    Result: 76650000 is about 1.16116794981 × 1033 .

Show the decimal integer 1 in 7-bit sign magnitude, one’s complement, two’s complement and excess-63 respectively in the given order, separated by comma.

The integer will be positive because the binary number starts with a 0

Sign magnitude: 0000001 = 2^(0) = 1

One’s and Two’s Complement is the same as sign magnitude

Excess-Notation= sign magnitude + excess number = X

Convert X to binary

= 1 + 63 = 64

= 64/2 = 32r0  32/2 = 16r0  16/2 = 8r0  8/2 = 4r0  4/2 = 2r0

2/2 = 1r0  1/2 = 0r1

= 1000000

Answer:0000001,0000001,0000001,1000000

Given a 9-bit binary sequence 011000101, show the decimal integer it represents in sign magnitude, one’s complement, two’s complement and excess-255 respectively in the given order, separated by comma.

Sign Magnitude: Convert binary to decimal

011000101 = 1 + 4 + 64 + 128 = 197

One’s Complementand Two’s Complement: Same as 

Excess-X: Subtract the excess number from the sign magnitude 

197 – 255 = -58

Show the decimal integer -134 in 9-bit sign magnitude, one’s complement, two’s complement and excess-255 respectively in the given order, separated by comma.

Sign Magnitude: Convert the 134 to binary and add a 1 at the beginning

10000110 = 110000110

One’s Complement: Take sign-magnitude binary number, set the 1 at the beginning aside and switch the numbers (1 = 0, 0 = 1)

1 10000110= 1 01111001

Two’s Complement: Take one’s complement and add 1

101111001 + 1 = 101111010

Excess-Notation: Excess number – positive decimal integer = answer in binary

255 – 134 = 121

121 to binary = 001111001

Answer: 110000110, 101111001, 101111010, 001111001


Given a 9-bit binary sequence 110111010, show the decimal integer it represents in sign magnitude, one’s complement, two’s complement and excess-255 respectively in the given order, separated by comma.

First three answers will be negative and the excess will be positive

Sign Magnitude: Take 1 at the beginning off the binary number and convert to decimal and make it negative

1 10111010 = 10111010

  2 + 8 + 16 + 32 + 128 = 186

One’s Complement:Take sign-magnitude binary number, set the 1 at the beginning aside and switch the numbers (1 = 0, 0 = 1)

110111010 = 01000101

  1 + 4 +64 = 69

Two’s Complement: Subtract 1 from one’s complement

-69 – 1 = -70

Excess-Number: Convert the whole binary number including the 1 at the beginning, subtract the excess from that number.

110111010 = 442

442 – 255 = 187

Answer: -186, -69, -70, 187