Logic gates with a single Hall bar heterostructure