An organic compound form yellow precipitate of iodoform with ${{I}_{2}}$ in presence of alkali, if it has$\text{C}{{\text{H}}_{\text{3}}}\text{CO}$ group directly or it has $C{{H}_{3}}-\underset{\begin{smallmatrix} | \\ OH \end{smallmatrix}}{\overset{\begin{smallmatrix} H \\ | \end{smallmatrix}}{\mathop{C}}}\,$ group $\text{C}{{\text{H}}_{\text{3}}}\text{CH}\left( \text{OH} \right)\text{C}{{\text{H}}_{\text{3}}}+{{\text{l}}_{\text{2}}}\text{ }\xrightarrow{\text{NaoH}}\text{ C}{{\text{H}}_{\text{3}}}\text{COC}{{\text{H}}_{\text{3}}}$ $\begin{align} & \,\,\,\,\,\,\,\,\,\,+\text{ }2HI+3NaI+C{{H}_{3}}COONa+\underset{{}}{\mathop{3{{H}_{2}}O}}\, \\ & C{{H}_{3}}COC{{H}_{3}}+3{{I}_{2}}+4NaOH\xrightarrow{{}}\underset{\begin{smallmatrix} \text{yellow} \\ \text{ppt}\text{.} \end{smallmatrix}}{\mathop{CH{{I}_{3}}}}\,\downarrow \\ \end{align}$ $+\text{ }3NaI+C{{H}_{3}}COONa+3{{H}_{2}}O$ $C{{H}_{3}}C{{H}_{2}}CH\left( OH \right)\text{ }C{{H}_{3}}+{{I}_{2}}\xrightarrow[{}]{{}}$ $\underset{Ethyl\,methyl\,ketone}{\mathop{C{{H}_{3}}C{{H}_{2}}\underset{\underset{O}{\mathop{||}}\,}{\mathop{C}}\,C{{H}_{3}}+2HI}}\,$ It gives iodoform test. $\text{C}{{\text{H}}_{\text{3}}}\text{C}{{\text{H}}_{\text{2}}}\underset{\underset{\text{O}}{\mathop{||}}\,}{\mathop{\text{C}}}\,\text{C}{{\text{H}}_{\text{3}}}+\text{3}{{\text{l}}_{\text{2}}}+\text{4NaOH }\to $ $\underset{\text{Yellow}\,\text{ppt}\text{.}}{\mathop{\text{CH}{{\text{I}}_{\text{3}}}}}\,\downarrow +\text{3NaI+C}{{\text{H}}_{\text{3}}}\text{C}{{\text{H}}_{\text{2}}}\text{COONa+3}{{\text{H}}_{\text{2}}}\text{O}$ $\text{C}{{\text{H}}_{\text{3}}}\text{OH}+{{\text{1}}_{\text{2}}}\text{ }\xrightarrow{{}}\text{ HCHO}+\text{2HI}$ It does not have methyl ketonic group, so it does not give yellow ppt. with ${{\text{I}}_{\text{2}}}$ in presence of alkali. $\text{C}{{\text{H}}_{\text{3}}}\text{C}{{\text{H}}_{\text{2}}}\text{OH}+{{\text{1}}_{\text{2}}}\xrightarrow{\text{ }}\text{ C}{{\text{H}}_{\text{3}}}\underset{\underset{\text{O}}{\mathop{||}}\,}{\mathop{\text{C}}}\,\text{H}+\text{2HI}$ It gives iodoform test. $\text{C}{{\text{H}}_{\text{3}}}\underset{\underset{\text{O}}{\mathop{||}}\,}{\mathop{\text{C}}}\,\text{H}+\text{3}{{\text{I}}_{\text{2}}}+\text{4NaOH }\xrightarrow{{}}\underset{\text{Yellow}\,\text{ppt}\text{.}}{\mathop{\text{CH}{{\text{l}}_{\text{3}}}}}\,$ $+HCOONa+3NaI+2{{H}_{2}}O$