MrSquirrely.Fun.Binary
1.0.0
dotnet add package MrSquirrely.Fun.Binary --version 1.0.0
NuGet\Install-Package MrSquirrely.Fun.Binary -Version 1.0.0
<PackageReference Include="MrSquirrely.Fun.Binary" Version="1.0.0" />
<PackageVersion Include="MrSquirrely.Fun.Binary" Version="1.0.0" />
<PackageReference Include="MrSquirrely.Fun.Binary" />
paket add MrSquirrely.Fun.Binary --version 1.0.0
#r "nuget: MrSquirrely.Fun.Binary, 1.0.0"
#:package MrSquirrely.Fun.Binary@1.0.0
#addin nuget:?package=MrSquirrely.Fun.Binary&version=1.0.0
#tool nuget:?package=MrSquirrely.Fun.Binary&version=1.0.0
BinaryCharacters
Namespace: MrSquirrely.Fun.Binary
Class: BinaryChars
A C# utility library that maps standard printable ASCII characters to their 8-bit binary literal representations. This project is designed for educational purposes to visualize how text data is stored in memory and to facilitate "absurd" coding challenges where strings are constructed bit-by-bit.
Features
The BinaryChars class provides public const char definitions for the standard ASCII set:
- Uppercase Letters:
UpperAthroughUpperZ - Lowercase Letters:
LowerAthroughLowerZ - Digits:
Digit0throughDigit9 - Symbols & Punctuation: Extensive coverage including
SymSpace,SymExclamation,SymAt, brackets, braces, and math symbols.
Installation
- Copy the
BinaryCharacters.csfile into your .NET project. - Ensure the namespace
MrSquirrely.Fun.Binaryis accessible to your code.
Usage
Since the characters are defined as char constants derived from binary literals (e.g., 0b_0100_0001), you can use them exactly like normal characters. They are most effective when used with a StringBuilder to construct words manually.
Basic Example
using MrSquirrely.Fun.Binary;
using System.Text;
public void CreateBinaryString()
{
// Use StringBuilder for efficient appending
StringBuilder builder = new StringBuilder();
// Constructing "Hi!"
// H: 0100 1000
builder.Append(BinaryChars.UpperH);
// i: 0110 1001
builder.Append(BinaryChars.LowerI);
// !: 0010 0001
builder.Append(BinaryChars.SymExclamation);
string result = builder.ToString();
// Result: "Hi!"
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 316 | 12/8/2025 |