ChartsLoom
Back to ChartsLoom

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 Chart showing base-two place values, decimal and hexadecimal conversions, arithmetic rules, signed ranges, bits and bytes

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

10110101₂ = 128 + 32 + 16 + 4 + 1 = 181₁₀

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.

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.
Bit position from rightPower of 2Decimal valueInterpretation
02^01Ones placeOnes place
12^122 binary digits can represent 0–3
22^243 binary digits can represent 0–7
32^38Eight value4 binary digits can represent 0–15
42^4165 binary digits can represent 0–31
52^5326 binary digits can represent 0–63
62^6647 binary digits can represent 0–127
72^7128One byte high bit8 binary digits can represent 0–255
82^82569 binary digits can represent 0–511
92^951210 binary digits can represent 0–1023
102^101,02411 binary digits can represent 0–2047
112^112,04812 binary digits can represent 0–4095
122^124,09613 binary digits can represent 0–8191
132^138,19214 binary digits can represent 0–16383
142^1416,38415 binary digits can represent 0–32767
152^1532,76816 binary digits can represent 0–65535
162^1665,53617 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.

Use this quick chart to compare small decimal values with five-bit and eight-bit binary forms, octal, and hexadecimal.
Decimal5-bit binary8-bit binaryOctalHexadecimal
0000000000000000
1000010000000111
2000100000001022
3000110000001133
4001000000010044
5001010000010155
6001100000011066
7001110000011177
80100000001000108
90100100001001119
1001010Decimal ten in binary0000101012A
11010110000101113B
12011000000110014C
13011010000110115D
14011100000111016E
15011110000111117FHexadecimal F
1610000000100002010
1710001000100012111
1810010000100102212
1910011000100112313
2010100000101002414
2110101000101012515
2210110000101102616
2310111000101112717
2411000000110003018
2511001000110013119
261101000011010321A
271101100011011331B
281110000011100341C
291110100011101351D
301111000011110361E
3111111Largest five-bit unsigned value00011111371F

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.

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.
TaskMethodWorked exampleResult
Binary to decimalAdd place values for the 1 bits110101₂ = 32 + 16 + 4 + 153₁₀Binary-to-decimal result
Decimal to binaryRepeatedly divide by 2 and read remainders upward45 ÷ 2 produces remainders 1, 0, 1, 1, 0, 1101101₂
Binary to hexadecimalGroup from the right in sets of 41011 0110₂ → B 6₁₆B6₁₆
Hexadecimal to binaryReplace each hex digit with 4 bits3A₁₆ → 0011 1010₂00111010₂
Binary fraction to decimalAdd negative-power place values0.101₂ = 1/2 + 0/4 + 1/80.625₁₀Binary fraction result
Decimal fraction to binaryRepeatedly multiply the fraction by 20.625 × 2 → 1.25; 0.25 × 2 → 0.5; 0.5 × 2 → 1.00.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

Fits in 8 bits
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.

Binary arithmetic follows ordinary place-value rules, but each column carries or borrows at 2 instead of 10.
OperationRuleCarry or borrowExample
Addition0 + 0 = 0Carry 01000 + 0000 = 1000
Addition0 + 1 = 1Carry 00100 + 0001 = 0101
Addition1 + 1 = 10Core binary carry ruleWrite 0; carry 10001 + 0001 = 0010
Addition1 + 1 + 1 = 11Write 1; carry 10011 + 0001 = 0100
Subtraction1 − 0 = 1Borrow 01010 − 0000 = 1010
Subtraction1 − 1 = 0Borrow 01011 − 0001 = 1010
Subtraction0 − 1 requires a borrowBorrow 1 from the next active columnBorrow required1000 − 0001 = 0111
MultiplicationMultiply by 0 gives 0No carry1011 × 0 = 0
MultiplicationMultiply by 1 copies the numberShift left for each higher multiplier bit1011 × 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.

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.
WidthUnsigned minimumUnsigned maximumSigned minimumSigned maximum
4 bits015−87
8 bits0255Maximum 8-bit unsigned value−128Minimum 8-bit signed value127
16 bits065,535−32,76832,767
32 bits04,294,967,295−2,147,483,6482,147,483,647
64 bits018,446,744,073,709,551,615−9,223,372,036,854,775,8089,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.

Positions to the right of a binary point use negative powers of two. Each successive place is half the previous place.
Position right of pointPower of 2Exact fractionDecimal value
12^-11/20.5One half
22^-21/40.25
32^-31/80.125One eighth
42^-41/160.0625
52^-51/320.03125
62^-61/640.015625
72^-71/1280.0078125
82^-81/2560.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.

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.
TermSymbolExact valueCommon use
Bitbit or bOne binary digitSmallest logical 0-or-1 unit
ByteB8 bitsEight bits per byteBasic addressable storage unit in common systems
KilobytekB1,000 bytesDecimal storage and data-rate contexts
KibibyteKiB1,024 bytes = 2^10 bytesExact kibibyte valueExact binary multiple
MegabyteMB1,000,000 bytesDecimal storage quantity
MebibyteMiB1,048,576 bytes = 2^20 bytesExact binary multiple
GigabyteGB1,000,000,000 bytesDecimal storage quantity
GibibyteGiB1,073,741,824 bytes = 2^30 bytesExact 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.

  1. National Institute of Standards and TechnologyDefinitions 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.

  2. Python Software FoundationPython 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.

  3. OracleJava 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.