Mathematics & Education · Number systems
Binary Chart for Place Values, Conversions and Arithmetic
Use the chart to read powers of two, convert binary numbers, check small values, perform base-2 arithmetic, interpret fixed-width signed integers, and distinguish bits, bytes, kB, and KiB.
A bit pattern does not identify one universal signed value. State the bit width, signedness, byte order, and numeric format before interpreting stored data.

Binary numbers use powers of two
Binary is a positional base-2 numeral system. The rightmost whole-number place equals 1, and each move left doubles the place value to 2, 4, 8, 16, and beyond. For example, 101101₂ equals 32 + 8 + 4 + 1, so its decimal value is 45.
Numeral base
Base 2
Binary uses two digits, 0 and 1, and each whole-number place is a power of two.
Eight-bit range
0–255
Eight unsigned bits provide 256 patterns and represent values from 0 through 255.
Core carry rule
1 + 1 = 10₂
Binary addition carries to the next column when a column total reaches two.
Byte size
8 bits
A byte normally contains eight bits, but storage prefixes still require careful decimal-versus-binary labeling.
Essential binary answers
What digits does binary use?
Binary uses only 0 and 1 because it is a base-2 numeral system.
What does each binary place mean?
Each whole-number place represents a power of two, starting with 2^0 = 1 on the right.
How do you convert binary to decimal?
Add the power-of-two place values under every 1 bit.
How do you convert decimal to binary?
Divide repeatedly by 2, record the remainders, and read them from bottom to top.
What is decimal 10 in binary?
Decimal 10 is 1010₂ because 8 + 2 = 10.
What is binary 1111 in decimal?
Binary 1111₂ is decimal 15 because 8 + 4 + 2 + 1 = 15.
How many values can eight bits represent?
Eight bits provide 2^8 = 256 distinct bit patterns.
What is the largest unsigned eight-bit value?
The largest unsigned eight-bit value is 255, written as 11111111₂.
Does a leading zero change the value?
A leading zero does not change an unsigned value, but it can show a fixed bit width.
How do binary and hexadecimal connect?
One hexadecimal digit maps exactly to four binary bits.
What does 0.1 mean in binary?
Binary 0.1₂ equals one half, or decimal 0.5.
Are kB and KiB equal?
No. One kB is 1,000 bytes, while one KiB is 1,024 bytes.
Read an eight-bit binary value by place
Start at the right with 1 and double as you move left. Add only the place values whose bits are 1.
Value
128
1
Value
64
0
Value
32
1
Value
16
1
Value
8
0
Value
4
1
Value
2
0
Value
1
1
Binary Place Value Chart
Each position has a value that is twice the position to its right. Multiply each place value by its bit, then add the active values.
Swipe horizontally inside the table to view every column.
| Bit position from right | Power of 2 | Decimal value | Interpretation |
|---|---|---|---|
| 0 | 2^0 | 1 — Ones place | Ones place |
| 1 | 2^1 | 2 | 2 binary digits can represent 0–3 |
| 2 | 2^2 | 4 | 3 binary digits can represent 0–7 |
| 3 | 2^3 | 8 — Eight value | 4 binary digits can represent 0–15 |
| 4 | 2^4 | 16 | 5 binary digits can represent 0–31 |
| 5 | 2^5 | 32 | 6 binary digits can represent 0–63 |
| 6 | 2^6 | 64 | 7 binary digits can represent 0–127 |
| 7 | 2^7 | 128 — One byte high bit | 8 binary digits can represent 0–255 |
| 8 | 2^8 | 256 | 9 binary digits can represent 0–511 |
| 9 | 2^9 | 512 | 10 binary digits can represent 0–1023 |
| 10 | 2^10 | 1,024 | 11 binary digits can represent 0–2047 |
| 11 | 2^11 | 2,048 | 12 binary digits can represent 0–4095 |
| 12 | 2^12 | 4,096 | 13 binary digits can represent 0–8191 |
| 13 | 2^13 | 8,192 | 14 binary digits can represent 0–16383 |
| 14 | 2^14 | 16,384 | 15 binary digits can represent 0–32767 |
| 15 | 2^15 | 32,768 | 16 binary digits can represent 0–65535 |
| 16 | 2^16 | 65,536 | 17 binary digits can represent 0–131071 |
The rightmost whole-number bit has position 0 and value 2^0 = 1.
- • A bit contributes its place value when it is 1 and contributes zero when it is 0.
- • Leading zeros do not change an unsigned value, but they can establish a fixed width.
- • For example, 101101₂ = 32 + 8 + 4 + 1 = 45₁₀.
Download or export
Decimal to Binary Chart from 0 to 31
Use this quick chart to compare small decimal values with five-bit and eight-bit binary forms, octal, and hexadecimal.
Swipe horizontally inside the table to view every column.
| Decimal | 5-bit binary | 8-bit binary | Octal | Hexadecimal |
|---|---|---|---|---|
| 0 | 00000 | 00000000 | 0 | 0 |
| 1 | 00001 | 00000001 | 1 | 1 |
| 2 | 00010 | 00000010 | 2 | 2 |
| 3 | 00011 | 00000011 | 3 | 3 |
| 4 | 00100 | 00000100 | 4 | 4 |
| 5 | 00101 | 00000101 | 5 | 5 |
| 6 | 00110 | 00000110 | 6 | 6 |
| 7 | 00111 | 00000111 | 7 | 7 |
| 8 | 01000 | 00001000 | 10 | 8 |
| 9 | 01001 | 00001001 | 11 | 9 |
| 10 | 01010 — Decimal ten in binary | 00001010 | 12 | A |
| 11 | 01011 | 00001011 | 13 | B |
| 12 | 01100 | 00001100 | 14 | C |
| 13 | 01101 | 00001101 | 15 | D |
| 14 | 01110 | 00001110 | 16 | E |
| 15 | 01111 | 00001111 | 17 | F — Hexadecimal F |
| 16 | 10000 | 00010000 | 20 | 10 |
| 17 | 10001 | 00010001 | 21 | 11 |
| 18 | 10010 | 00010010 | 22 | 12 |
| 19 | 10011 | 00010011 | 23 | 13 |
| 20 | 10100 | 00010100 | 24 | 14 |
| 21 | 10101 | 00010101 | 25 | 15 |
| 22 | 10110 | 00010110 | 26 | 16 |
| 23 | 10111 | 00010111 | 27 | 17 |
| 24 | 11000 | 00011000 | 30 | 18 |
| 25 | 11001 | 00011001 | 31 | 19 |
| 26 | 11010 | 00011010 | 32 | 1A |
| 27 | 11011 | 00011011 | 33 | 1B |
| 28 | 11100 | 00011100 | 34 | 1C |
| 29 | 11101 | 00011101 | 35 | 1D |
| 30 | 11110 | 00011110 | 36 | 1E |
| 31 | 11111 — Largest five-bit unsigned value | 00011111 | 37 | 1F |
Subscripts are omitted inside the table; the column heading identifies each base.
- • The five-bit column covers the complete unsigned range 0–31.
- • The eight-bit column adds leading zeros without changing the value.
- • Every group of three binary digits maps to one octal digit; every group of four maps to one hexadecimal digit.
Download or export
Binary Conversion Methods and Worked Examples
Choose a method that matches the direction of conversion. Place values work well for binary-to-decimal, while repeated division works for decimal-to-binary.
Swipe horizontally inside the table to view every column.
| Task | Method | Worked example | Result |
|---|---|---|---|
| Binary to decimal | Add place values for the 1 bits | 110101₂ = 32 + 16 + 4 + 1 | 53₁₀ — Binary-to-decimal result |
| Decimal to binary | Repeatedly divide by 2 and read remainders upward | 45 ÷ 2 produces remainders 1, 0, 1, 1, 0, 1 | 101101₂ |
| Binary to hexadecimal | Group from the right in sets of 4 | 1011 0110₂ → B 6₁₆ | B6₁₆ |
| Hexadecimal to binary | Replace each hex digit with 4 bits | 3A₁₆ → 0011 1010₂ | 00111010₂ |
| Binary fraction to decimal | Add negative-power place values | 0.101₂ = 1/2 + 0/4 + 1/8 | 0.625₁₀ — Binary fraction result |
| Decimal fraction to binary | Repeatedly multiply the fraction by 2 | 0.625 × 2 → 1.25; 0.25 × 2 → 0.5; 0.5 × 2 → 1.0 | 0.101₂ |
Base subscripts identify the numeral system in each worked example.
- • Pad binary groups with leading or trailing zeros when converting to hexadecimal; the padding does not change the value.
- • Some decimal fractions repeat forever in binary, just as 1/3 repeats in decimal.
- • Check a conversion by converting the result back to the starting base.
Download or export
Browser-only conversion tool
Binary, decimal and hexadecimal converter
Enter an unsigned value, choose a fixed width, and compare its binary, decimal, hexadecimal, octal, and two’s-complement signed interpretations. Inputs stay in the browser.
Converted value
0010 1101
8-bit representation
- Unsigned decimal
- 45
- Signed interpretation
- 45
- Minimal binary
- 101101
- Hexadecimal
- 0x2D
- Octal
- 0o55
- Bit length
- 6
- One bits
- 4
- Width maximum
- 255
The signed result interprets the same 8-bit pattern as two’s complement. Change the width and convert again because signed meaning depends on the exact number of bits.
Binary arithmetic carries and borrows at two
The familiar written algorithms still apply, but the only digits are 0 and 1. A column sum of two becomes 10₂, so you write 0 and carry 1. When subtracting 1 from 0, a borrow contributes 10₂ to the current column.
Binary Addition, Subtraction and Multiplication Rules
Binary arithmetic follows ordinary place-value rules, but each column carries or borrows at 2 instead of 10.
Swipe horizontally inside the table to view every column.
| Operation | Rule | Carry or borrow | Example |
|---|---|---|---|
| Addition | 0 + 0 = 0 | Carry 0 | 1000 + 0000 = 1000 |
| Addition | 0 + 1 = 1 | Carry 0 | 0100 + 0001 = 0101 |
| Addition | 1 + 1 = 10 — Core binary carry rule | Write 0; carry 1 | 0001 + 0001 = 0010 |
| Addition | 1 + 1 + 1 = 11 | Write 1; carry 1 | 0011 + 0001 = 0100 |
| Subtraction | 1 − 0 = 1 | Borrow 0 | 1010 − 0000 = 1010 |
| Subtraction | 1 − 1 = 0 | Borrow 0 | 1011 − 0001 = 1010 |
| Subtraction | 0 − 1 requires a borrow | Borrow 1 from the next active column — Borrow required | 1000 − 0001 = 0111 |
| Multiplication | Multiply by 0 gives 0 | No carry | 1011 × 0 = 0 |
| Multiplication | Multiply by 1 copies the number | Shift left for each higher multiplier bit | 1011 × 10 = 10110 |
All values in this table are binary.
- • A left shift by one place multiplies an unsigned value by 2 when no fixed-width overflow occurs.
- • A right shift of an unsigned value by one place performs integer division by 2 and discards the remainder bit.
- • Fixed-width computer arithmetic can overflow even when the mathematical result is valid.
Download or export
Signed interpretation requires a fixed width
The eight-bit pattern 11111111₂ is 255 when unsigned and −1 when interpreted as two’s complement. Changing the width changes the signed interpretation, so preserve leading bits when a specification defines a fixed field.
Unsigned and Two’s-Complement Integer Ranges
An n-bit unsigned integer ranges from 0 to 2^n − 1. An n-bit two’s-complement integer ranges from −2^(n−1) to 2^(n−1) − 1.
Swipe horizontally inside the table to view every column.
| Width | Unsigned minimum | Unsigned maximum | Signed minimum | Signed maximum |
|---|---|---|---|---|
| 4 bits | 0 | 15 | −8 | 7 |
| 8 bits | 0 | 255 — Maximum 8-bit unsigned value | −128 — Minimum 8-bit signed value | 127 |
| 16 bits | 0 | 65,535 | −32,768 | 32,767 |
| 32 bits | 0 | 4,294,967,295 | −2,147,483,648 | 2,147,483,647 |
| 64 bits | 0 | 18,446,744,073,709,551,615 | −9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 |
Ranges assume fixed-width integer fields with no reserved values.
- • The leftmost bit participates in the value; calling it only a sign bit can hide how two’s complement works.
- • The same bit pattern can mean different numbers when interpreted as unsigned or signed.
- • Language and hardware behavior for overflow must be checked separately.
Download or export
Binary Fraction Place Values
Positions to the right of a binary point use negative powers of two. Each successive place is half the previous place.
Swipe horizontally inside the table to view every column.
| Position right of point | Power of 2 | Exact fraction | Decimal value |
|---|---|---|---|
| 1 | 2^-1 | 1/2 | 0.5 — One half |
| 2 | 2^-2 | 1/4 | 0.25 |
| 3 | 2^-3 | 1/8 | 0.125 — One eighth |
| 4 | 2^-4 | 1/16 | 0.0625 |
| 5 | 2^-5 | 1/32 | 0.03125 |
| 6 | 2^-6 | 1/64 | 0.015625 |
| 7 | 2^-7 | 1/128 | 0.0078125 |
| 8 | 2^-8 | 1/256 | 0.00390625 |
The first fractional place is 2^−1 = 1/2.
- • 0.1₂ equals 0.5₁₀, not one tenth.
- • A finite binary fraction has a denominator that is a power of two after simplification.
- • Values such as 0.1₁₀ generally require repeating binary digits and can be rounded in floating-point storage.
Download or export
Bits, Bytes and Binary Data Units
A bit stores one binary digit. A byte normally contains eight bits. Binary prefixes identify exact powers of 1024, while SI prefixes identify powers of 1000.
Swipe horizontally inside the table to view every column.
| Term | Symbol | Exact value | Common use |
|---|---|---|---|
| Bit | bit or b | One binary digit | Smallest logical 0-or-1 unit |
| Byte | B | 8 bits — Eight bits per byte | Basic addressable storage unit in common systems |
| Kilobyte | kB | 1,000 bytes | Decimal storage and data-rate contexts |
| Kibibyte | KiB | 1,024 bytes = 2^10 bytes — Exact kibibyte value | Exact binary multiple |
| Megabyte | MB | 1,000,000 bytes | Decimal storage quantity |
| Mebibyte | MiB | 1,048,576 bytes = 2^20 bytes | Exact binary multiple |
| Gigabyte | GB | 1,000,000,000 bytes | Decimal storage quantity |
| Gibibyte | GiB | 1,073,741,824 bytes = 2^30 bytes | Exact binary multiple |
Lowercase b denotes bit; uppercase B denotes byte. Prefix symbols are case-sensitive.
- • Do not use KB and KiB as though they were guaranteed to mean the same quantity.
- • Network rates commonly use bits per second, while file sizes commonly use bytes.
- • The binary prefixes kibi, mebi, and gibi were created to state powers-of-two quantities unambiguously.
Download or export
The same bits can represent different kinds of data
Unsigned integer
Every bit contributes a nonnegative place value. An eight-bit pattern ranges from 0 to 255.
Signed integer
A fixed-width two’s-complement interpretation allocates half the patterns to negative values.
Text, color or instruction
Software may treat the bits as character data, pixel channels, flags, machine instructions, or another defined structure.
A binary chart explains numeric place values. It cannot identify the intended data type by itself. Use the file format, protocol, programming-language type, or hardware specification that defines the field.
Common binary mistakes
Reading binary digits as decimal digits
1010₂ means 8 + 2 = 10, not one thousand ten.
Starting place values at 2
The rightmost whole-number position is 2^0 = 1.
Dropping fixed-width context
Leading zeros and sign-extension bits can be essential when interpreting fields.
Calling every 1024-byte quantity a kilobyte
Use KiB for exactly 1,024 bytes and kB for exactly 1,000 bytes.
Assuming every decimal fraction terminates
Fractions such as decimal 0.1 repeat in binary and require rounding in finite storage.
Ignoring overflow
A correct mathematical result may not fit the selected number of bits.
Frequently asked questions
What is a binary number?
A binary number is a base-2 numeral that uses only the digits 0 and 1. Each position represents a power of two.
How do you convert binary to decimal?
Multiply each bit by its power-of-two place value and add the results. For example, 1011₂ equals 8 + 2 + 1 = 11₁₀.
How do you convert decimal to binary?
Repeatedly divide the whole number by 2, record each remainder, and read the remainders from last to first.
What does the 0b prefix mean?
The 0b prefix marks a binary integer literal in languages that support that notation. The prefix is not part of the numeric value.
What is 10 in binary?
Decimal 10 is 1010 in binary because 8 + 2 = 10.
What is 255 in binary?
Decimal 255 is 11111111 in binary, the largest unsigned value that fits in eight bits.
How many values can n bits represent?
An n-bit field has 2^n distinct bit patterns. An unsigned field therefore represents values from 0 through 2^n − 1.
What is a byte?
A byte is normally eight bits. Eight bits provide 256 distinct patterns.
How does binary addition work?
Binary addition carries when a column total reaches 2. The key rule is 1 + 1 = 10₂.
What is two’s complement?
Two’s complement is a fixed-width signed-integer representation. It provides the range −2^(n−1) through 2^(n−1) − 1 for n bits.
Does a leading zero change a binary number?
No. Leading zeros do not change an unsigned numeric value, although they show or enforce a chosen bit width.
What is a binary fraction?
A binary fraction uses powers of two to the right of the point. For example, 0.101₂ equals 1/2 + 1/8 = 0.625₁₀.
Why can 0.1 be inexact in binary?
Decimal 0.1 has a repeating binary expansion, so a finite binary floating-point format must round it.
What is the difference between a bit and a byte?
A bit is one 0-or-1 digit. A byte normally contains eight bits.
Is 1 KiB the same as 1 kB?
No. One KiB is exactly 1,024 bytes, while one kB is exactly 1,000 bytes.
How do binary and hexadecimal relate?
One hexadecimal digit maps exactly to four binary bits. Group binary digits in sets of four from the point outward.
Sources
These technical references support the binary-literal notation, two’s-complement ranges, and exact binary data prefixes used in the charts.
The NIST binary-prefix reference explains why KiB means exactly 2^10 bytes rather than 10^3 bytes. Read the NIST binary-prefix definitions.
National Institute of Standards and Technology — Definitions of the SI Units: The Binary Prefixes
https://physics.nist.gov/cuu/Units/binary.html
Official reference for binary prefixes such as kibi, mebi, and gibi and their exact powers-of-two values.
Python Software Foundation — Python Language Reference: Integer Literals
https://docs.python.org/3/reference/lexical_analysis.html#integer-literals
Official language reference showing binary integer literals with the 0b or 0B prefix and binary digits 0 and 1.
Oracle — Java Tutorials: Primitive Data Types
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
Official technical documentation describing signed integer ranges and two’s-complement representation for common fixed-width types.