Search
Menu

Binary Calculator | Hex to Binary, Decimal Converter

Trace carries in base two and verify the result by converting both sides to decimal.

Quick Answer

Binary-coded decimal stores each decimal digit in its own four-bit block. For example, 395 becomes 0011 1001 0101 in BCD, while converting the whole number to binary produces 110001011.

Counters arranged in binary place-value columns

Binary Calculator – Binary to Decimal, Hex, Octal Converter with Steps

Calculate binary addition, subtraction, multiplication with this comprehensive binary calculator. Convert between binary, decimal, hexadecimal, and octal number systems instantly. Perform binary operations (add, subtract, multiply), convert hex to binary, binary to decimal with step-by-step solutions. Supports signed binary numbers, two's complement, binary coded decimal (BCD), ASCII conversion, and binary logarithm calculations. Perfect for computer science students, programmers, and digital electronics enthusiasts.

Binary Arithmetic Calculator

Add, subtract, multiply binary numbers

Enter binary digits (0 and 1)
Select arithmetic operation
Enter binary digits (0 and 1)

Binary Arithmetic Result

Result (Binary)
10001
Result (Decimal)
17

Step-by-Step Solution:

Binary Decimal Converter

Convert between binary and decimal

Select conversion direction
Binary or decimal number

Conversion Result

Input
10110101
Output
181

Conversion Steps:

Hexadecimal Binary Converter

Convert between hex and binary

Select conversion direction
Hex (0-9, A-F) or Binary

Hex-Binary Conversion

Binary
00101111
Hexadecimal
2F
Decimal
47

Conversion Method:

Octal Binary Converter

Convert between octal and binary

Select conversion direction
Octal (0-7) or Binary

Octal-Binary Conversion

Binary
101111
Octal
57
Decimal
47

Conversion Method:

⚙ Advanced Binary Tools

Signed binary, complement, BCD converter

Select tool
Binary number or decimal
For signed/complement operations

Advanced Result

Result
11110110

Explanation:

Understanding Binary Number System

The binary number system (base-2) is a positional numeral system that uses only two digits: 0 and 1. It is the foundation of all digital computers and electronics. Each digit position represents a power of 2, making it fundamentally different from our everyday decimal (base-10) system. Binary is essential for computer science, digital logic, programming, and electronics engineering.

Binary to Decimal Conversion

Converting binary to decimal involves multiplying each binary digit by its positional value (power of 2) and summing the results.

Binary to Decimal Formula:

Decimal = Σ (digit × 2^position)

Where:

  • digit = Binary digit (0 or 1)
  • position = Position from right (starting at 0)
  • Σ = Sum of all terms

Example: Convert 10110101 (binary) to decimal

Step 1: Write positional values (right to left, starting from 0)

Position: 7 6 5 4 3 2 1 0

Binary: 1 0 1 1 0 1 0 1

Power: 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰

Step 2: Calculate each position

Position 0: 1 × 2⁰ = 1 × 1 = 1

Position 1: 0 × 2¹ = 0 × 2 = 0

Position 2: 1 × 2² = 1 × 4 = 4

Position 3: 0 × 2³ = 0 × 8 = 0

Position 4: 1 × 2⁴ = 1 × 16 = 16

Position 5: 1 × 2⁵ = 1 × 32 = 32

Position 6: 0 × 2⁶ = 0 × 64 = 0

Position 7: 1 × 2⁷ = 1 × 128 = 128

Step 3: Sum all values

128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 = 181

Result: 10110101₂ = 181₁₀

Decimal to Binary Conversion

Converting decimal to binary uses the division-by-2 method (successive division) or subtraction method.

Decimal to Binary Formula (Division Method):

Divide by 2, record remainders (bottom to top)

Algorithm:

  • 1. Divide decimal number by 2
  • 2. Record remainder (0 or 1)
  • 3. Use quotient for next division
  • 4. Repeat until quotient = 0
  • 5. Read remainders bottom-to-top

Example: Convert 181 (decimal) to binary

Division Method:

181 ÷ 2 = 90 remainder 1 (LSB - least significant bit)

90 ÷ 2 = 45 remainder 0

45 ÷ 2 = 22 remainder 1

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 (MSB - most significant bit)

Read from bottom to top: 10110101

Result: 181₁₀ = 10110101₂

Verification: 128 + 32 + 16 + 4 + 1 = 181 ✓

Binary Addition Calculator

Binary addition follows rules similar to decimal addition, but with only two digits (0 and 1). When sum exceeds 1, we carry to the next position.

Binary Addition Rules

  • 0 + 0 = 0 (no carry)
  • 0 + 1 = 1 (no carry)
  • 1 + 0 = 1 (no carry)
  • 1 + 1 = 10 (write 0, carry 1)
  • 1 + 1 + 1 (with carry) = 11 (write 1, carry 1)

Example: 1011 + 110

  1011 (11 in decimal)
+ 0110 (6 in decimal)
------

Step-by-step (right to left):

Position 0: 1 + 0 = 1

Position 1: 1 + 1 = 10 (write 0, carry 1)

Position 2: 0 + 1 + 1(carry) = 10 (write 0, carry 1)

Position 3: 1 + 0 + 1(carry) = 10 (write 0, carry 1)

Position 4: 1(carry) = 1

Result: 10001 (17 in decimal)

Verification: 11 + 6 = 17 ✓

Binary Subtraction Calculator

Binary subtraction can be performed using direct subtraction or two's complement addition (preferred in computers).

Binary Subtraction Rules (Direct Method)

  • 0 - 0 = 0
  • 1 - 0 = 1
  • 1 - 1 = 0
  • 0 - 1 = 1 (borrow 1) → 10 - 1 = 1

Example: 1011 - 110

  1011 (11 in decimal)
- 0110 (6 in decimal)
------

Step-by-step:

Position 0: 1 - 0 = 1

Position 1: 1 - 1 = 0

Position 2: 0 - 1 = need borrow → 10 - 1 = 1

Position 3: 1 - 0 - 1(borrowed) = 0

Result: 0101 = 101 (5 in decimal)

Verification: 11 - 6 = 5 ✓

Hexadecimal to Binary Conversion

Each hexadecimal digit converts to exactly 4 binary bits (nibble). This makes hex-binary conversion very straightforward.

Hex to Binary Mapping

Hex Binary (4-bit) Decimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
A101010
B101111
C110012
D110113
E111014
F111115

Example: Convert 2F (hex) to binary

Step 1: Convert each hex digit separately

2 (hex) → 0010 (binary)

F (hex) → 1111 (binary)

Step 2: Concatenate the binary groups

Result: 2F₁₆ = 00101111₂ = 47₁₀

Octal to Binary Conversion

Each octal digit converts to exactly 3 binary bits. Octal is often used as shorthand for binary in computing.

Octal to Binary Mapping

Octal Binary (3-bit) Decimal
00000
10011
20102
30113
41004
51015
61106
71117

Example: Convert 57 (octal) to binary

Step 1: Convert each octal digit

5 (octal) → 101 (binary)

7 (octal) → 111 (binary)

Step 2: Concatenate

Result: 57₈ = 101111₂ = 47₁₀

Signed Binary Numbers

Signed binary numbers represent both positive and negative values using different methods:

Sign-Magnitude Representation

MSB (Most Significant Bit) = sign bit (0 = positive, 1 = negative). Remaining bits = magnitude.

Two's Complement (Most Common)

Standard method for signed integers in computers. Range: -2^(n-1) to 2^(n-1)-1 for n bits.

Two's Complement Steps:

  • 1. One's complement: Invert all bits (0→1, 1→0)
  • 2. Add 1 to the result

Example: -10 in 8-bit two's complement

Step 1: Convert +10 to binary

10₁₀ = 00001010₂

Step 2: One's complement (invert bits)

11110101

Step 3: Add 1

11110101 + 1 = 11110110

Result: -10₁₀ = 11110110₂ (8-bit two's complement)

Verification (convert back):

MSB = 1 → negative number

Invert: 00001001, Add 1: 00001010 = 10 → -10 ✓

Frequently Asked Questions

How do you calculate binary to decimal?
Multiply each binary digit by 2 raised to its position (counting from right, starting at 0), then sum all values. Formula: Σ(digit × 2^position). Example: 1011₂ = (1×2³)+(0×2²)+(1×2¹)+(1×2⁰) = 8+0+2+1 = 11₁₀. Position 0 (rightmost) = 1×1=1, Position 1 = 1×2=2, Position 2 = 0×4=0, Position 3 = 1×8=8. Total = 11. Each position represents a power of 2: ...2⁵(32), 2⁴(16), 2³(8), 2²(4), 2¹(2), 2⁰(1). Only add values where bit is 1.
How do you convert decimal to binary step by step?
Use division-by-2 method: 1) Divide decimal by 2, 2) Record remainder (0 or 1), 3) Use quotient for next division, 4) Repeat until quotient = 0, 5) Read remainders bottom-to-top. Example: 13₁₀ to binary: 13÷2=6 rem 1, 6÷2=3 rem 0, 3÷2=1 rem 1, 1÷2=0 rem 1. Reading bottom-to-top: 1101₂. Alternatively, subtract largest power of 2: 13-8=5 (1), 5-4=1 (1), 1-2=can't (0), 1-1=0 (1) → 1101. Verify: 8+4+0+1=13✓. For fractions, multiply fractional part by 2, record integer part, repeat with new fraction.
How to add binary numbers?
Follow rules: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (write 0 carry 1), 1+1+1=11 (write 1 carry 1). Add right-to-left like decimal. Example: 1011+110: Align right: 1011+0110. Position 0: 1+0=1. Position 1: 1+1=0 carry 1. Position 2: 0+1+1(carry)=0 carry 1. Position 3: 1+0+1(carry)=0 carry 1. Position 4: 1(carry)=1. Result: 10001₂ (17₁₀). Verify: 11+6=17✓. Key: Carry propagates left. For multiple numbers, add first two, then add result to third, etc. Watch for overflow in fixed-width systems.
What is hexadecimal to binary conversion?
Each hex digit converts to exactly 4 binary bits (nibble). Hex digits: 0-9, A(10), B(11), C(12), D(13), E(14), F(15). Conversion: Replace each hex digit with its 4-bit binary equivalent. Example: A3F₁₆: A→1010, 3→0011, F→1111 = 101000111111₂. Reverse (binary to hex): Group binary into 4-bit chunks from right, pad left with zeros if needed. Example: 11010110₂ = 1101 0110 = D6₁₆. Common uses: Memory addresses, color codes (#FF00AA), assembly programming. Advantage: Compact representation (1 hex = 4 binary). Quick reference: 0=0000, 1=0001...8=1000, 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111.
What is two's complement binary?
Two's complement is standard method for representing signed integers in computers. Process: 1) One's complement (invert all bits: 0→1, 1→0), 2) Add 1. Range for n-bit: -2^(n-1) to 2^(n-1)-1. 8-bit range: -128 to +127. Example: -5 in 8-bit: +5 = 00000101, Invert = 11111010, Add 1 = 11111011 = -5. MSB indicates sign: 0=positive, 1=negative. Advantages: Single representation for zero, arithmetic works same for signed/unsigned, easy negation (two's complement). To decode: If MSB=1, take two's complement to find magnitude, add negative sign. Used in: All modern CPUs, programming languages (int, long types). Alternative: Sign-magnitude (less common).
How to convert binary to hexadecimal?
Group binary into 4-bit chunks from right to left, pad left with zeros if needed, convert each group to hex digit. Example: 11010110₂: Group: 1101 0110. Convert: 1101=D, 0110=6. Result: D6₁₆. Another: 10111₂: Pad left: 0001 0111. Convert: 0001=1, 0111=7. Result: 17₁₆. Quick conversion table: 0000=0, 0001=1, 0010=2, 0011=3, 0100=4, 0101=5, 0110=6, 0111=7, 1000=8, 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. Benefits: Shorter representation (4x compression), easier to read/write than long binary strings, commonly used in: IP addresses, MAC addresses, color codes, memory dumps, low-level programming.
What is binary coded decimal (BCD)?
BCD represents each decimal digit (0-9) as 4-bit binary. Unlike pure binary, each decimal digit encoded separately. Example: 395₁₀ in BCD: 3=0011, 9=1001, 5=0101 → 001110010101 (BCD). Compare to pure binary: 395₁₀=110001011₂ (9 bits, different value). BCD uses only 0-9 codes (0000-1001), wastes codes 1010-1111. Types: Unpacked BCD (1 byte per digit), Packed BCD (2 digits per byte, used in calculators). Advantages: Easy decimal-binary conversion, no rounding errors, used in: financial applications, calculators, digital displays, legacy systems. Disadvantages: Inefficient storage (20% waste), arithmetic more complex. Modern use: Credit card processing, accounting systems, embedded displays where exact decimal representation critical.

Binary Number System Applications

Computer Science & Programming

  • Data Storage: All digital data stored as binary (files, images, videos)
  • Boolean Logic: True/False represented as 1/0
  • Bitwise Operations: AND, OR, XOR, NOT, bit shifts
  • Memory Addressing: RAM addresses in binary/hex
  • Network Protocols: IP addresses, subnet masks

Digital Electronics

  • Logic Gates: AND, OR, NOT, NAND, NOR gates operate on binary
  • Microprocessors: All CPU operations in binary
  • Digital Signals: High (1) and Low (0) voltage levels
  • Error Detection: Parity bits, checksums

Number System Comparison

System Base Digits Example Use Case
Binary 2 0, 1 1011₂ = 11₁₀ Computer internal representation
Octal 8 0-7 13₈ = 11₁₀ Unix file permissions, legacy systems
Decimal 10 0-9 11₁₀ Human-readable numbers
Hexadecimal 16 0-9, A-F B₁₆ = 11₁₀ Memory addresses, color codes
Advertisement

Check a binary sum across a carry chain

Add binary 111 to binary 1 starting at the right. One plus one writes zero and carries one. The same happens in each of the next two columns, leaving a new leading one. The sum is 1000 in binary. As a check, the starting operands represent seven and one in decimal, while the new leading position represents eight. Keep leading zeros when an exercise specifies a fixed word length and state how overflow is handled.

Conversion of Another Base into Base 10 and Other Bases

We saw in Hindu-Arabic Positional System that our Hindu-Arabic system uses base 10, which is a system using place values of digits that depend on powers of 10 (or, are based on powers of 10). We’ve already worked with bases other than base 10: The Babylonian system was base 60, while the Mayan system was base 20.
To explore how our base 10 system is used, answer the following question: What’s the following quantity: 4,572? You probably said four thousand five hundred seventy-two (no, there is no “and” between hundred and seventy). But why do you think that 4 means four thousand? A very young person when learning their numbers might say that’s a four five seven and two. But you added the context of thousands to the four. Why?
Place value, that’s why. You learned early on that where the numeral was gave it different meanings. Ten thousands, thousands, hundreds, tens, and ones. So, you translate that symbol string (4,572) into “four thousand five hundred seventy-two.” As we saw in Hindu-Arabic Positional System, expanding a Hindu-Arabic number involved writing the number using each digit times its appropriate power of 10. So, we could write 4,572 as 4×103+5×102+7×101+2×100=4×1000+5×100+7×10+2×1.
One possible reason we use base 10 is that we have 10 fingers, and in the cultures where the Hindu-Arabic system developed, that became the standard. Other cultures may have used other ways of organizing numbers, perhaps using 20 by including toes, or using 60 because 60 has many divisors. Mathematically though, base 10 is an awkward base to work in since 10 has limited divisors. But we think it is easy and simple because that’s what we’ve been taught to use.
Using a base 10 system means we need 10 symbols to make our numbering system work: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Now imagine that we all only had 6 fingers instead of 10 and our counting system was based on those 6 fingers. We would be counting in groups of 6, not groups of 10. How would this change how we work with quantity?
First, we’d need only six symbols. Let’s use 0, 1, 2, 3, 4, 5. Second, our place values would be based on powers of 6, not powers of 10. For instance, the number 3,024 in base 6 would be 3×63+0×62+2×61+4×60. That is how you can translate a base 6 number into a base 10 number. When we calculate that expression we get 3×63+0×62+2×61+4×60=3×216+0×36+2×6+4×1=648+0+12+4=664.
This means the base 6 number 3,024 is equal to the base 10 number 664.
From now on, if we are using a base 6 number, we will follow it with the subscript 6, like the following: 3,0246 means the number is in base 6.
A base 10 number gets no subscript (it’s the standard). So, 3,024 is a base 10 number. A base 13 number would be 4,67213.
So, a base 6 system uses only the symbols 0, 1, 2, 3, 4, and 5. Also, the place values use powers of 6. However, we still don’t know how to count in base 6. In order to do so, we’d have to know how to represent the quantities larger than five in base 6. Let’s review how our base 10 system works by counting from 0 to 100, which shows how larger values are represented.
In writing the base 10 numbers, you start with these first 10 values:
0 1 2 3 4 5 6 7 8 9
But you’ve run out of symbols. So, we use two digits:
10 11 12 13 14 15 16 17 18 19
The 1 out front means you’ve run out of digits one time.
But now you’ve run out twice. Continuing with those numbers gives:
20 21 22 23 24 25 26 27 28 29
And so on,
30 31 32 33 34 etc.…
Eventually, you hit the 90s,
90 91 92 93 94 95 96 97 98 99
And you’ve run out of the digits again! So, we say we’ve run out of digits in the tens place one time, hence:
100 101 102 103 104 105 106 107 108 109
That’s the pattern we use in base 10. We write out the symbols until we’ve used all the symbols, then add a digit in front that counts how many times we’ve used the digits. Knowing the numbers, or being able to count higher and higher, is necessary to understand how all the arithmetic works, as it all goes back to counting.
The counting pattern is the same for any other base, including base 6. So, let’s start:
0 1 2 3 4 5
But we’ve run out of symbols! Just like in base 10, we use a second digit, where the first digit will tell us we’ve run out of symbols one time.
10 11 12 13 14 15
And we use the same pattern:
20 21 22 23 24 25
30 31 32 33 34 35
40 41 42 43 44 45
50 51 52 53 54 55
But we’ve run out of symbols for that front digit. So, we indicate it the same way as in base 10…by adding a third digit in front, indicating we’ve run out of symbols once in the second place:
100 101 102 103 104 105
110 111 etc.
The symbol pattern is the same, but truncated. We only use the six symbols. So that is how we represent base 6. Being able to write out these numbers is important when working with addition in the base.
When using a base larger than 10, though, we need more symbols. Instead of creating new symbols, we use capital letters, with A representing the digit for "10," B representing the digit for "11," and so on.

Determining Digits of a Base with Less Than 10 Digits

What are the digits used for base 7?
Solution
Since this is base 7, we need only 7 symbols: 0, 1, 2, 3, 4, 5, 6.

Determining Digits of a Base with More Than 10 Digits

What are the digits used for base 14?
Solution
Since this is base 14, we need 14 symbols. We don’t have single character numbers for 10, 11, 12, and 13, so, in a fit of inspired creativity, we use capital letters A, B, C, D to represent those quantities. So, the digits in base 14 are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D.

Converting from One Base into Another

Convert 3,6017 into base 10.
Solution
In base 7, the place values are powers of 7. Since there are four digits, the highest power of 7 that is used is 3. This yields 3,6017=3×73+6×72+0×71+1×70=3×343+6×49+0×7+1=1,029+294+0+1=1,324.

Converting from Base 14 to Base 10

Convert 4B714 into base 10.
Solution
In base 14, the place values are powers of 14. Since there are three digits, the highest power of 14 is 2. Also recall that in base 14, 10 is represented by A, 11 is represented by B, 12 is represented by C, and 13 is represented by D. Using that, we convert to base 10:
4B714=4×142+B×141+7×140=4×196+11×14+7×1=784+154+7=945.

Converting from Base 12 to Base 10

Convert A1612 into base 10.
Solution
In base 12, the place values are powers of 12. Since there are three digits, the highest power of 12 is 2. Also recall that in base 12, 10 is represented by A and 11 is represented by B. Using that, we convert to base 10:
A1614=10×122+1×121+6×120=10×144+1×12+6×1=1,440+12+6=1,458.

Converting from Base 2 to Base 10

Convert 10112 into base 10.
Solution
In base 2, the place values are powers of 2. Since there are four digits, the highest power of 2 is 3. Using that, we convert to base 10:
10112=1×23+0×22+1×21+1×20=1×8+0×4+1×2+1×1=8+0+2+1=11.

Writing Numbers in Base Systems Other Than Base 10

Write the numbers in base 7 up to 1007.
Solution
Step 1: Using the patterns we indicated earlier, we begin with the first seven digits.
0, 1, 2, 3, 4, 5, 6
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26
30, 31, 32, 33, 34, 35, 36
40, 41, 42, 43, 44, 45, 46
50, 51, 52, 53, 54, 55, 56
60, 61, 62, 63, 64, 65, 66
Now, all the digits have been used in the leading digits. Since the digits have all been used in that leading digit, we use 100, as in base 10.
100

Writing Numbers in Bases with More Than 10 Symbols

Write the numbers in base 14 up to 10014.
Solution
Step 1: Using the patterns we indicated earlier, we begin with the first 14 digits.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D
Step 2: Since we’ve run out of digits, we start with 10, indicating we’ve run out of symbols once.
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D
Step 3: Continuing in the same way, we get:
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 3A, 3B, 3C, 3D
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4A, 4B, 4C, 4D
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5A, 5B, 5C, 5D
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 6A, 6B, 6C, 6D
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 7A, 7B, 7C, 7D
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 8A, 8B, 8C, 8D
90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 9A, 9B, 9C, 9D
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA, AB, AC, AD
B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, BA, BB, BC, BD
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, CA, CB, CC, CD
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, DA, DB, DC, DD
100
Base 2 is important in the digital age, as it is the system used by computers. It is the simplest base to work with, but has the drawback that the numbers in base 2 may use many, many digits. In Addition and Subtraction in Base Systems and Multiplication and Division in Base Systems, we will look at base 2 in each situation.

Writing Numbers in Base 2

Write the numbers in base 2 up to 1002.
Solution
Base 2 uses only two symbols: 0 and 1. Following the pattern established previously, the numbers in base 2 up to 1002 are 0, 1, 10, 11, and 100.

Conversion of Base 10 into Another Base

Converting from base 10 into another base uses repeated division, recording the remainder at each step. Then, the number in the new base is the remainder starting from the last remainder found. To be accurate in what we’re saying, we need to remind ourselves of some terminology associated with division. When integers are divided, the one being divided is the dividend, and the one that is dividing the dividend is the divisor. The quotient is the largest natural number that can be multiplied by the divisor where the product is less than the dividend.
When the integer n is divided by the integer d, n is called the dividend and d is the divisor.
To convert a base 10 number n into base d, we divide n by d, recording the remainder. Then we divide the quotient from that step by the base d, and record the remainder again. We continue this process until the quotient is 0. Then, the base d number has digits that start with the last remainder and use each remainder in reverse order.

Converting from Base 10 into a Lower Base

Convert 298 to base 6.
Solution
We divide 298 by 6, and record the remainder. Then we divide the quotient from that step by 6, and record the remainder again. We continue this process until the quotient is 0. Then, the base 6 number has digits that start with the last remainder and use each remainder in reverse order.
Step 1: When we divide 298 by 6, we get 49r46298. The quotient is 49 and the remainder is 4.
Step 2: Now we divide the quotient, 49, by 6. This gives 8r1649. The quotient is 8 and the remainder is 1.
Step 3: Repeating, we get 1r268. The quotient is 1 and the remainder is 2.
Step 4: Finally, we perform the operation on the quotient 1, 0r161 giving us a quotient of 0 and a remainder of 1.
Step 5: The base 6 number has digits equal to the remainders in reverse order, 12146. So, 298 in base 10 when converted to base 6 is 12146.

Converting from Base 10 into a Higher Base

Convert 45,134 to base 13.
Solution
We divide 45,134 by 13, and record the remainder. Then we divide the quotient from that step by 13, and record the remainder again. We continue this process until the quotient is 0. Then, the base 13 number has digits that start with the last remainder and use each remainder in reverse order. It is at this step that we’ll convert to the base 13 digits, which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C.
Step 1: When we divide 45,134 by 13, we get 3,471r111345,134 . The quotient is 3,471 and the remainder is 11.
Step 2: Now we divide the quotient, 3,471, by 13. This gives 267r0133,471. The quotient is 267 and the remainder is 0.
Step 3: Repeating, we get 20r713267. The quotient is 20 and the remainder is 7.
Step 4: Again, and we get 1r71320. The quotient is 1 and the remainder is 7.
Step 5: Finally, we get 0r1131, with quotient 0 and a remainder 1.
Step 6: The base 13 number has digits equal to the remainders in reverse order, which were 1, 7, 7, 0, and 11. The 11 is written as B in base 13. So, 45,134 in base 10 when converted to base 13 is 1770B13.

Converting from Base 10 into Base 2

Convert 100 to base 2.
Solution
Following the pattern above:
Step 1: We divide 100 by 2, and record the remainder.
Step 2: Then we divide the quotient from that step by 2, and record the remainder again.
Step 3: We continue this process until the quotient is 0.
Step 4: Following this process, the remainders are, in order, 0, 0, 1, 0, 0, 1, 1. Writing those in reverse order gives the number in base 2, 11001002.
Notice that 100 in base 2 took seven digits.

Converting from Hindu-Arabic Numbers to Mayan Numbers

To convert from a Hindu-Arabic number to a Mayan number involves two distinct processes. First, the number must be converted to base 20, using the process described and demonstrated previously. Next, that base 20 number has to be written using Mayan numerals. For reference, the Mayan numerals and their values are below.
Mayan numerals 0 to 19 are displayed.

Converting from Base 10 into the Mayan System

Convert the following into Mayan numbers.
  1. 51
  2. 653
Solution
  1. The Mayan system is base 20, so we must use 20 in the process from above. The first division has a quotient of 2 and remainder of 11. The 11 serves as the “ones” digit. Dividing that quotient, 2, by 20 has a quotient of 0 with a remainder of 2. The 2 becomes the “twenties” digit of the number. So, in base 20, the number would be 2 followed by 11. The Mayan symbols for 2 and 11 are Mayan numeral 2 is displayed. and Mayan numeral 11 is displayed.. Writing these vertically, with the “ones” digit on top, as appropriate for Mayan numbers, results in: Mayan numeral 11 is displayed.Mayan numeral 2 is displayed.
  2. The Mayan system is base 20, so we must use 20 in the process from above. The first division, 673 divided by 20, has a quotient of 32 and remainder of 13. Dividing that quotient, 32, by 20 has a quotient of 1 with a remainder of 12. Dividing that quotient, 1, by 20 has a quotient of 0 and a remainder of 1. Since there are three remainders here, this is a three-digit number. The 1 is the “20-squared” digit, the 12 is the “twenties” digit, and the 13 is the “ones” digit. So, in base 20, the number would be 1 followed by 12 followed by 13.. The Mayan symbols for 1, 12 and 13 are Mayan numeral 1 is displayed., Mayan numeral 11 is displayed., and Mayan numeral 13 is displayed.. Writing these vertically, as appropriate for Mayan numbers, would result in: Mayan numeral 13 is displayed. Mayan numeral 11 is displayed. Mayan numeral 1 is displayed.