Decimal to Binary Converter

Instant conversion with step-by-step division math. Understand the language of computers and master 8-bit, 16-bit, and 32-bit binary logic.

DEC
0
BASE-2

Read steps from Bottom-to-Top to get this result.

Calculation Steps

Div by 2
DivisionQuotientBit
0 / 200

8-Bit Reference Chart

Standard 0-255 lookup table.

DEC0
00000000
HEX00
DEC1
00000001
HEX01
DEC2
00000010
HEX02
DEC3
00000011
HEX03
DEC4
00000100
HEX04
DEC5
00000101
HEX05
DEC6
00000110
HEX06
DEC7
00000111
HEX07
DEC8
00001000
HEX08
DEC9
00001001
HEX09
DEC10
00001010
HEX0A
DEC11
00001011
HEX0B
DEC12
00001100
HEX0C
DEC13
00001101
HEX0D
DEC14
00001110
HEX0E
DEC15
00001111
HEX0F
DEC16
00010000
HEX10
DEC17
00010001
HEX11
DEC18
00010010
HEX12
DEC19
00010011
HEX13
DEC20
00010100
HEX14
DEC21
00010101
HEX15
DEC22
00010110
HEX16
DEC23
00010111
HEX17
DEC24
00011000
HEX18
DEC25
00011001
HEX19
DEC26
00011010
HEX1A
DEC27
00011011
HEX1B
DEC28
00011100
HEX1C
DEC29
00011101
HEX1D
DEC30
00011110
HEX1E
DEC31
00011111
HEX1F
DEC32
00100000
HEX20
DEC33
00100001
HEX21
DEC34
00100010
HEX22
DEC35
00100011
HEX23
DEC36
00100100
HEX24
DEC37
00100101
HEX25
DEC38
00100110
HEX26
DEC39
00100111
HEX27
DEC40
00101000
HEX28
DEC41
00101001
HEX29
DEC42
00101010
HEX2A
DEC43
00101011
HEX2B
DEC44
00101100
HEX2C
DEC45
00101101
HEX2D
DEC46
00101110
HEX2E
DEC47
00101111
HEX2F
DEC48
00110000
HEX30
DEC49
00110001
HEX31
DEC50
00110010
HEX32
DEC51
00110011
HEX33
DEC52
00110100
HEX34
DEC53
00110101
HEX35
DEC54
00110110
HEX36
DEC55
00110111
HEX37
DEC56
00111000
HEX38
DEC57
00111001
HEX39
DEC58
00111010
HEX3A
DEC59
00111011
HEX3B
DEC60
00111100
HEX3C
DEC61
00111101
HEX3D
DEC62
00111110
HEX3E
DEC63
00111111
HEX3F
DEC64
01000000
HEX40
DEC65
01000001
HEX41
DEC66
01000010
HEX42
DEC67
01000011
HEX43
DEC68
01000100
HEX44
DEC69
01000101
HEX45
DEC70
01000110
HEX46
DEC71
01000111
HEX47
DEC72
01001000
HEX48
DEC73
01001001
HEX49
DEC74
01001010
HEX4A
DEC75
01001011
HEX4B
DEC76
01001100
HEX4C
DEC77
01001101
HEX4D
DEC78
01001110
HEX4E
DEC79
01001111
HEX4F
DEC80
01010000
HEX50
DEC81
01010001
HEX51
DEC82
01010010
HEX52
DEC83
01010011
HEX53
DEC84
01010100
HEX54
DEC85
01010101
HEX55
DEC86
01010110
HEX56
DEC87
01010111
HEX57
DEC88
01011000
HEX58
DEC89
01011001
HEX59
DEC90
01011010
HEX5A
DEC91
01011011
HEX5B
DEC92
01011100
HEX5C
DEC93
01011101
HEX5D
DEC94
01011110
HEX5E
DEC95
01011111
HEX5F
DEC96
01100000
HEX60
DEC97
01100001
HEX61
DEC98
01100010
HEX62
DEC99
01100011
HEX63
DEC100
01100100
HEX64
DEC101
01100101
HEX65
DEC102
01100110
HEX66
DEC103
01100111
HEX67
DEC104
01101000
HEX68
DEC105
01101001
HEX69
DEC106
01101010
HEX6A
DEC107
01101011
HEX6B
DEC108
01101100
HEX6C
DEC109
01101101
HEX6D
DEC110
01101110
HEX6E
DEC111
01101111
HEX6F
DEC112
01110000
HEX70
DEC113
01110001
HEX71
DEC114
01110010
HEX72
DEC115
01110011
HEX73
DEC116
01110100
HEX74
DEC117
01110101
HEX75
DEC118
01110110
HEX76
DEC119
01110111
HEX77
DEC120
01111000
HEX78
DEC121
01111001
HEX79
DEC122
01111010
HEX7A
DEC123
01111011
HEX7B
DEC124
01111100
HEX7C
DEC125
01111101
HEX7D
DEC126
01111110
HEX7E
DEC127
01111111
HEX7F
DEC128
10000000
HEX80
DEC129
10000001
HEX81
DEC130
10000010
HEX82
DEC131
10000011
HEX83
DEC132
10000100
HEX84
DEC133
10000101
HEX85
DEC134
10000110
HEX86
DEC135
10000111
HEX87
DEC136
10001000
HEX88
DEC137
10001001
HEX89
DEC138
10001010
HEX8A
DEC139
10001011
HEX8B
DEC140
10001100
HEX8C
DEC141
10001101
HEX8D
DEC142
10001110
HEX8E
DEC143
10001111
HEX8F
DEC144
10010000
HEX90
DEC145
10010001
HEX91
DEC146
10010010
HEX92
DEC147
10010011
HEX93
DEC148
10010100
HEX94
DEC149
10010101
HEX95
DEC150
10010110
HEX96
DEC151
10010111
HEX97
DEC152
10011000
HEX98
DEC153
10011001
HEX99
DEC154
10011010
HEX9A
DEC155
10011011
HEX9B
DEC156
10011100
HEX9C
DEC157
10011101
HEX9D
DEC158
10011110
HEX9E
DEC159
10011111
HEX9F
DEC160
10100000
HEXA0
DEC161
10100001
HEXA1
DEC162
10100010
HEXA2
DEC163
10100011
HEXA3
DEC164
10100100
HEXA4
DEC165
10100101
HEXA5
DEC166
10100110
HEXA6
DEC167
10100111
HEXA7
DEC168
10101000
HEXA8
DEC169
10101001
HEXA9
DEC170
10101010
HEXAA
DEC171
10101011
HEXAB
DEC172
10101100
HEXAC
DEC173
10101101
HEXAD
DEC174
10101110
HEXAE
DEC175
10101111
HEXAF
DEC176
10110000
HEXB0
DEC177
10110001
HEXB1
DEC178
10110010
HEXB2
DEC179
10110011
HEXB3
DEC180
10110100
HEXB4
DEC181
10110101
HEXB5
DEC182
10110110
HEXB6
DEC183
10110111
HEXB7
DEC184
10111000
HEXB8
DEC185
10111001
HEXB9
DEC186
10111010
HEXBA
DEC187
10111011
HEXBB
DEC188
10111100
HEXBC
DEC189
10111101
HEXBD
DEC190
10111110
HEXBE
DEC191
10111111
HEXBF
DEC192
11000000
HEXC0
DEC193
11000001
HEXC1
DEC194
11000010
HEXC2
DEC195
11000011
HEXC3
DEC196
11000100
HEXC4
DEC197
11000101
HEXC5
DEC198
11000110
HEXC6
DEC199
11000111
HEXC7
DEC200
11001000
HEXC8
DEC201
11001001
HEXC9
DEC202
11001010
HEXCA
DEC203
11001011
HEXCB
DEC204
11001100
HEXCC
DEC205
11001101
HEXCD
DEC206
11001110
HEXCE
DEC207
11001111
HEXCF
DEC208
11010000
HEXD0
DEC209
11010001
HEXD1
DEC210
11010010
HEXD2
DEC211
11010011
HEXD3
DEC212
11010100
HEXD4
DEC213
11010101
HEXD5
DEC214
11010110
HEXD6
DEC215
11010111
HEXD7
DEC216
11011000
HEXD8
DEC217
11011001
HEXD9
DEC218
11011010
HEXDA
DEC219
11011011
HEXDB
DEC220
11011100
HEXDC
DEC221
11011101
HEXDD
DEC222
11011110
HEXDE
DEC223
11011111
HEXDF
DEC224
11100000
HEXE0
DEC225
11100001
HEXE1
DEC226
11100010
HEXE2
DEC227
11100011
HEXE3
DEC228
11100100
HEXE4
DEC229
11100101
HEXE5
DEC230
11100110
HEXE6
DEC231
11100111
HEXE7
DEC232
11101000
HEXE8
DEC233
11101001
HEXE9
DEC234
11101010
HEXEA
DEC235
11101011
HEXEB
DEC236
11101100
HEXEC
DEC237
11101101
HEXED
DEC238
11101110
HEXEE
DEC239
11101111
HEXEF
DEC240
11110000
HEXF0
DEC241
11110001
HEXF1
DEC242
11110010
HEXF2
DEC243
11110011
HEXF3
DEC244
11110100
HEXF4
DEC245
11110101
HEXF5
DEC246
11110110
HEXF6
DEC247
11110111
HEXF7
DEC248
11111000
HEXF8
DEC249
11111001
HEXF9
DEC250
11111010
HEXFA
DEC251
11111011
HEXFB
DEC252
11111100
HEXFC
DEC253
11111101
HEXFD
DEC254
11111110
HEXFE
DEC255
11111111
HEXFF

The Language of 0s and 1s

We humans live in a base-10 world. We have ten fingers, so we count in tens (0, 1, 2... 9). But computers? They have only two "fingers": Off (0) and On (1).

Everything you see on your screen right now—this text, the colors, the images, the layout—is stored deep inside your computer's memory as a massive sequence of billions of zeroes and ones. This system is called Binary.

Understanding how to convert between our human decimals and machine binary is not just a math trick; it's the key to understanding how digital logic works. Whether you are learning about IP addresses, fixing CSS color codes, or optimizing database storage, binary is the foundation.

Manual Conversion Masterclass

Don't rely just on the calculator. Here is how you do it with a pen and paper using the "Divide by 2" method:

  1. Write down your decimal number.
  2. Divide it by 2.
  3. Write down the result (integer part).
  4. Write down the Remainder (0 or 1) on the side.
  5. Repeat until you reach 0.
  6. CRITICAL STEP: Read the remainders from the bottom up.
Example: 13 to Binary
13 ÷ 2 = 6 (Rem 1) ← LSB (Right)
6 ÷ 2 = 3 (Rem 0)
3 ÷ 2 = 1 (Rem 1)
1 ÷ 2 = 0 (Rem 1) ← MSB (Left)
Result: 1101

The "Powers of 2" Cheat Sheet

Pros don't usually divide. They memorize the positions. Each "slot" in a binary number doubles in value.

2^7
128
Bit 7
2^6
64
Bit 6
2^5
32
Bit 5
2^4
16
Bit 4
2^3
8
Bit 3
2^2
4
Bit 2
2^1
2
Bit 1
2^0
1
Bit 0

Why 8-Bit, 16-Bit, and 32-Bit?

You might notice our tool supports different "Bit Depths". This refers to how many digits of binary the computer uses to store a single number.

  • 8-BitMax: 255

    The "Byte". Used for ASCII text, classic Nintendo graphics, and RGB color channels (Red, Green, Blue).

  • 16-BitMax: 65,535

    Used for "High Color" images, old-school game audio, and network port numbers.

  • 32-BitMax: ~4.29 Billion

    The standard integer size for modern apps. Used for IP addresses and handling larger data sets.

Warning: Overflow Errors

What happens if you try to store the number 256 in an 8-bit system?

It crashes. 256 in binary is 100000000. That requires 9 bits. If you only have 8 slots, the leading "1" gets cut off, and the computer sees 00000000. Your bank account balance goes from $256 to $0 instantly. This is called an Integer Overflow, and it is a classic bug that programmers must guard against.


Frequently Asked Questions

How do I manually convert a decimal number to binary?

The most reliable method is "Division by 2". Take your decimal number and divide it by 2. Write down the remainder (which will always be 0 or 1). Take the result (quotient) and divide by 2 again. Repeat this until you reach 0. The binary number is the sequence of remainders read from the last one you calculated (bottom) to the first (top).

What is the binary representation of 255?

The binary representation of 255 is 11111111. It is the maximum value that can be stored in an 8-bit byte, making it a significant number in computer science (often seen in IP addresses and color codes).

Why do computers use binary instead of decimal?

Computers run on electricity. It is much easier and more reliable to measure two distinct states (High Voltage = 1, Low Voltage = 0) than to measure ten subtle voltage levels to represent 0-9. This binary "On/Off" logic is the physical foundation of all modern processor architecture.

How do I convert binary back to decimal?

To convert back, you use "Powers of 2". Read the binary digits from right to left. The first bit is worth 1, the second is 2, the third is 4, then 8, 16, 32, and so on. Simply add up the values of all the positions where the bit is "1". For example, 101 = 4 + 0 + 1 = 5.

What is the difference between a Bit and a Byte?

A "Bit" (Binary Digit) is the smallest unit of data, a single 0 or 1. A "Byte" is a group of 8 bits. While a bit can only represent 2 values, a byte can represent 256 distinct values (2^8), which is enough to store a single ASCII character like "A" or "!"

How are negative numbers represented in binary?

Computers use a system called "Two's Complement". The left-most bit is reserved as the "Sort Bit". If it is 1, the number is negative. To convert a negative number, you take the positive binary version, flip all the bits (0 becomes 1, 1 becomes 0), and then add 1 to the result.

Can binary represent fractions or decimals?

Yes. Just as we have a decimal point, binary has a "radix point". Bits to the right of this point represent fractions: 1/2, 1/4, 1/8, etc. In modern computing, the IEEE 754 standard ("Floating Point") is used to store these complex fractional values efficiently.

What are "Significant Bits"?

The "Least Significant Bit" (LSB) is the right-most bit, representing the smallest value (1). The "Most Significant Bit" (MSB) is the left-most bit, representing the largest power of 2 in that number (e.g., 128 in an 8-bit number). Changing the MSB has the biggest impact on the value.

Why is Hexadecimal often used with Binary?

Binary strings are very long and hard for humans to read (e.g., 101101011101). Hexadecimal (Base-16) perfectly compresses every 4 bits of binary into 1 hex digit. This makes code shorter and easier to debug. For conversion, you just group binary digits into sets of 4.

What is a "Bitwise Shift"?

A bitwise shift moves all bits to the left or right. Shifting left (<<) effectively multiplies the number by 2. Shifting right (>>) effectively divides the number by 2 (dropping the remainder). This operation is incredibly fast for processors to perform compared to standard multiplication.

What happens if a calculation exceeds the bit limit (Overflow)?

If you add 1 to the maximum value (e.g., 11111111 + 1 in 8-bit), the mathematical result is 256 (100000000), but an 8-bit system only has room for the lower 8 zeroes. The result wraps around to 0. This "Integer Overflow" can cause serious bugs in software, often crashing games or financial systems.

How many distinct values can 32 bits hold?

A 32-bit integer system can store 2^32 distinct values, which is 4,294,967,296. If unsigned, the range is 0 to ~4.29 billion. If signed, it is split roughly from -2.14 billion to +2.14 billion.

Is binary the only alternative number system?

No. Octal (Base-8) was popular in the early days of computing. Some experimental computers have even tried Ternary (Base-3) logic. However, binary remains the undisputed standard because of its seamless mapping to the On/Off physical switches (transistors) of hardware.

What is ASCII code?

ASCII is a standard that maps binary numbers to human characters. For example, the binary number 01000001 (Decimal 65) is assigned to the uppercase letter "A". This allows computers to store text documents as long strings of binary numbers.

How do IP addresses use binary?

An IPv4 address (like 192.168.1.1) is actually four 8-bit binary numbers separated by dots. Computers see it as one continuous 32-bit string (11000000101010000000000100000001). Subnet masks use binary logic to filter network traffic.