José MarÃa
2010-07-27 21:17:19 UTC
Hi,
I have a signed fixed point number N1 with 11 bits wordlength 9 fraction bits, and I need to truncate N1 to obtain a signed fixed point number N2 with 8 bits wordlength 6 fraction bits, it is, N2 is N1 but without the 3 LSB bits, here an example:
N1 =
-0.0020
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 11
FractionLength: 9
RoundMode: round
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
CastBeforeSum: true
K>> bin(N1)
ans =11111111111
What I need is a signed fixed point number bin(N2)= 11111111, Do you now some function ??? it is a truncation but in bits level...
Thanks !!!!!
I have a signed fixed point number N1 with 11 bits wordlength 9 fraction bits, and I need to truncate N1 to obtain a signed fixed point number N2 with 8 bits wordlength 6 fraction bits, it is, N2 is N1 but without the 3 LSB bits, here an example:
N1 =
-0.0020
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 11
FractionLength: 9
RoundMode: round
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
CastBeforeSum: true
K>> bin(N1)
ans =11111111111
What I need is a signed fixed point number bin(N2)= 11111111, Do you now some function ??? it is a truncation but in bits level...
Thanks !!!!!