Logic elements - directional function