> >Binary to Decimal Converter
Binary to Decimal Converter
Convert binary numbers (base-2) to decimal (base-10), hex (base-16), and octal (base-8). Includes step-by-step calculation.
Binary Number
Conversion Result
Decimal: 13
Hexadecimal: D
Octal: 15
Step-by-step calculation:
1 × 2^3 = 8
1 × 2^2 = 4
0 × 2^1 = 0
1 × 2^0 = 1
Sum: 8 + 4 + 0 + 1 = 13
Related Tools
External Resources
Frequently Asked Questions
- How do I convert binary to decimal?
- To convert binary to decimal, multiply each binary digit (0 or 1) by 2 raised to the power of its position (from right, starting at 0), then sum all results. For example, 1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13.
- What is the binary number system?
- Binary is a base-2 number system that uses only two digits: 0 and 1. It is the foundation of all digital computing and electronics. Each binary digit is called a "bit". Computers use binary because it maps naturally to electronic circuit states (on/off, high/low voltage).
- What is the decimal equivalent of 11111111 binary?
- 11111111₂ = 255 in decimal. This is because it represents all 8 bits set to 1: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. This is the maximum value for a single byte (8 bits).
- How do I convert binary to hex?
- Group binary digits into sets of 4 (from right to left). Convert each group to its hexadecimal equivalent (0000=0, 0001=1, ..., 1111=F). For example, 11011110₂ = 1101 1110 = DE in hex. This converter shows both decimal and hex results.
- What is the difference between binary, decimal, and octal?
- Binary (base-2): uses digits 0-1. Decimal (base-10): uses digits 0-9 (standard number system). Octal (base-8): uses digits 0-7. Each system represents numbers differently. For example, decimal 15 = binary 1111 = octal 17 = hex F.
- What is the binary representation of numbers?
- Each binary place value represents a power of 2. From right: 2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128, etc. A 1 in a position means that power of 2 is included; a 0 means it is not. The sum of all included powers gives the decimal value.
- How do computers use binary numbers?
- Computers use binary for all operations: data storage (memory bits), processing (logic gates), networking (protocol bits), and file formats (binary encoding). Everything in a computer is ultimately represented as sequences of 0s and 1s.
- What is binary-coded decimal (BCD)?
- BCD encodes each decimal digit (0-9) as a 4-bit binary number. For example, decimal 42 becomes 0100 0010 in BCD. BCD is used in some calculators and systems that need precise decimal representation, unlike pure binary which can have rounding errors.
- How do I convert a fraction from binary to decimal?
- For binary fractions (after the binary point), each position represents a negative power of 2: 2⁻¹=0.5, 2⁻²=0.25, 2⁻³=0.125, etc. For example, 0.101₂ = 1×0.5 + 0×0.25 + 1×0.125 = 0.625 in decimal.
- What is the largest binary number an 8-bit system can represent?
- An 8-bit system can represent binary 11111111₂ = 255 in decimal (unsigned). For signed numbers (two's complement), the range is -128 to 127. This converter handles arbitrarily long binary numbers.
- How do I convert binary to decimal in Python?
- Use int("1010", 2) to convert binary string to decimal integer in Python. The second argument is the base (2 for binary). Python also supports binary literals: 0b1010 = 10. For the reverse: bin(10) = "0b1010".
- What is the binary number for 100 in decimal?
- 100 in decimal = 1100100 in binary. This is calculated as: 64 + 32 + 4 = 100, which corresponds to 2⁶ + 2⁵ + 2² = 1100100₂.
- How do I convert hex to binary?
- Convert each hex digit to its 4-bit binary equivalent: 0=0000, 1=0001, ..., F=1111. For example, hex 2F = 0010 1111 in binary. Drop leading zeros for the final result: 101111₂.
- What is the decimal equivalent of binary 101010?
- 101010₂ = 42 in decimal. Calculation: 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 32 + 8 + 2 = 42. This is famously known as the "Answer to the Ultimate Question of Life, the Universe, and Everything" in Douglas Adams' Hitchhiker's Guide to the Galaxy.
- How do I use binary numbers in programming?
- In most languages, binary literals use prefix 0b (0b1010 = 10). Bitwise operators (AND &, OR |, XOR ^, NOT ~, shifts << >>) operate on binary representations. Understanding binary is essential for low-level programming, optimizations, and hardware interfacing.
- What is an unsigned vs signed binary number?
- Unsigned binary represents only non-negative numbers (0 to 2ⁿ-1). Signed binary (using two's complement) can represent negative numbers. For 8-bit: unsigned range is 0-255, signed range is -128 to 127. The most significant bit indicates sign in signed representation.
- How do I convert binary to decimal using a calculator?
- Each binary digit from right to left represents 2^position. Start at 1 (2^0) and double for each position left. Add the values where the binary digit is 1. This converter automatically shows the step-by-step calculation.
- What is the binary number for 255?
- 255 in decimal = 11111111 in binary (all 8 bits set to 1). This is the maximum value of a byte. In hex, this is FF. In octal, it is 377. This value is commonly used in networking for subnet masks and in image processing for maximum color intensity.
- How do I convert IP addresses between binary and decimal?
- IP addresses are 32-bit numbers divided into 4 octets (8 bits each). Each octet converts to decimal 0-255. For example, 192.168.1.1 = 11000000.10101000.00000001.00000001. This converter handles binary to decimal for each octet.
- What is the binary number system used for in networking?
- Networking uses binary for IP addresses, subnet masks, MAC addresses, and protocol headers. Understanding binary is essential for subnetting, CIDR notation, and network troubleshooting. Each octet in an IP address is an 8-bit binary number.
- How do I count in binary?
- Counting in binary: 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111... The pattern follows powers of 2. After 1 comes 10 (like after 9 comes 10 in decimal, but in binary after 1 comes 10).
- What is the binary representation of negative numbers?
- Negative numbers in binary use two's complement. To get the two's complement: invert all bits (1s complement) and add 1. For example, -5 in 8-bit: 5 = 00000101, invert = 11111010, add 1 = 11111011. The most significant bit (1) indicates negative.
- How do I add binary numbers?
- Binary addition follows: 0+0=0, 0+1=1, 1+0=1, 1+1=0 with carry 1. Align digits right, add column by column, carrying when needed. Example: 101 + 011 = 1000 (5 + 3 = 8). Carry propagation is fundamental to computer arithmetic circuits.
- What is a bit, byte, and word in binary?
- A bit is a single binary digit (0 or 1). A byte is 8 bits. A word is the natural data unit for a processor (typically 16, 32, or 64 bits). Nibble is 4 bits (half byte). These units define how computers organize and process binary data.
- How do I convert octal to binary?
- Each octal digit (0-7) converts to 3 binary digits. For example, octal 7 = 111 binary, octal 3 = 011 binary. Octal 73 = 111 011 = 111011 binary. This converter shows binary, decimal, hex, and octal results simultaneously.
- What is the decimal value of the binary number 1000?
- 1000₂ = 8 in decimal. This is 2³ = 8. In binary, 1000 is a significant number because it is a power of 2 (2³). Powers of 2 in binary always have a single 1 followed by zeros.
- How do I convert a large binary number to decimal?
- Start from the rightmost bit (least significant), multiply each 1 by its position's power of 2, and sum. For very large numbers, use this converter or a programming calculator. Modern computers handle binary numbers up to 64 bits (or more) natively.
- What is the relationship between binary and hexadecimal?
- Hexadecimal (base-16) is closely related to binary because each hex digit represents exactly 4 binary bits (a nibble). This makes hex a convenient shorthand for binary. For example, 1111 1010 1100 1101₂ = FACD₁₆. Programmers often use hex as a more readable binary representation.
- How do I check if a binary number is odd or even?
- In binary, the least significant bit (rightmost) determines odd/even. If the last bit is 1, the number is odd. If it is 0, the number is even. For example, 1011₂ (11) is odd because the last bit is 1. 1100₂ (12) is even because the last bit is 0.
- What are bitwise operations in binary?
- Bitwise operations manipulate individual bits: AND (&) returns 1 if both bits are 1, OR (|) returns 1 if either bit is 1, XOR (^) returns 1 if bits differ, NOT (~) flips all bits. Left shift (<<) multiplies by 2, right shift (>>) divides by 2 (for unsigned).
- How do I convert binary fractions to decimal?
- After the binary point, each position represents 1/2ⁿ. For 0.1101₂: 1×0.5 + 1×0.25 + 0×0.125 + 1×0.0625 = 0.8125 decimal. Not all decimal fractions can be represented exactly in binary (e.g., 0.1 in decimal is a repeating binary fraction).
- What is the binary number system used for in digital electronics?
- Digital circuits use binary for logic gates (AND, OR, NOT, NAND, NOR, XOR), flip-flops (memory elements), registers, counters, multiplexers, and arithmetic logic units (ALUs). The two voltage levels (high/low) naturally represent 1 and 0.
- How do I convert ASCII text to binary?
- Each ASCII character has a decimal code (0-127) which converts to a 7-bit (or 8-bit with parity) binary number. For example, A = 65 = 1000001₂. Each character in a text string converts to its binary equivalent, giving the overall binary representation.