Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal. See the value in all 4 bases at once.
= 42 in decimal
Binary (Base 2)
0b101010
Octal (Base 8)
0o52
Hexadecimal (Base 16)
0x2A
Binary (grouped in 4-bit nibbles)
0010
2
1010
A
Quick examples
About the Number Base Converter
Computers operate in binary (base-2), but humans prefer decimal (base-10). Hexadecimal (base-16) is used in programming for memory addresses, color codes, and low-level data representation. Octal (base-8) appears in Unix file permissions. This converter handles all common number bases and shows the step-by-step conversion - essential for computer science students and programmers working close to the hardware.
Number Base Conversion
Decimal to binary: divide repeatedly by 2, read remainders bottom-up · Binary to decimal: sum of (bit × 2^position)
Binary digits: 0, 1 · Octal digits: 0-7 · Hexadecimal: 0-9, A(10), B(11), C(12), D(13), E(14), F(15) · 1 hex digit = 4 binary digits (nibble) · FF hex = 255 decimal = 11111111 binary
Worked Example
HTML color code #FF6B35 - what are the RGB decimal values?
RGB(255, 107, 53) - a vibrant orange · Binary FF = 11111111 · Binary 6B = 01101011
Tips & Insights
- 1
Unix file permissions 755 (octal) = 111 101 101 (binary) = read/write/execute for owner, read/execute for group and others.
- 2
IP addresses are 32-bit binary numbers typically shown as 4 decimal octets (192.168.1.1).
- 3
Hexadecimal makes binary more readable: every two hex digits = one byte = 8 bits.
Why this matters for you
Computer science students encounter multiple number bases in every hardware and low-level programming course. Exam questions on binary, hex, and octal conversions are common in BCA, B.Tech CS, and GATE CS curriculum. Beyond academics, programmers who understand hex and binary work more confidently with memory, protocols, and color systems.
Related Calculators
Scientific
Full scientific calculator with trigonometry, logarithms, powers, and constants. Supports both DEG and RAD modes.
Fractions
Add, subtract, multiply, and divide fractions. Get simplified results, mixed numbers, and step-by-step working.
GCD & LCM
Find the Greatest Common Divisor and Least Common Multiple of two or more numbers with step-by-step working.