The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+3 votes

Consider an excess - 50 representation for floating point numbers with $4 BCD$ digit mantissa and $2 BCD$ digit exponent in normalised form. The minimum and maximum positive numbers that can be represented are __________ and _____________ respectively.

+2 votes

Just like in binary we have normalised number of the form (-1)^{s} * 1.M * 2^{Base exponent - Bias}

where s : sign bit

M : Mantissa

Here the digits are in BCD instead , so the positive normalised number representation will be : 9.M * 10^{Base exponent - Bias}

Here bias is given to be excess - 50 meaning that we need to subtract 50 from base exponent field to get the actual exponent..

So maximum mantissa value with 4 BCD digits = 9999

Maximum base exponent value with 2 BCD digits = 99

So maximum actual exponent value possible with 2 BCD digits = 99 - Bias

= 99 - 50

= 49

So magnitude of largest positve number = 9.9999 * 10^{49}

Similarly ,

To get minimum positve number , we have to set mantissa = 0 and exponent field = 0

So doing that we get exponent = 0 - 50 = -50

So magnitude of minimum positive number = 9.0000 * 10^{-50}

**Therefore , maximum positive number = 9.9999 * 10 ^{49}**

^{ }Minimum positive number = 9.0000 * 10^{-50}

Sir since the field is given to have BCD digits instead of binary digits..Correct me sir if I m wrong..N if so , plz let me know what should be the correction..

AFAIK for normalization any non-zero digit would do.

https://en.wikipedia.org/wiki/Normalized_number

So, in binary only "1" is possible. In decimal "1-9" possible. So, the minimum positive number should change.

I think the following:

2 digits for exponent: Max value in binary 10011001 (i.e 99 in BCD) = 153 in decimal

So, biased exponent range = 0 to 153

Now, max mantissa = **1. **1001100110011001 (i.e 9999 in BCD)

Hence, max number = **1. **1001100110011001 * 2^{153-50}

and min number = **1. **0000000000000000 * 2^{0-50}

@Arjun, am I right?

- All categories
- General Aptitude 1.2k
- Engineering Mathematics 4.7k
- Digital Logic 1.9k
- Programming & DS 3.5k
- Algorithms 3k
- Theory of Computation 3.7k
- Compiler Design 1.5k
- Databases 2.8k
- CO & Architecture 2.5k
- Computer Networks 2.9k
- Non GATE 835
- Others 1.2k
- Admissions 271
- Exam Queries 393
- Tier 1 Placement Questions 17
- Job Queries 50
- Projects 6

33,620 questions

40,170 answers

114,128 comments

38,553 users