# How to represent floating point numbers using logic gates?

Using the formula given at the start of the question, I had to convert the numbers in part (a) to floating point notation.

My answers for part (a) were: (i) 1111.2^11 + 111 (ii) 1111.2^11 + 000 (iii) 0000.2^00 + 000 (iv) 1100.2^00 + 000 (v) 1010.2^11 + 101

But now i have no clue on what to write for 2(b), because I didn't really use a specific formula for finding out the answers for part (a). Any help would be greatly

To get the exponent you need to get the index of the highest selected bit of the top 3:

This is the truth table with $B_6$ $B_5$ $B_4$ -> exponent:

1** -> 11
01* -> 10
001 -> 01
000 -> 00


For the mantissa you shift the bits to the right $E$ bits. The underflow lands in T after a $4 - E$ shift to the right.

Or in other words if $E = 3$ then $M$ will take $B_6$ $B_5$ $B_4$ $B_3$

if $E = 2$ then $M$ will take $B_5$ $B_4$ $B_3$ $B_2$

and so one

$T$ will take whatever bits M didn't take.

• Sorry, could you reclarify the the mantissa bit again? I dont understand what youre saying. – James Sep 3 '15 at 12:58
• @james in psuedo code M = B >> E and the under flow from that is T shifted by some bits. – ratchet freak Sep 3 '15 at 13:01
• we havent learnt about pseudo code or underflow haha. Could you possibly give an example of what you mean? Thanks – James Sep 3 '15 at 13:06
• Could you use one of the examples already given please – James Sep 3 '15 at 13:20