Cybersecurity Playground
Interactive, sandboxed client-side utilities to inspect network configurations, parse tokens, matching strings, and test basic binary formats.
Memory in Computer: Bits & Bytes
At the lowest level, all computer data is stored as electrical signals—either ON (1) or OFF (0). These single states are called Bits. To represent complex data like text or colors, we group these bits together into Bytes, and use numbering systems like Decimal, Hexadecimal, and Octal to read them.
Interactive Lesson
Understanding scale step-by-step
Interactive Lesson: Deep Dive Math
Detailed visual math for conversions
Bit (Binary Digit)
The smallest unit of data in a computer. It has a single binary value: either 0 or 1.
Byte (8 Bits)
A group of 8 bits. It is the basic building block for memory. A single Byte can represent 256 different values (0 to 255).
Numbering Systems
Binary (Base-2)
The language of computers. It uses only 2 digits (0 and 1). Example: 11111111 (which equals 255 in decimal).
Quaternary / Tetra (Base-4)
A system grouping bits into twos. It uses 4 digits (0-3). Every quaternary digit represents exactly two bits. Example: 33 (which equals 15 in decimal).
Octal (Base-8)
An older system grouping bits into threes. It uses 8 digits (0-7). It is rarely used today outside of Linux file permissions. Example: 377.
Decimal (Base-10)
The standard numbering system we use daily. It uses 10 digits (0-9). Example: 255.
Hexadecimal (Base-16)
A compact way to read binary. It uses 16 symbols (0-9, A-F). Two hex digits represent one full byte perfectly. Example: FF.
Data Units Scale
Lesson Notes: Step-by-Step Conversions
⚠️ Pro Tip: Decimal vs. Binary Sizes (KB vs. KiB)
Ever noticed that a 1 Terabyte hard drive only shows up as ~931 Gigabytes in Windows? That is because of how sizes are measured:
• Decimal Scale (SI): Hard drive manufacturers use base-10. 1 KB = 1,000 Bytes.
• Binary Scale (IEC): Operating systems use base-2. 1 KiB (Kibibyte) = 1,024 Bytes.
Windows measures in binary (Gibibytes) but labels it as "GB," causing confusion!
1. Binary to Decimal
Assign powers of 2 (starting from 1 on the far right, and doubling each time: 1, 2, 4, 8, 16, 32, 64, 128) to each bit. Add up the powers where the bit is a 1.
💡 Reverse (Decimal to Binary): Divide the decimal number by 2 repeatedly and write down the remainders from bottom to top!
2. Binary to Hexadecimal
Split the 8 bits perfectly in half into two 4-bit "nibbles". Calculate the decimal value of each nibble independently (from 0 to 15). If a value is between 10 and 15, replace it with a letter (A=10, B=11, C=12, D=13, E=14, F=15).
3. Binary to Quaternary (Base-4)
Split the 8 bits into four 2-bit groups (dyads). Calculate the decimal value of each group independently (from 0 to 3).
4. Binary to Octal
Start from the far right side, and split the bits into groups of three. Calculate the decimal value of each small group (from 0 to 7) independently.
Live Number Converter
Comparison Table
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 8 | 10 |
| 9 | 1001 | 9 | 11 |
| 10 | 1010 | A | 12 |
| 11 | 1011 | B | 13 |
| 12 | 1100 | C | 14 |
| 13 | 1101 | D | 15 |
| 14 | 1110 | E | 16 |
| 15 | 1111 | F | 17 |