Non-Volatile Majority Function Logic Using Ferroelectric Memory for Logic in Memory Technology