Thanku pankaj_vir A Great Explanation

The Gateway to Computer Science Excellence

+11 votes

Consider the unsigned 8-bit fixed point binary number representation, below,

$$b_7 \: \: b_6 \: \: b_5 \: \: b_4 \: \: b_3 \: \: \cdot b_2 \: \: b_1 \: \: b_0$$

where the position of the primary point is between $b_3$ and $b_2$ . Assume $b_7$ is the most significant bit. Some of the decimal numbers listed below **cannot **be represented **exactly **in the above representation:

- $31.500$
- $0.875$
- $12.100$
- $3.001$

Which one of the following statements is true?

- None of $i, ii, iii, iv$ can be exactly represented
- Only $ii$ cannot be exactly represented
- Only $iii$ and $iv$ cannot be exactly represented
- Only $i$ and $ii$ cannot be exactly represented

+15 votes

Best answer

+25 votes

$b_{7} b_{6} b_{5} b_{4} b_{3} . b_{2}b_{1}b_{0}$

Before decimal point means $b_{7} b_{6} b_{5} b_{4} b_{3}$

$b_{7} b_{6} b_{5} b_{4} b_{3} \rightarrow {11111}_2 \rightarrow {31}_{10}$

$b_{7} b_{6} b_{5} b_{4} b_{3} \rightarrow {00000}_2 \rightarrow {0}_{10}$

It means we can represent all the values from $0_{10}$ to $31_{10}$

After decimal point means $b_{2}b_{1}b_{0}$

$3$ bits, means total $2^3$ combinations are possible

${111}_2 \mapsto {0.875}_{10}$

${110}_2 \mapsto {0.750}_{10}$

${101}_2 \mapsto {0.625}_{10}$

${100}_2 \mapsto {0.500}_{10}$

${011}_2 \mapsto {0.375}_{10}$

${010}_2 \mapsto {0.250}_{10}$

${001}_2 \mapsto {0.125}_{10}$

${000}_2 \mapsto {0.000}_{10}$

only the values written above can be represented in $3$ bit binary form,

Now check the values after the decimal point in the given option

${0.500}_{10}$ can be represented

${0.875}_{10}$ can be represented

${0.100}_{10}$ cannot be represented

${0.001}_{10}$ cannot be represented

So, $(iii)$ and $(iv)$ cannot be exactly represented

Before decimal point means $b_{7} b_{6} b_{5} b_{4} b_{3}$

$b_{7} b_{6} b_{5} b_{4} b_{3} \rightarrow {11111}_2 \rightarrow {31}_{10}$

$b_{7} b_{6} b_{5} b_{4} b_{3} \rightarrow {00000}_2 \rightarrow {0}_{10}$

It means we can represent all the values from $0_{10}$ to $31_{10}$

After decimal point means $b_{2}b_{1}b_{0}$

$3$ bits, means total $2^3$ combinations are possible

${111}_2 \mapsto {0.875}_{10}$

${110}_2 \mapsto {0.750}_{10}$

${101}_2 \mapsto {0.625}_{10}$

${100}_2 \mapsto {0.500}_{10}$

${011}_2 \mapsto {0.375}_{10}$

${010}_2 \mapsto {0.250}_{10}$

${001}_2 \mapsto {0.125}_{10}$

${000}_2 \mapsto {0.000}_{10}$

only the values written above can be represented in $3$ bit binary form,

Now check the values after the decimal point in the given option

${0.500}_{10}$ can be represented

${0.875}_{10}$ can be represented

${0.100}_{10}$ cannot be represented

${0.001}_{10}$ cannot be represented

So, $(iii)$ and $(iv)$ cannot be exactly represented

+17 votes

I. $(31.500)_{10}$

$31$ can be represented in binary as $(11111)_2$

$(.500)_{10}$ can be represented in binary as $(.1)_2$

∴ $\color{green}{(31.500)_{10} \rightarrow (11111.1)_2}$

II. $(0.875)_{10}$

$0$ can be represented in binary as $0$

$(.875)_{10}$ can be represented in binary as $(.111)_2$

∴ $\color{green}{(0.875)_{10} \rightarrow (.111)_2}$

III. $(12.100)_{10}$

$(12)_{10}$ can be represented in binary as $(1100)_2$

$(.100)_{10}$ can be represented in binary as $(.0001100....)_2$

∴ $\color{green}{(12.100)_{10} \rightarrow (1100.0001100)_2}$

IV.$(3.001)_{10}$

$(3)_{10}$ can be represented in binary as $(11)_2$

$(.001)_{10}$ can be represented in binary as $(.0000....)_2$

∴ $\color{green}{(3.001)_{10} \rightarrow (11.0000....)_2}$

We can easily be seen that $III. \& IV.$ can't be represented in the given format.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,370 answers

198,506 comments

105,274 users