|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
A class to perform binary addition of two binary strings. More...
Public Member Functions | |
| std::string | addBinary (const std::string &a, const std::string &b) |
| Adds two binary strings and returns the result as a binary string. | |
Private Member Functions | |
| bool | isValidBinaryString (const std::string &str) const |
| Validates whether a string contains only binary characters (0 or 1). | |
A class to perform binary addition of two binary strings.
|
inline |
Adds two binary strings and returns the result as a binary string.
| a | The first binary string. |
| b | The second binary string. |
|
inlineprivate |
Validates whether a string contains only binary characters (0 or 1).
| str | The string to validate. |