The basic logic of the double entry is based on this equation, which is: Assets = Liabilities + Equity.

For more explanation and deep understanding about the accounting equation follow the link given below;

Basic Accounting Equation with Detailed Example and Exercise