Question

In: Computer Science

Note: Show All the steps of your work. 1. Convert the following decimal real number to...

Note: Show All the steps of your work.

1. Convert the following decimal real number to a binary number with six places to the right of the binary point.
57.553

2. Represent the following decimal integer numbers in binary using 8-bit signed magnitude, one’s complement, and two’s complement representations:
(a) 65 (b) -24

3. What is the value of the 8-bit binary number 10011110 in decimal assuming the following representation: (a) unsigned, (b) sign-magnitude, (c) one’s complement, (d) two’s complement.

4. Using arithmetic shifting, perform the following operations assuming the numbers are expressed using 8-bit signed two’s complement representation:
(a) Multiply the value 00111101 by 8
(b) Divide the value 11001010 by 4

5. Assume we are using a simple model for floating-point representation similar to the one used in Chapter 2 of the textbook which has a 14-bit format, 5 bits for the exponent with a bias of 15 (not 16 as in the textbook), a normalized mantissa of 8 bits, and a single sign bit.
(a) Show how the computer would represent the numbers 100.0 and 0.25 using this representation.
(b) Show how the computer would add the two floating-point numbers in part (a) by changing one of the numbers so they are both expressed using the same power of 2.
(c) Show how the computer would represent the sum in part (b) using the given floating point
representation. What decimal value for the sum is the computer actually storing? Explain.

Solutions

Expert Solution

Answer 1

57.553

=> 57 (integer part)

  • 57/2 = 28   57%2 = 1 (LSB)
  • 28/2 = 14 28%2 = 0
  • 14/2 = 7 14%2 = 0
  • 7/2 = 3 7%2 = 1
  • 3/2 = 1 3%2 = 1
  • 1/2 = 0 1%2 = 1 (MSB)

=> .553 (fraction part)

  • 0.553 x 2 = 1.106 => 1 (MSB)
  • 0.106 x 2 = 0.212 => 0
  • 0.212 x 2 = 0.424 => 0
  • 0.424 x 2 = 0.848 => 0
  • 0.848 x 2 = 1.696 => 1
  • 0.696 x 2 = 1.392 => 1 (LSB)

111001.100011

Answer 2

1's complement and 2's complement is calculated for negative numbers. for positive numbers 1's and 2's complement is same.

(a) 65

  • 65/2 = 32   65%2 = 1 (LSB)
  • 32/2 = 16   32%2 = 0
  • 16/2 = 8   16%2 = 0
  • 8/2 = 4 8%2 = 0
  • 4/2 = 2 4%2 = 0
  • 2/2 = 1 2%2 = 0
  • 1/2 = 0 1%2 = 1 (MSB)

6510 = 1000001

  1. 8-bit signed magnitude = 01000001  
  2. one’s complement = 01000001  
  3. two’s complement representations = 01000001  

(b) -24

  • 24/2 = 12 24%2 = 0 (LSB)
  • 12/2 = 6 12%2 = 0
  • 6/2 = 3    6%2 = 0
  • 3/2 = 1 3%2 = 1
  • 1/2 = 0 1%2 = 1 (MSB)

2410 = 11000

  1. 8-bit signed magnitude = sign-bit and number = 10011000 (-24)
  2. one’s complement = 1's of 00011000= 11100111   (flipping all the bits)
  3. two’s complement representations = 1's complement + 1 = 11100111 + 1 = 11101000

Answer 3

10011110

  • Unsigned => 27 + 24+ 23+ 22+ 21 = 128 + 16 + 8 + 4 + 2 = 15810
  • Sign-magnitude =>
    • Sign bit = 1 (negative)
    • Decimal part = 0011110 = 24+ 23+ 22+ 21 = 3010
    • - 30
  • One’s complement (negative number)
    • decimal = 1's of 10011110 = 01100001 = 26+ 25+ 20 = 97
    • - 97
  • Two’s complement (negative number)
    • decimal = 2's of 10011110 = 01100010 = 26+ 25+ 21 = 98
    • - 98

Answer 4

4. Using arithmetic shifting, perform the following operations assuming the numbers are expressed using 8-bit signed two’s complement representation:

(a) Multiply the value 00111101 by 8

  • 8 = 23
  • 00111101 << 3 = 11101000

(b) Divide the value 11001010 by 4

  • 4 = 22
  • 11001010 >> 2 = 11110010   


Related Solutions

Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS) 205.75
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number...
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number to fractional binary representation. 1. 103.5625
Convert from binary to decimal to hexadecimal (PLEASE SHOW ALL WORK) a. 1010 1011 - decimal:...
Convert from binary to decimal to hexadecimal (PLEASE SHOW ALL WORK) a. 1010 1011 - decimal: - hexadecimal b. 0011 0001 - decimal: - hexadecimal: c. 1110 0111 - decimal: - hexadecimal: d. 1111 1111 - decimal: - hexadecimal:
Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK) 1. B2 - binary: - decimal:...
Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK) 1. B2 - binary: - decimal: 2. 37 - binary: - decimal: 3. 0A -binary: - decimal: 4. 11 - binary: - decimal:
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
Convert 11001001100101101011010011010111 from IEEE 754 to decimal show work
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Convert 1.8125 to IEEE-754 representation. Show all your work.
Please show all work: Multiplying the binary number below by decimal 128 yields ________   1 0...
Please show all work: Multiplying the binary number below by decimal 128 yields ________   1 0 0 1 1 0 0 1 0 . 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 . 1 1 0 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 1 1 0 0 1 1 . 0 0 1 0 1 1 1 1...
Remember to SHOW ALL YOUR WORK, and INCLUDE ALL STEPS for hypothesis tests. 1. A sociologist...
Remember to SHOW ALL YOUR WORK, and INCLUDE ALL STEPS for hypothesis tests. 1. A sociologist is investigating the relationship between life satisfaction and sociability. For a sample of 16 individuals, the following data is obtained: SP = 5.14 Sociability: M=10.62 SS=5.12 Life Satisfaction: M=9.53 SS=7.24 a. Compute the correlation between sociability and life satisfaction. b. What can be said about the nature of the relationship between these two variables? c. Compute the coefficient of determination. What does this value...
Show ALL work if it is required for the question and BASES 4. Convert the following...
Show ALL work if it is required for the question and BASES 4. Convert the following from Signed Binary to Decimal: (signed) a. 10011010 b. 01001101 5. 10000001 - 01100110 6. 80D3 + 74C2
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT