Speed Reducer Design Problem Using Logic Gates