Please enable JavaScript.
Coggle requires JavaScript to display documents.
CSM152A Project 2 (Output (S (Sign of the output), E (3 bit expoent), F…
CSM152A
Project 2
Output
S
Sign of the output
E
3 bit expoent
F
5 bit Significand
Input
13 bit input
2s complement representation
Representation
Example
0 0000 11111101
Exponent
Leading zeros = 5
Leading zeros table tells us 3 bits for exponent
Significand
1 bit for sign + 3 bits for exp
9 bits for fp so (9 - 4) = 5 bits for F
Means 5 bits following leading zeros are F
S = 0
Round?
Is the bit after the last F bit 1 or 0?
x 5 y
5 is for the significand
x = leading zeros
Floating point conversion
13 bits -> 9 bit floating point representation
Priority Encoder
Implement
Code
Bunch of if else statements
caseZ
We care about the 13:5 bits at the most
This is because y can be 0 bits but we must have 5 bits for the significand