Number System Converter
Convert number systems.
주요 진법 변환
Overview
Convert between decimal (base-10), binary (base-2), octal (base-8), and hexadecimal (base-16) number systems. Essential for programming, computer science, and digital electronics.
Formula
Decimal to Binary: divide by 2, record remainders (reverse order) Decimal to Hex: divide by 16, record remainders (reverse order) Binary to Decimal: sum each digit × 2^(position) Hex to Decimal: sum each digit × 16^(position) Hex digits: A=10, B=11, C=12, D=13, E=14, F=15 Example: (255)₁₀ = (FF)₁₆ = (11111111)₂ = (377)₈
How to Use
- 1Enter the number to convert.
- 2Select the source base (binary, octal, decimal, hexadecimal).
- 3Select the target base.
- 4View the converted result.
Tips
- ✔In hexadecimal, A-F represent 10-15.
- ✔Common programming prefixes: 0b (binary), 0o (octal), 0x (hex).
- ✔CSS/HTML color codes (e.g., #FF0000) are RGB values in hexadecimal.
- ✔Each IP address octet (0-255) is an 8-bit binary number.
- ✔The maximum value of 1 byte (8 bits) is binary 11111111 = decimal 255 = hex FF.
FAQ
Q. Why is hexadecimal commonly used in programming?
Hexadecimal represents 4 binary digits with a single character, making binary data much more compact and readable. For example, binary 11111111 (8 digits) becomes hex FF (2 digits).
Q. How are negative numbers represented in binary?
Computers typically use two's complement. The most significant bit (MSB) indicates the sign: 0 for positive, 1 for negative. For 8-bit: -1 = 11111111₂ = FF₁₆.
Q. Where is octal used?
Octal is used in Unix/Linux file permissions (e.g., chmod 755). Each digit represents 3 bits, mapping to rwx permissions (r=4, w=2, x=1).
Related Calculators
Length Converter
Convert between cm, m, km, inch, ft, mile and more.
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin.
Weight Converter
Convert between kg, g, lb, oz and more.
Data Size Converter
Convert between B, KB, MB, GB, TB and more.
Area Converter
Convert between ㎡, pyeong, acres, hectares and more.
Volume Converter
Convert between mL, L, gallons, cups and more.