# decimal to binary pattern using mantissa and exponents

Page 1 of 1

## 2 Replies - 18127 Views - Last Post: 24 March 2009 - 07:32 PM

Reputation: 3
• Posts: 107
• Joined: 03-October 08

# decimal to binary pattern using mantissa and exponents

Posted 24 March 2009 - 02:31 PM

Hi, please give me some hints as how to do this. My book says the exponent has an offset of 127, but how would i represent 127 when the exponent is only three bits???

Assuming a three-bit exponent field and a four-bit mantissa, write the 8-bit pattern for the following decimal values:
a.13.0
b.0.3125
Is This A Good Question/Topic? 0

## Replies To: decimal to binary pattern using mantissa and exponents

Reputation: 3
• Posts: 107
• Joined: 03-October 08

## Re: decimal to binary pattern using mantissa and exponents

Posted 24 March 2009 - 03:17 PM

Sadaiy, on 24 Mar, 2009 - 01:31 PM, said:

Hi, please give me some hints as how to do this. My book says the exponent has an offset of 127, but how would i represent 127 when the exponent is only three bits???

Assuming a three-bit exponent field and a four-bit mantissa, write the 8-bit pattern for the following decimal values:
a.13.0
b.0.3125

A. 13.0
positive so first bit 0
exponent = 000
mantissa = 1101
=0000 1101
B. 0.3125
=3.125x10-1
positive so first bit 0
exponent = offset by 4 because 2^3 = 8 / 2 = 4 ... so 4 - 1 = 3 = 011 in binary
Mantissa = 3.125 = 0011.001
= 0011 0011.001

### #3 krum110487

• D.I.C Regular

Reputation: 39
• Posts: 291
• Joined: 07-February 09

## Re: decimal to binary pattern using mantissa and exponents

Posted 24 March 2009 - 07:32 PM

A.
13 = 1101

in floating point representation this is .1101 * 2^4

Mantissa = 1101
Exp = 100 (which is the same as 0100)
Sign = 0 (for positive

13.0 = 0 100 1101 (without a bias of 3)
13.0 = 0 111 1101 (with a bias of 3)

B.
.3125 = .0101

.1 = .5
.01 =.25 *
.001 = .125
.0001 = .0625 *

.0101 which is the same as:

.0101 * 2^0 OR .101 * 2^-1 (but this requires a bias)

Mantissa = 0101
Exp = 000
Sign = 0

.3125 = 0 000 0101 (without the bias of 3)
.3125 = 0 010 1010 (with a bias of 3)

This post has been edited by krum110487: 24 March 2009 - 07:38 PM