Mathematics

Binary Numbers: Base-2 Basics

Binary numbers use a base-2 positional numeral system containing only two digits:

0 and 1

Each binary place represents a power of 2 rather than a power of 10.

For example:

1011₂

means:

1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰

= 8 + 0 + 2 + 1

= 11

Therefore:

1011₂ = 11₁₀

Binary numbers are mathematically ordinary positional numbers. Their importance in computing comes from the fact that two symbols can conveniently represent two physical or logical states.

What Are Binary Numbers?

A binary number is a number written in base 2.

Decimal uses ten possible digits:

0 through 9

Binary uses only:

0 and 1

The subscript 2 can be used to show explicitly that a number is binary:

10101₂

Without a base indicator, a string such as 10101 may be ambiguous because its value depends on the numeral system being used.

The broader principles for moving between base 2 and other positional systems are covered under base conversions.

Binary Place Values

Decimal place values are powers of 10:

…, 10³, 10², 10¹, 10⁰

Binary place values are powers of 2:

…, 2⁵, 2⁴, 2³, 2², 2¹, 2⁰

From right to left, common binary place values are:

PowerValue
2⁰1
2
4
8
2⁴16
2⁵32
2⁶64
2⁷128
2⁸256
2⁹512
2¹⁰1024

A binary digit equal to 1 contributes its place value. A digit equal to 0 contributes nothing.

Example: Read 11001₂

Assign the powers of 2:

1 × 2⁴ + 1 × 2³ + 0 × 2² + 0 × 2¹ + 1 × 2⁰

Calculate:

16 + 8 + 0 + 0 + 1

= 25

Therefore:

11001₂ = 25₁₀

Binary-to-Decimal Formula

If a binary number contains digits:

bₙbₙ₋₁…b₂b₁b₀

where every bᵢ is either 0 or 1, its decimal value is:

N = bₙ2^n + bₙ₋₁2^(n-1) + … + b₂2² + b₁2 + b₀

For example:

101101₂

has:

1 × 2⁵ + 0 × 2⁴ + 1 × 2³ + 1 × 2² + 0 × 2¹ + 1 × 2⁰

= 32 + 8 + 4 + 1

= 45

So:

101101₂ = 45₁₀

Another Binary-to-Decimal Example

Convert:

111010₂

to decimal.

Expand:

1 × 2⁵ + 1 × 2⁴ + 1 × 2³ + 0 × 2² + 1 × 2¹ + 0 × 2⁰

= 32 + 16 + 8 + 0 + 2 + 0

= 58

Therefore:

111010₂ = 58₁₀

Decimal to Binary

To convert a positive decimal integer to binary, repeatedly divide by 2 and record the remainder.

Each remainder must be:

0 or 1

Continue until the quotient reaches zero.

Then read the remainders in reverse order.

Example: Convert 45 to Binary

Start with:

45 ÷ 2 = 22 remainder 1

Then:

22 ÷ 2 = 11 remainder 0

11 ÷ 2 = 5 remainder 1

5 ÷ 2 = 2 remainder 1

2 ÷ 2 = 1 remainder 0

1 ÷ 2 = 0 remainder 1

Read the remainders from bottom to top:

101101₂

Therefore:

45₁₀ = 101101₂

This is the reverse of the earlier conversion.

Decimal to Binary Using Powers of Two

Another method is to express the decimal number as a sum of powers of 2.

Convert:

53₁₀

The largest power of 2 not exceeding 53 is:

32 = 2⁵

Subtract:

53 – 32 = 21

The next usable power is:

16

so:

21 – 16 = 5

The next usable power is:

4

leaving:

1

Finally use:

1

Therefore:

53 = 32 + 16 + 4 + 1

The place values:

32, 16, 8, 4, 2, 1

produce digits:

1, 1, 0, 1, 0, 1

So:

53₁₀ = 110101₂

Zero in Binary

Zero is written:

0₂

Leading zeros do not change an ordinary number’s value:

00101₂ = 101₂

Both represent:

5₁₀

Leading zeros can still matter in fixed-width computer representations, but mathematically they do not change the number.

Counting in Binary

Binary counting follows the same positional principle as decimal counting.

The first few nonnegative integers are:

DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010

When a binary position would exceed 1, it carries into the next position.

That is analogous to decimal carrying after 9.

Why 10₂ Equals 2

The binary number:

10₂

contains:

1 × 2¹ + 0 × 2⁰

Therefore:

10₂ = 2₁₀

The written digits “10” do not always mean decimal ten. Their value depends on the base.

More generally:

10 in base b = b in decimal

Powers of Two

Powers of two appear constantly when working with binary numbers:

2⁰ = 1

2¹ = 2

2² = 4

2³ = 8

2⁴ = 16

2⁵ = 32

2⁶ = 64

2⁷ = 128

2⁸ = 256

2¹⁰ = 1024

Recognizing these values makes both binary-to-decimal and decimal-to-binary conversions faster.

What Is a Bit?

A bit is one binary digit.

It can hold one of two values:

0

or:

1

With one bit, there are:

2¹ = 2

possible patterns.

With two bits:

2² = 4

patterns:

00

01

10

11

With n bits:

Number of possible patterns = 2^n

This exponential growth explains why relatively few bits can encode many distinct combinations.

8-Bit Values

Eight bits provide:

2⁸ = 256

different bit patterns.

For an unsigned interpretation, the smallest value is:

00000000₂ = 0

and the largest is:

11111111₂

which equals:

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1

= 255

Therefore the unsigned 8-bit range is:

0 through 255

The 256 patterns include zero, which is why the maximum value is 255 rather than 256.

n-Bit Unsigned Maximum

With n bits, the greatest unsigned value is:

2^n – 1

because a string of n ones represents:

2^(n-1) + 2^(n-2) + … + 2¹ + 2⁰

This geometric sum equals:

2^n – 1

For 16 bits:

Maximum = 2¹⁶ – 1

= 65,535

Binary Digit Length

For a positive integer N, the number of binary digits required is:

Binary digits = floor(log₂N) + 1

For example:

N = 100

Because:

2⁶ = 64

and:

2⁷ = 128

we have:

64 ≤ 100 < 128

so 100 requires:

7 binary digits

Indeed:

100₁₀ = 1100100₂

The broader relationship between magnitude, logarithms, and digit length is developed under big numbers.

Binary Addition

Binary addition follows ordinary place-value arithmetic with only two digits.

The basic rules are:

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 10₂

The last rule means write 0 in the current column and carry 1 to the next binary place.

Example: 101₂ + 11₂

Arrange the numbers:

101₂ + 011₂

From the right:

1 + 1 = 10₂

Write 0 and carry 1.

Next column:

0 + 1 + 1 carried = 10₂

Again write 0 and carry 1.

Final column:

1 + 0 + 1 carried = 10₂

The result is:

1000₂

Check in decimal:

101₂ = 5

11₂ = 3

and:

5 + 3 = 8

while:

1000₂ = 8

So the binary addition is correct.

Binary Subtraction

Basic binary subtraction includes:

0 – 0 = 0

1 – 0 = 1

1 – 1 = 0

When attempting:

0 – 1

a borrow is needed from the next binary place.

Borrowing one from the next place contributes:

10₂

which equals decimal 2.

Therefore:

10₂ – 1₂ = 1₂

Example: 1010₂ – 0011₂

Convert mentally first:

1010₂ = 10₁₀

0011₂ = 3₁₀

Therefore the answer should represent:

7₁₀

and:

7₁₀ = 111₂

So:

1010₂ – 0011₂ = 0111₂

or without the leading zero:

111₂

Binary Multiplication

Binary multiplication is simple because each digit is 0 or 1:

0 × 0 = 0

0 × 1 = 0

1 × 0 = 0

1 × 1 = 1

Long binary multiplication works like decimal long multiplication, except each partial product is either zero or a shifted copy of the other number.

Multiplication by 2 in Binary

Multiplying a nonnegative integer by 2 shifts its binary representation one place to the left and appends a zero.

For example:

1011₂ = 11₁₀

Multiply by 2:

10110₂

and:

10110₂ = 22₁₀

This works because shifting left multiplies every place value by 2.

Similarly, multiplying by:

2^k

corresponds to shifting left by k binary positions for ordinary nonnegative integer representations.

Division by 2

For even nonnegative binary integers, dividing by 2 shifts the representation one position to the right.

For example:

11000₂ = 24₁₀

Shift right:

1100₂ = 12₁₀

For odd numbers, integer division and a remainder must be considered.

The general quotient-and-remainder principles remain the same as ordinary division.

Even and Odd Binary Numbers

A binary integer’s final digit immediately reveals whether it is even or odd.

If the last bit is:

0

the number is even.

If the last bit is:

1

the number is odd.

Why?

Every binary place except:

2⁰ = 1

is divisible by 2.

Therefore only the final bit determines the remainder after division by 2.

For example:

11010₂

ends in 0, so it is even.

11011₂

ends in 1, so it is odd.

Binary Fractions

Binary positions to the right of the binary point use negative powers of 2:

2^-1 = 1/2

2^-2 = 1/4

2^-3 = 1/8

2^-4 = 1/16

For example:

0.101₂

means:

1 × 1/2 + 0 × 1/4 + 1 × 1/8

= 1/2 + 1/8

= 5/8

= 0.625₁₀

Therefore:

0.101₂ = 0.625₁₀

Mixed Binary Number

Convert:

101.11₂

The integer portion is:

1 × 2² + 0 × 2¹ + 1 × 2⁰

= 4 + 0 + 1

= 5

The fractional portion is:

1 × 2^-1 + 1 × 2^-2

= 1/2 + 1/4

= 0.75

Therefore:

101.11₂ = 5.75₁₀

Decimal Fractions May Repeat in Binary

A decimal fraction that terminates neatly in base 10 may not terminate in base 2.

For example, decimal:

0.1₁₀

has an infinite repeating binary expansion.

This happens because terminating representations depend on the prime factors of the numeral base.

Base 10 contains factors:

2 × 5

while base 2 contains only:

2

Fractions involving powers of 5 in their reduced denominator therefore may terminate in decimal but repeat in binary.

Binary to Octal

Because:

8 = 2³

binary digits can be grouped into sets of three to convert directly to octal.

Convert:

11010110₂

Group from the right:

011 010 110

Then:

011₂ = 3₈

010₂ = 2₈

110₂ = 6₈

Therefore:

11010110₂ = 326₈

Leading zeros added solely to complete a group do not change the value.

Binary to Hexadecimal

Because:

16 = 2⁴

group binary digits in sets of four.

Convert:

10111110₂

Group:

1011 1110

Then:

1011₂ = 11 = B₁₆

1110₂ = 14 = E₁₆

Therefore:

10111110₂ = BE₁₆

Direct grouping is much faster than converting through decimal when working between binary and hexadecimal.

Hexadecimal to Binary

Each hexadecimal digit corresponds to four bits.

For:

7D₁₆

convert:

7 = 0111₂

and:

D = 13 = 1101₂

Therefore:

7D₁₆ = 01111101₂

or without the unnecessary leading zero:

1111101₂

Binary Sequence vs Arithmetic Sequence

Binary counting produces:

0, 1, 10, 11, 100, 101, …

as written digit strings.

Their numerical values are:

0, 1, 2, 3, 4, 5, …

which increase by 1.

However, the visual binary strings themselves should not be analyzed as ordinary decimal terms.

An arithmetic sequence is defined by a constant numerical difference between represented values, not by how their digit strings look.

This distinction is especially important when numbers are written in different bases.

Binary Representation Does Not Change Magnitude

Consider:

11111111₂

and:

255₁₀

They are equal:

11111111₂ = 255₁₀

The binary representation uses eight digits while decimal uses three.

The different lengths do not imply different numerical magnitudes.

They reflect the amount of information each digit position can encode in its respective base.

Negative Binary Numbers

In pure mathematics, a negative binary integer can simply be written with a minus sign:

-101₂

which means:

-5₁₀

Computers often use structured signed encodings instead of storing an ordinary minus symbol. Two’s complement is one common example.

Those encoding conventions depend on a fixed bit width and should not be confused with the underlying base-2 positional value of an unsigned binary string.

Binary Numbers and Computing

Digital systems commonly model two distinguishable states as:

0

and:

1

Groups of bits can represent integers, text codes, colors, machine instructions, logical states, and many other types of data.

The mathematical foundation remains positional notation and powers of 2.

Understanding binary therefore does not require assuming that 0 and 1 have one universal physical meaning; their interpretation depends on the system using them.

Binary Numbers and Combinatorial Scale

Because n bits produce:

2^n

possible patterns, binary representations quickly lead to big numbers.

For example:

32 bits → 2³² = 4,294,967,296 patterns

while:

64 bits → 2⁶⁴ = 18,446,744,073,709,551,616 patterns

Doubling the number of bits does far more than merely double the number of possible patterns because the relationship is exponential.

Common Binary Number Mistakes

Using Digits Other Than 0 or 1

A binary number cannot contain:

2, 3, 4, …

The string:

1021₂

is invalid.

Reading Binary as Decimal

101₂

does not mean decimal 101.

It means:

1 × 4 + 0 × 2 + 1

= 5

Using Powers of 10

Binary place values are powers of 2, not 10.

Reading Repeated-Division Remainders Top to Bottom

When converting a positive decimal integer to binary, read the remainders in reverse order.

Forgetting Zero Positions

A zero bit contributes nothing, but its position remains important.

Thinking 8 Bits Can Represent Only 255 Patterns

Eight bits produce:

256 patterns

The unsigned numerical values run from 0 to 255.

Assuming Every Decimal Fraction Terminates in Binary

Many decimal fractions have repeating binary expansions.

Confusing Binary Representation With Signed Encoding

A bit string’s interpretation can depend on whether it is treated as unsigned, signed, fractional, or another data format.

Worked Binary Numbers Example

Convert:

173₁₀

to binary and verify the result.

Find powers of 2:

128 ≤ 173

Subtract:

173 – 128 = 45

Next use:

32

leaving:

45 – 32 = 13

The 16 place is not used.

Use:

8

leaving:

5

Use:

4

leaving:

1

The 2 place is not used.

Use:

1

Therefore the place values:

128, 64, 32, 16, 8, 4, 2, 1

receive bits:

1, 0, 1, 0, 1, 1, 0, 1

So:

173₁₀ = 10101101₂

Check:

1 × 128 + 0 × 64 + 1 × 32 + 0 × 16 + 1 × 8 + 1 × 4 + 0 × 2 + 1

= 128 + 32 + 8 + 4 + 1

= 173

The conversion is correct.

Frequently Asked Questions

What are binary numbers?

Binary numbers are numbers written in base 2 using only the digits 0 and 1.

What are binary place values?

From right to left, they are powers of 2:

1, 2, 4, 8, 16, 32, 64, …

What is 101₂ in decimal?

101₂ = 1 × 4 + 0 × 2 + 1 = 5₁₀

What is 10₂ in decimal?

10₂ = 2₁₀

How do you convert binary to decimal?

Multiply each bit by its corresponding power of 2 and add the results.

How do you convert decimal to binary?

Repeatedly divide the decimal integer by 2, record each remainder, and read the remainders from last to first.

What is a bit?

A bit is one binary digit that can contain either 0 or 1.

How many values can n bits represent?

There are:

2^n

possible bit patterns.

What is the largest unsigned value in n bits?

2^n – 1

How can you tell whether a binary number is even?

If its final bit is 0, it is even. If its final bit is 1, it is odd.

Can binary numbers contain fractions?

Yes. Positions to the right of the binary point represent negative powers of 2 such as 1/2, 1/4, and 1/8.

Why is binary important?

Binary provides a simple two-symbol positional system and maps naturally to systems that distinguish between two states, making it fundamental to digital computation.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button