Compacted logic