# Pe Computer exam



## Shima (Apr 2, 2011)

Hi, I have hard time understand how I get value 111.75 from Mantissa 0.110111111. Please help.


----------



## Shima (Apr 3, 2011)

Shima said:


> Hi, I have hard time understand how I get value 111.75 from Mantissa 0.110111111. Please help.



Did any one solved this probelm? It is on NCEES electrical and computer book prob 501. I did not get any respond. Hope some have the answer.


----------



## CincinnatiControlsGuy (Apr 4, 2011)

Shima said:


> Shima said:
> 
> 
> > Hi, I have hard time understand how I get value 111.75 from Mantissa 0.110111111. Please help.
> ...


Could you post the entire question? I don't have the NCEES book for the computer exam. My apologies for not getting to this sooner.


----------



## Shima (Apr 4, 2011)

Shima said:


> Shima said:
> 
> 
> > Hi, I have hard time understand how I get value 111.75 from Mantissa 0.110111111. Please help.
> ...


Thanks for responding. It seems there are not too many people taking computer exam. Tha scares me. Here is the prob 501. Thanks again

Byte 0 Byte 1

7 6 5 4 3 2 1 0	7 6 5 4 3 2 1 0

Sign Excessm-64 exponent Normalized Mantissa Fraction

Mantissa is 8 bits, Exponent is 7bits and sign is 1 bit.

The numerical value is given by the following expression (-1)sign X 2 (e-64) X 0.1 ffff ffff

Assume all floating exponents are stored in excess-64 format, and each “f” in the expression represents a bit in Byte 1.

The mantissa is represented as a 9-bit fraction with the radix point to the far left. The mantissa is normalized so the most significant bit is 1. The leftmost bit is then suppressed and the remaining bits are placed in Byte 1.

The decimal value 111.875 is stored in this format and then returned for printing. The resulting printout is:

The answer should be 111.75


----------



## CincinnatiControlsGuy (Apr 4, 2011)

Shima said:


> Shima said:
> 
> 
> > Shima said:
> ...


This doesn't look like a problem either. Could I get the EXACT problem statement. I see the mantissa from above, but I would need the exponent as well.


----------



## Shima (Apr 4, 2011)

GroesbeckEE said:


> Shima said:
> 
> 
> > Shima said:
> ...


I copied the whole prob for you. I am not able to draw the table. The table is 8 bits for mantissa( 0-7), 7bits for exponent (0-6) and the last bit is for sign. I am not sure if the prob is correct. I am not able to solve it either.


----------



## CincinnatiControlsGuy (Apr 4, 2011)

Shima said:


> GroesbeckEE said:
> 
> 
> > Shima said:
> ...


I still think there is something missing as I would need the binary representation of the exponent. In binary format, what is the table data from left to right? However, working backwards suggests that the exponent is 71 or 0100 0111. Let's start with 111.75 = (-1)^sign X 2^(e-64) X 0.1 ffff ffff. We know that "0.1 ffff ffff" is represented by the mantissa above, which is "0.110111111". The mantissa is 1*2^-1 + 1* 2^-2+ 0*2^-3 + ... This comes to 0.873047 in decimal. Assuming the sign bit is 0, 2^(e-64) = 111.75/0.873047 = 128. e-64 = ln(128)/ln(2) = 7. e = 7+64 = 71. Therefore, I'm guessing the table looks like (assuming your format above): 01000111 10111111. In any case, the best case scenario is to scan the problem in and attach it. That way I can look at the table and reverse-engineer their answer.


----------



## Shima (Apr 4, 2011)

GroesbeckEE said:


> Shima said:
> 
> 
> > GroesbeckEE said:
> ...


I will scan it tomorrow and will send it for you. Thanks


----------



## speedyox (Apr 4, 2011)

I passed the Computer PE exam last year. You're not alone.

I don't have my copy of the computer sample problems with me, but I'll try to remember to look at it tonight.


----------



## Shima (Apr 5, 2011)

speedyox said:


> I passed the Computer PE exam last year. You're not alone.
> I don't have my copy of the computer sample problems with me, but I'll try to remember to look at it tonight.


I am glad someone did take the computer exam. I haven't found any one around me who is taking the computer one. Any way I am attaching a copy of the prob. Hopefully I could get the answer. By the way thanks to speedyox and GroesbeckEE for trying to find the answer.

Mantissa.doc


----------



## CincinnatiControlsGuy (Apr 5, 2011)

Shima said:


> speedyox said:
> 
> 
> > I passed the Computer PE exam last year. You're not alone.
> ...


DOH!!! I got it. This problem is a real kick in the nuts, though. I've attached the solution. Writing it out makes more sense. The catch is the 9 bit binary number can only represent numbers between 0 and 511. My apologies for lousy handwriting and even lousier scanning.

scan0001.pdf


----------



## speedyox (Apr 5, 2011)

I was at a seminar all day today and am just now catching up on correspondence. I'm glad GroesbeckEE got back to you. Does his explanation clear it up for you? The simple way to look at is, you have to 2 conversions: one decimal-to-float to store 111.875 and one float-to-decimal to retrieve whatever you stored and convert it back to whatever decimal value it is.

The trick is that 111.875 can't be stored in the given format without losing precision.


----------



## Shima (Apr 6, 2011)

GroesbeckEE said:


> Shima said:
> 
> 
> > speedyox said:
> ...


Thank you so much GroesbeckEE. I am so glad to get the answer. it was killing me not to be able to solve it. I very appreciate the time you spent to solve it.

Good luck to everyone. Hope you all pass the exam.


----------

