# Data Types

Q1.Write the decimal equivalents for these IEEE floating point numbers

a. 0 10000000 00000000000000000000000

b. 1 10000011 00010000000000000000000

c. 0 11111111 00000000000000000000000

d. 1 10000000 10010000000000000000000

Q2. Add the following unsigned binary numbers then express the answer in decimal

a. 01 + 1011

b. 11 + 01010101

c. 0101 + 110

d. 01 + 10

Q3.Write the result of the following addition as both 8-bit binary and decimal numbers. For each part, use standard binary

a.Add the 1's complement representation of 7 to the 1's complement rpresentation of - 7

b.Add the signed magnitude representation of 7 to the signed magnitude representation of -7

c.Add the 2's complement representation of 7 to the 2's complement representation of -7

Q.4 These are 4-bit 2's complement. Which of these operations are overflow? Justify by translating the operands and results into decimal.

a.1100 + 0011

b.1100 + 0100

c.0111 + 0001

d.1000 - 0001

e.0111 + 1001

Q.5 you want to express -64 as a 2's complement number

a. how many bits do you need (the minimum )?

b. with this number of bits, what is the largest positive number you can represent? (Answer in decimal and binary)

c. with this number of bits, what is the largest unsigned number you can represent ? (Answer in decimal and binary)

#### Solution Preview

Q1.Write the decimal equivalents for these IEEE floating point numbers

a. 0 10000000 00000000000000000000000

Answer: 2.0

b. 1 10000011 00010000000000000000000

Answer: -17.0

c. 0 11111111 00000000000000000000000

Answer: Infinity

d. 1 10000000 10010000000000000000000

Answer: -3.125

Q2. Add the following unsigned binary numbers then express the answer in decimal

a. 01 + 1011

Binary: 1100

Decimal: 12

b. 11 + 01010101

Binary: 01011000

Decimal: 88

c. 0101 + 110

Binary: 1011

Decimal: 11

d. 01 + 10

Binary: 11

Decimal: 3

Q3.Write the result of the following addition as both 8-bit binary and decimal numbers. For each part, use standard

binary

a.Add the 1's complement representation of 7 to the 1's complement representation of - 7

Solution:

7 can be ...

#### Solution Summary

The expert writes the decimal equivalents for the IEEE floating point numbers. This posting contains the solution to the given problems.