mano machine implementation in c