The team behind OnlineTools4Free — building free, private browser tools.
Published Mar 15, 2026 · 8 min read · Reviewed by OnlineTools4Free
The Binary Number System: A Beginner's Guide
What Is Binary?
Binary is a number system that uses only two digits: 0 and 1. Every number, letter, image, and instruction inside a computer is ultimately represented in binary. It is the native language of digital electronics.
We use the decimal system (base-10) in everyday life because we have ten fingers. Computers use binary (base-2) because their fundamental building blocks — transistors — have two states: on (1) and off (0). A transistor does not know about the number 7 or the letter A. It only knows voltage-high and voltage-low.
Each binary digit is called a bit. Eight bits make a byte, which can represent 256 different values (2^8). A byte is the standard unit for storing a single character, a pixel channel, or a small number.
Binary to Decimal Conversion
Each position in a binary number represents a power of 2, starting from the right at 2^0:
1 0 1 1 0 1
32 16 8 4 2 1
To convert, add the values of positions where there is a 1: 32 + 8 + 4 + 1 = 45. So 101101 in binary equals 45 in decimal.
Going the other direction (decimal to binary), repeatedly divide by 2 and track the remainders:
- 45 / 2 = 22 remainder 1
- 22 / 2 = 11 remainder 0
- 11 / 2 = 5 remainder 1
- 5 / 2 = 2 remainder 1
- 2 / 2 = 1 remainder 0
- 1 / 2 = 0 remainder 1
Read the remainders from bottom to top: 101101.
Binary Arithmetic
Addition
Binary addition follows the same logic as decimal addition, but you carry at 2 instead of 10:
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 1 + 1 = 11 (write 1, carry 1)
Example: 1011 + 1101 = 11000 (11 + 13 = 24 in decimal).
Subtraction and Negative Numbers
Computers represent negative numbers using a scheme called two's complement. To negate a binary number, flip all bits and add 1. This turns subtraction into addition, which means the processor needs only one circuit for both operations. The leftmost bit serves as the sign: 0 for positive, 1 for negative.
The Hexadecimal Connection
Long binary strings are hard to read. 11111111 is much less readable than its decimal equivalent 255 or its hexadecimal equivalent FF. Hexadecimal (base-16) groups four binary digits into a single hex digit, making binary values compact and human-readable.
Hex digits: 0-9 then A-F (A=10, B=11, C=12, D=13, E=14, F=15).
0000= 01010= A1111= F
This is why colors in CSS use hex: #FF5733 is three bytes (red=FF, green=57, blue=33) where each byte is an 8-bit binary value.
How Computers Use Binary
- Text: ASCII maps characters to 7-bit binary values (A = 1000001, B = 1000010). UTF-8 extends this to support every writing system using variable-length encoding of 1-4 bytes.
- Images: Each pixel is typically three bytes (red, green, blue), each ranging from 00000000 (0, no color) to 11111111 (255, full intensity). A 1920x1080 image is 6,220,800 bytes of binary data.
- Instructions: CPU instructions are binary opcodes. An x86 ADD instruction might be encoded as specific bit patterns that the processor decodes and executes billions of times per second.
- Networking: IP addresses (IPv4) are 32-bit binary numbers. 192.168.1.1 is actually
11000000.10101000.00000001.00000001.
Convert Binary Online
Our Binary Translator converts between binary, decimal, hexadecimal, and text instantly. Paste a binary string and see the decimal, hex, and ASCII text equivalents. Or type text and see its binary representation. Everything runs locally in your browser.
Binary Translator
Convert text to binary, hex, octal, and decimal representations and back.
OnlineTools4Free Team
The OnlineTools4Free Team
We are a small team of developers and designers building free, privacy-first browser tools. Every tool on this platform runs entirely in your browser — your files never leave your device.
