With the fast evolution of digital data exchange, security is the main concern in today's world. It is important to secure data from uncertified access, security information becomes essential in information and data storage, and transmission over open networks such as the Internet. The traditional algorithms face some drawbacks of little key-space and poor security. This paper proposes a new way to encrypt data on the basis of the binary form which is considered the simplest form of data that is consisted of zero and one. This new system converts the target message into zero and one and then swap the bit value from one to zero and from zero to one by using mathematical equations built on the truth table in which the secret key and the target message are the main elements. This algorithm is characterized by a secret key that has an unlimited length and a sub-secret key added to the system. The use of the sub-secret key helps to generate a different encrypted message every time even if the same secret key, the sub-secret key, and the same plain-text are used, which increases the confidentiality and strength of the system. This system provides all the demands of secrecy and strength to confront the intruders with high efficiency and has high-security analysis such as key space analysis, statistical analysis. For example, if the secret key is chosen as 1 MB length that means a number of trials equal to 28388608 to estimate it, which is considered very large to be adequate to safeguard information and data that is encrypted by the proposed encryption system against any attacks. Therefore, the proposed system can be used to secure any software applications.