Binary encoding