Number Format Converter
Convert numbers between binary, decimal, octal, and hexadecimal formats instantly. Essential for computer science, programming, and understanding how computers represent data.
What are the different number systems?
There are four main number systems: Decimal (base 10) uses digits 0-9, used in everyday life. Binary (base 2) uses only 0 and 1, fundamental to computers. Octal (base 8) uses 0-7, sometimes used in computing. Hexadecimal (base 16) uses 0-9 and A-F, common in programming for colors (#FF5733) and memory addresses. Each base represents how many unique digits are available before carrying to the next position.
How do you convert decimal to binary?
To convert decimal to binary, repeatedly divide by 2 and track remainders: 42 ÷ 2 = 21 remainder 0; 21 ÷ 2 = 10 remainder 1; 10 ÷ 2 = 5 remainder 0; 5 ÷ 2 = 2 remainder 1; 2 ÷ 2 = 1 remainder 0; 1 ÷ 2 = 0 remainder 1. Read remainders bottom-to-top: 101010. Each binary digit (bit) represents a power of 2: 32+8+2=42. This is how computers store all data.
What is hexadecimal used for?
Hexadecimal (hex) is widely used in computing: Color codes in web design (#FF0000 = red, where FF=255); Memory addresses in programming; MAC addresses for network devices; RGB color values; File formats and data representation. Hex is compact - one hex digit represents 4 binary digits (bits). For example, F in hex = 1111 in binary = 15 in decimal. This makes hex much shorter and easier to read than binary.
How do you read binary numbers?
Binary numbers are read right-to-left with each position representing a power of 2. Example: 101010 = (1×32) + (0×16) + (1×8) + (0×4) + (1×2) + (0×1) = 32+8+2 = 42. Positions from right: 2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128, 2⁸=256, etc. A byte (8 bits) can represent 0-255. Computers use binary because transistors have two states: on (1) or off (0).