ns logic