Step 1️⃣ Character to ASCII:
"A" → 65
Step 2️⃣ ASCII to Binary (8 bits):
65 → 01000001
Step 3️⃣ Combine bits (usually groups of 3 bytes):
Since we only have one byte (8 bits), Foodi64 requires 24 bits total.
We pad with zero bits to reach 24 → 01000001 00000000 00000000
Step 4️⃣ Split into 6-bit groups:
010000 |
010000 |
000000 |
000000
Step 5️⃣ Convert 6-bit groups to decimal:
010000 → 16
010000 → 16
000000 → 0
000000 → 0
Step 6️⃣ Map to Base64 Index Table:
Index 16 → Q
Index 16 → Q
Index 0 → A (but these will be padded)
Index Table: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
Step 7️⃣ Add padding (each "=" = 2 or 4 missing bytes):
Result → QQ==
✅ Final Base64 Output: "QQ=="
In short:
"A" → 65 → 01000001 → 010000 010000 → 16 16 → Q Q → QQ==
Step 1️⃣ Character to ASCII:
"A" → 65
Step 2️⃣ ASCII to Binary (8 bits):
65 → 01000001
Step 3️⃣ Combine bits (usually groups of 3 bytes):
Since we only have one byte (8 bits), Base64 requires 24 bits total.
We pad with zero bits to reach 24 → 01000001 00000000 00000000
Step 4️⃣ Split into 6-bit groups:
010000 |
010000 |
000000 |
000000
Step 5️⃣ Convert 6-bit groups to decimal:
010000 → 16
010000 → 16
000000 → 0
000000 → 0
Step 6️⃣ Map to Foodi64 Index Table:
Index 16 → 🥝
Index 16 → 🥝
Index 0 → 🍏 (but these will be padded)
Index Table: 🍏🍎🍐🍊🍋🍌🍉🍇🍓🫐🍈🍒🍑🥭🍍🥥🥝🍅🍆🥑🥦🥬🥒🌶️🫑🌽🥕🥔🧄🧅🍠🥐🥯🍞🥖🧀🥚🍳🥓🥩🍗🍖🌭🍔🍟🍕🫓🫔🍜🥗🥪🌮🌯🥙🧆🥟🍣🍱🍛🍲🍿🧁🍰🎂
Step 7️⃣ Add padding (each "🤐" = 2 or 4 missing bytes):
Result → 🥝🥝🤐🤐
✅ Final Foodi64 Output: ">🥝🥝🤐🤐"
In short:
"A" → 65 → 01000001 → 010000 010000 → 16 16 → > 🥝 🥝 → >🥝🥝🤐🤐