Binary Translator
Convert text to binary and binary back to text with ASCII, decimal, and hex reference.
Understanding Binary — The Language of Computers
Binary is the base-2 number system that uses only two digits — 0 and 1 — and forms the absolute foundation of all digital computing. Every transistor inside a processor chip is either switched off (representing 0) or switched on (representing 1). A single binary digit is called a bit; eight bits together form a byte, the standard unit of data storage. This elegant simplicity maps directly to the physical electronic states inside hardware, making binary the most reliable and efficient foundation for data storage, transmission, and processing.
ASCII Encoding — How Characters Map to Binary
The American Standard Code for Information Interchange (ASCII), standardised in 1963, assigns a unique number between 0 and 127 to each printable character and a set of control codes. The capital letter A is assigned decimal 65, which is 01000001 in binary. Lowercase a is decimal 97, or 01100001. The digit 0 (as a character) is decimal 48, or 00110000. This consistent mapping means that any ASCII text can be reliably encoded as a sequence of 8-bit binary groups and decoded by any system that knows the standard.
Unicode and UTF-8
ASCII covers only 128 characters — sufficient for English but inadequate for the world's languages. Unicode addresses this by assigning unique code points to more than 140,000 characters across all human writing systems, including emoji. UTF-8 is the dominant Unicode encoding on the web; it uses variable-length sequences of one to four bytes. ASCII characters still occupy exactly one byte under UTF-8, preserving backward compatibility.
Binary in Network Protocols
Network protocols are defined at the bit level, and reading them requires binary fluency. The IPv4 header contains a Flags field where individual bits control fragmentation. The TCP header carries six control bits — URG, ACK, PSH, RST, SYN, and FIN — packed into a single byte alongside reserved bits. IPv4 addresses themselves are 32-bit binary values split into four octets for human readability. For example, 192.168.1.1 in binary is 11000000.10101000.00000001.00000001.
Bitwise Operations in Security
Bitwise operations — AND, OR, XOR, and NOT — manipulate individual bits and are fundamental to security engineering. A bitmask is a binary pattern used with these operators to test, set, or clear specific flags. XOR is the cornerstone of many encryption schemes: in a one-time pad, each bit of plaintext is XORed with a corresponding key bit, producing ciphertext that is theoretically unbreakable. Unix and Linux file permission bits are a familiar application of bitmasks.
Binary in Cybersecurity Analysis
Cybersecurity analysts regularly work with binary data at the byte level. Reverse engineering malware requires reading binary file headers to identify the executable format. Shellcode analysis involves reading raw binary sequences to reconstruct instruction mnemonics. Network forensics often requires inspecting binary packet payloads to recover transferred files or detect covert channels. Capture The Flag (CTF) competitions routinely encode clues in pure binary strings.
IPv4 Subnet Masks in Binary
CIDR (Classless Inter-Domain Routing) notation expresses subnet masks as a prefix length — the number of leading 1-bits in the 32-bit mask. A /24 prefix means 24 bits set to 1, giving the mask 11111111.11111111.11111111.00000000, or 255.255.255.0 in dotted-decimal. To find the network address, perform a binary AND between the host IP and the subnet mask.