Preparation
a) From Alkyl Halides : Alkyl halides with ethanolic potassium cyanide gives cyanides where as with silver cyanide gives alkyl isocyanide.
`CH_(3)- underset(Cl)underset(|)(CH_(2)) underset(KCN) overset("ethanolic") (to) CH_(3)-underset("Ethyl cyanide")underset(CN)underset(|)(CH_(2))+KCl`
`CH_(3)- underset(Cl)underset(|)(CH_(2)) underset(AgCN) overset("ethanolic") (to) CH_(3) - underset("Ethyl isocyanide")underset(NC)underset(|)(CH_(2))+AgCl`
b) From amides and aldoximes : The dehydration of amides (or) oximes with dehydrating agents like `P_(2)O_(5)` (or) with benzene sulphonyl chloride yeild cyanides.
`CH_(3)- underset(O)underset(||)(C)-NH_(2)+C_(6)H_(5)SO_(2)Cl underset(70^(@)C)overset("Pysanidine") (to) CH_(3)-CN+C_(6)H_(5)SO_(3)H+HCl`
`CH_(3)-CH_(2)-CH=N-OH+(CH_(3)CO)_(2)O to CH_(3)- underset(CN)underset(|)(CH_(2))+2CH_(3)COOH`
c) Isocyanides from amines : (Carbyl amine reaction)
`R-NH_(2)+CHCl_(2)+3KOH overset("Heat") to R-NC+3KCl+3H_(2)O`