Binary to Decimal Converter

Convert between binary and decimal in both directions — fractions, signed values and very long numbers included, with the working shown step by step.

Numbers vs text: as a number, 01001000 is 72 — that conversion belongs here. As text, the same bits are the letter H — that belongs to our binary to text converter. Numbers accept any length; text needs complete 8-bit bytes.

Result
Waiting for input — conversion happens instantly in your browser.

How to Convert Binary to Decimal by Hand

Two classic methods for whole numbers, one more for fractions — all three are exactly what the converter shows in its step-by-step working.

The positional method (read binary → decimal)

Each bit is worth a power of two, doubling from right to left: 1, 2, 4, 8, 16… Add the values where you see a 1. For 1101: 8 + 4 + 1 = 13. This is the fastest way to read a value.

Double dabble (write decimal → binary)

To write a decimal number in binary, repeatedly halve it and record the remainders. For 13: 13 is odd → 1; 6 is even → 0; 3 is odd → 1; 1 is odd → 1. Reading the remainders bottom to top gives 1101. Same answer, opposite direction.

Fractions: the ×2 method

After the binary point, digits are worth 1/2, 1/4, 1/8… — so 101.11 is 5 + 0.5 + 0.25 = 5.75. Going the other way, multiply the fraction by 2 and take the integer part each time: 0.75 × 2 = 1.5 → 1; 0.5 × 2 = 1.0 → 1; 0 → stop, giving .11. Some decimal fractions (like 0.1) never terminate in binary — the converter truncates those at 32 bits and marks them approximate. That is the honest limit of any finite binary fraction, not a bug.

Signed Numbers and Two’s Complement

The same bits can be two different numbers — the bit width decides.

Unsigned, 11111111 is 255. In signed 8-bit two’s complement, the leading 1 marks a negative value and the same string is −1 (it reads as 255 − 256). Likewise 10000000 is 128 unsigned but −128 signed. Signed interpretation only exists at a fixed width — 8, 16, 32 or 64 bits — because the sign lives in the top bit. Enable Signed above and choose the width your data uses; unsigned mode handles any length.

More on number-versus-text readings of the same bits: binary numbers vs binary text. The broader story of why computers count in base 2: how binary numbers work.

Reference Tables

Powers of two for the place values, and every byte value in decimal, binary and hex.

Powers of two

PowerValue
201
212
224
238
2416
2532
2664
27128
28256
29512
2101024
2112048
2124096
2138192
21416384
21532768
21665536

Every byte value: 0–255 in decimal, binary and hex

DecimalBinaryHex
0000000000x00
1000000010x01
2000000100x02
3000000110x03
4000001000x04
5000001010x05
6000001100x06
7000001110x07
8000010000x08
9000010010x09
10000010100x0A
11000010110x0B
12000011000x0C
13000011010x0D
14000011100x0E
15000011110x0F
16000100000x10
17000100010x11
18000100100x12
19000100110x13
20000101000x14
21000101010x15
22000101100x16
23000101110x17
24000110000x18
25000110010x19
26000110100x1A
27000110110x1B
28000111000x1C
29000111010x1D
30000111100x1E
31000111110x1F
32001000000x20
33001000010x21
34001000100x22
35001000110x23
36001001000x24
37001001010x25
38001001100x26
39001001110x27
40001010000x28
41001010010x29
42001010100x2A
43001010110x2B
44001011000x2C
45001011010x2D
46001011100x2E
47001011110x2F
48001100000x30
49001100010x31
50001100100x32
51001100110x33
52001101000x34
53001101010x35
54001101100x36
55001101110x37
56001110000x38
57001110010x39
58001110100x3A
59001110110x3B
60001111000x3C
61001111010x3D
62001111100x3E
63001111110x3F
64010000000x40
65010000010x41
66010000100x42
67010000110x43
68010001000x44
69010001010x45
70010001100x46
71010001110x47
72010010000x48
73010010010x49
74010010100x4A
75010010110x4B
76010011000x4C
77010011010x4D
78010011100x4E
79010011110x4F
80010100000x50
81010100010x51
82010100100x52
83010100110x53
84010101000x54
85010101010x55
86010101100x56
87010101110x57
88010110000x58
89010110010x59
90010110100x5A
91010110110x5B
92010111000x5C
93010111010x5D
94010111100x5E
95010111110x5F
96011000000x60
97011000010x61
98011000100x62
99011000110x63
100011001000x64
101011001010x65
102011001100x66
103011001110x67
104011010000x68
105011010010x69
106011010100x6A
107011010110x6B
108011011000x6C
109011011010x6D
110011011100x6E
111011011110x6F
112011100000x70
113011100010x71
114011100100x72
115011100110x73
116011101000x74
117011101010x75
118011101100x76
119011101110x77
120011110000x78
121011110010x79
122011110100x7A
123011110110x7B
124011111000x7C
125011111010x7D
126011111100x7E
127011111110x7F
128100000000x80
129100000010x81
130100000100x82
131100000110x83
132100001000x84
133100001010x85
134100001100x86
135100001110x87
136100010000x88
137100010010x89
138100010100x8A
139100010110x8B
140100011000x8C
141100011010x8D
142100011100x8E
143100011110x8F
144100100000x90
145100100010x91
146100100100x92
147100100110x93
148100101000x94
149100101010x95
150100101100x96
151100101110x97
152100110000x98
153100110010x99
154100110100x9A
155100110110x9B
156100111000x9C
157100111010x9D
158100111100x9E
159100111110x9F
160101000000xA0
161101000010xA1
162101000100xA2
163101000110xA3
164101001000xA4
165101001010xA5
166101001100xA6
167101001110xA7
168101010000xA8
169101010010xA9
170101010100xAA
171101010110xAB
172101011000xAC
173101011010xAD
174101011100xAE
175101011110xAF
176101100000xB0
177101100010xB1
178101100100xB2
179101100110xB3
180101101000xB4
181101101010xB5
182101101100xB6
183101101110xB7
184101110000xB8
185101110010xB9
186101110100xBA
187101110110xBB
188101111000xBC
189101111010xBD
190101111100xBE
191101111110xBF
192110000000xC0
193110000010xC1
194110000100xC2
195110000110xC3
196110001000xC4
197110001010xC5
198110001100xC6
199110001110xC7
200110010000xC8
201110010010xC9
202110010100xCA
203110010110xCB
204110011000xCC
205110011010xCD
206110011100xCE
207110011110xCF
208110100000xD0
209110100010xD1
210110100100xD2
211110100110xD3
212110101000xD4
213110101010xD5
214110101100xD6
215110101110xD7
216110110000xD8
217110110010xD9
218110110100xDA
219110110110xDB
220110111000xDC
221110111010xDD
222110111100xDE
223110111110xDF
224111000000xE0
225111000010xE1
226111000100xE2
227111000110xE3
228111001000xE4
229111001010xE5
230111001100xE6
231111001110xE7
232111010000xE8
233111010010xE9
234111010100xEA
235111010110xEB
236111011000xEC
237111011010xED
238111011100xEE
239111011110xEF
240111100000xF0
241111100010xF1
242111100100xF2
243111100110xF3
244111101000xF4
245111101010xF5
246111101100xF6
247111101110xF7
248111110000xF8
249111110010xF9
250111110100xFA
251111110110xFB
252111111000xFC
253111111010xFD
254111111100xFE
255111111110xFF

Common Mistakes

  • Mistake: reading place values from the left. 1101 is not 1 + 2 + 4 + 8. Correction: the smallest value (1) is always the rightmost bit — count from the right.
  • Mistake: mixing up number and text. 01001000 is 72 as a number but the letter H as text. Correction: decide what the bits mean before converting — the note above the tool links the right converter.
  • Mistake: forgetting that signed needs a width. Correction: two’s complement only exists at a fixed bit width — 11111111 is −1 at 8 bits, 65535 unsigned. Pick the width before reading a signed value.

Practice

1. Convert 1101 to decimal. 8 + 4 + 1 = 13.

2. Write 42 in binary with double dabble. 42 → 21 → 10 → 5 → 2 → 1, remainders 0, 1, 0, 1, 0, 1 → read bottom to top: 101010.

3. What is 11111111 unsigned, and signed 8-bit? Unsigned: 255; signed 8-bit: −1. Verify both with the Signed toggle above.

Binary to Decimal FAQ

How do I convert binary to decimal?

Add the place values wherever you see a 1 — positions double from right to left (1, 2, 4, 8, 16…). For example 1010 is 8 + 2 = 10. The converter above does this instantly, for any length of input.

How do I convert a negative binary number?

It depends on the bit width. In signed 8-bit two’s complement, 11111111 is −1 and 10000000 is −128; unsigned, the same strings are 255 and 128. Enable Signed above and pick the width your data uses.

Can binary numbers have a decimal point?

Yes — a binary point. Digits after it are worth 1/2, 1/4, 1/8 and so on, so 101.11 is 5 + 1/2 + 1/4 = 5.75. This converter handles fractional binary in both directions.

Is there a biggest number this converter handles?

No practical limit: whole numbers are handled with arbitrary-length arithmetic, so a 100-bit or 1000-bit string converts exactly. One honest caveat: fractions that never terminate in binary are truncated to 32 bits and clearly marked as approximate.

What is the difference between a binary number and binary text?

A binary number is a value in base 2 — 01001000 means 72. Binary text is the same bits read as character codes — 01001000 means the letter H. If you want letters, use our binary to text converter; if you want the value, you are in the right place.

What do 0b and 0x prefixes mean?

0b marks a binary literal and 0x marks hexadecimal in programming languages. Both are notation, not part of the value — this converter accepts a 0b prefix and shows the hex spelling of every result.