- #1
fazer2014
- 8
- 0
Hi everyone! I'm very new to combinational logic design and this is a question on an assignment that we've been given. This particular situation wasn't covered in lecture material so I've been Googling and trying to think abstractly about it but I'm pretty stuck for an approach. And I'm not looking for an answer - just some guidance as to how to approach it.
I HAVE found the Boolean expression for the exponent (E) but cannot find an approach that works for finding the M values.
A binary integer B in the range 0 ≤ B < 27 can be represented by 7 bits in “fixed-point” format, B = B6 B5 B4 B3 B2 B1 B0. We can represent numbers in the same range with less precision using 6 bits in a floating-point notation, F = M·2E, where M is a 4-bit mantissa M = M3 M2 M1 M0 and E is a 2-bit exponent E = E1 E0. In this system, the smallest integer is 0·20 and the largest is 15·23. We can write B = M ·2E +T where the truncation error T satisfies 0 ≤ T < 2E .
Design a combinational circuit which takes as input the 7-bit unsigned binary integer B = B6 B5 B4 B3 B2 B1 B0 and which outputs the 4-bit mantissa M = M3 M2 M1 M0 and the 2-bit exponent E = E1 E0 of the floating-point representation of the number. You do not need to sketch the circuit, rather you should write down a sum-of-products expression for each of the six ouput variables in terms of the input variables. As always, you should explain the reasoning behind your design.
Simple combinational logic gates I guess?
As mentioned earlier, I have found expressions for the E1 and E0 values. But I do not know how to approach the M values. We have to start at the first '1' (ignore leading zeroes) and then take the next 4 bits, and ignore the rest ie. truncate the bit sequence.
I honestly have no idea and have been exploring the use of single bit comparator circuits; A > B, A=B, A<B to even just try to get the first value (M4) but it doesn't seem to be going anywhere.
Thanks for any guidance!
I HAVE found the Boolean expression for the exponent (E) but cannot find an approach that works for finding the M values.
Homework Statement
A binary integer B in the range 0 ≤ B < 27 can be represented by 7 bits in “fixed-point” format, B = B6 B5 B4 B3 B2 B1 B0. We can represent numbers in the same range with less precision using 6 bits in a floating-point notation, F = M·2E, where M is a 4-bit mantissa M = M3 M2 M1 M0 and E is a 2-bit exponent E = E1 E0. In this system, the smallest integer is 0·20 and the largest is 15·23. We can write B = M ·2E +T where the truncation error T satisfies 0 ≤ T < 2E .
Design a combinational circuit which takes as input the 7-bit unsigned binary integer B = B6 B5 B4 B3 B2 B1 B0 and which outputs the 4-bit mantissa M = M3 M2 M1 M0 and the 2-bit exponent E = E1 E0 of the floating-point representation of the number. You do not need to sketch the circuit, rather you should write down a sum-of-products expression for each of the six ouput variables in terms of the input variables. As always, you should explain the reasoning behind your design.
Homework Equations
Simple combinational logic gates I guess?
The Attempt at a Solution
As mentioned earlier, I have found expressions for the E1 and E0 values. But I do not know how to approach the M values. We have to start at the first '1' (ignore leading zeroes) and then take the next 4 bits, and ignore the rest ie. truncate the bit sequence.
I honestly have no idea and have been exploring the use of single bit comparator circuits; A > B, A=B, A<B to even just try to get the first value (M4) but it doesn't seem to be going anywhere.
Thanks for any guidance!