radixflip

Decimal to Binary Converter

Type a decimal number and the binary equivalent appears instantly as you type — there is no Convert button on this page, because the conversion happens on every keystroke. The working (each division by 2) is shown underneath for your exact number.

Convert Decimal to Binary

Only 0–9. Type here — the answer appears instantly, no button to press.
Type a number in any box above.

How to convert decimal to binary

  1. Divide the number by 2. Write down the quotient and the remainder — the remainder is always 0 or 1.
  2. Divide the quotient by 2 again. Note the new remainder underneath the first.
  3. Keep going until the quotient is 0. Every step peels off one bit of the answer.
  4. Read the remainders from bottom to top. The last remainder written is the leftmost bit.

The loop, visually

StartTake the decimal numberDivide by 2Write down the remainder(0 or 1)Quotient = 0?Read the remaindersbottom-upThat's your binary number No Yes

Example: 42 ÷ 2 = 21 r 0 → 21 ÷ 2 = 10 r 1 → 10 ÷ 2 = 5 r 0 → 5 ÷ 2 = 2 r 1 → 2 ÷ 2 = 1 r 0 → 1 ÷ 2 = 0 r 1 → read bottom-up: 101010₂

One loop per bit: divide, note the remainder, and go again with the quotient until nothing is left to divide.

Short on time? Type the number in the converter above and RadixFlip draws this exact table for you, live.

Worked example: 42₁₀ = 101010₂

Number÷ 2QuotientRemainder
422210
212101
10250
5221
2210
1201

Reading the remainder column from the bottom up: 1 0 1 0 1 0 — so 42₁₀ = 101010₂.

Worked example: 13₁₀ = 1101₂

13 ÷ 2 = 6 remainder 1; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. Bottom to top: 1101. Sanity check: 8 + 4 + 0 + 1 = 13, so the answer holds up.

Decimal to binary conversion table (0–255)

Every value from 0 to 255 — one full byte — with its octal and hexadecimal equivalents alongside.

Decimal₁₀Binary₂Octal₈Hexadecimal₁₆
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020
331000014121
341000104222
351000114323
361001004424
371001014525
381001104626
391001114727
401010005028
411010015129
42101010522A
43101011532B
44101100542C
45101101552D
46101110562E
47101111572F
481100006030
491100016131
501100106232
511100116333
521101006434
531101016535
541101106636
551101116737
561110007038
571110017139
58111010723A
59111011733B
60111100743C
61111101753D
62111110763E
63111111773F
64100000010040
65100000110141
66100001010242
67100001110343
68100010010444
69100010110545
70100011010646
71100011110747
72100100011048
73100100111149
7410010101124A
7510010111134B
7610011001144C
7710011011154D
7810011101164E
7910011111174F
80101000012050
81101000112151
82101001012252
83101001112353
84101010012454
85101010112555
86101011012656
87101011112757
88101100013058
89101100113159
9010110101325A
9110110111335B
9210111001345C
9310111011355D
9410111101365E
9510111111375F
96110000014060
97110000114161
98110001014262
99110001114363
100110010014464
101110010114565
102110011014666
103110011114767
104110100015068
105110100115169
10611010101526A
10711010111536B
10811011001546C
10911011011556D
11011011101566E
11111011111576F
112111000016070
113111000116171
114111001016272
115111001116373
116111010016474
117111010116575
118111011016676
119111011116777
120111100017078
121111100117179
12211110101727A
12311110111737B
12411111001747C
12511111011757D
12611111101767E
12711111111777F
1281000000020080
1291000000120181
1301000001020282
1311000001120383
1321000010020484
1331000010120585
1341000011020686
1351000011120787
1361000100021088
1371000100121189
138100010102128A
139100010112138B
140100011002148C
141100011012158D
142100011102168E
143100011112178F
1441001000022090
1451001000122191
1461001001022292
1471001001122393
1481001010022494
1491001010122595
1501001011022696
1511001011122797
1521001100023098
1531001100123199
154100110102329A
155100110112339B
156100111002349C
157100111012359D
158100111102369E
159100111112379F
16010100000240A0
16110100001241A1
16210100010242A2
16310100011243A3
16410100100244A4
16510100101245A5
16610100110246A6
16710100111247A7
16810101000250A8
16910101001251A9
17010101010252AA
17110101011253AB
17210101100254AC
17310101101255AD
17410101110256AE
17510101111257AF
17610110000260B0
17710110001261B1
17810110010262B2
17910110011263B3
18010110100264B4
18110110101265B5
18210110110266B6
18310110111267B7
18410111000270B8
18510111001271B9
18610111010272BA
18710111011273BB
18810111100274BC
18910111101275BD
19010111110276BE
19110111111277BF
19211000000300C0
19311000001301C1
19411000010302C2
19511000011303C3
19611000100304C4
19711000101305C5
19811000110306C6
19911000111307C7
20011001000310C8
20111001001311C9
20211001010312CA
20311001011313CB
20411001100314CC
20511001101315CD
20611001110316CE
20711001111317CF
20811010000320D0
20911010001321D1
21011010010322D2
21111010011323D3
21211010100324D4
21311010101325D5
21411010110326D6
21511010111327D7
21611011000330D8
21711011001331D9
21811011010332DA
21911011011333DB
22011011100334DC
22111011101335DD
22211011110336DE
22311011111337DF
22411100000340E0
22511100001341E1
22611100010342E2
22711100011343E3
22811100100344E4
22911100101345E5
23011100110346E6
23111100111347E7
23211101000350E8
23311101001351E9
23411101010352EA
23511101011353EB
23611101100354EC
23711101101355ED
23811101110356EE
23911101111357EF
24011110000360F0
24111110001361F1
24211110010362F2
24311110011363F3
24411110100364F4
24511110101365F5
24611110110366F6
24711110111367F7
24811111000370F8
24911111001371F9
25011111010372FA
25111111011373FB
25211111100374FC
25311111101375FD
25411111110376FE
25511111111377FF

Frequently asked questions

How do I convert decimal to binary?

Keep dividing the decimal number by 2 and note each remainder. When the quotient reaches 0, read the remainders from last to first — that string of 0s and 1s is the binary number. The converter above shows this table live for whatever you type.

What is 42 in binary?

42 in binary is 101010. Dividing: 42 ÷ 2 = 21 r0, 21 ÷ 2 = 10 r1, 10 ÷ 2 = 5 r0, 5 ÷ 2 = 2 r1, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1. Reading the remainders bottom to top gives 101010.

What is 255 in binary?

255 in binary is 11111111 — eight 1s. 255 is 2⁸ − 1, the largest value a single byte can hold, which is why it turns up everywhere in computing.

Why do the remainders read bottom to top?

The first division finds the rightmost (least significant) bit, because it tells you whether the number is odd or even. Each later division peels off the next bit to the left. So the first remainder you write down belongs at the far right, and the last one at the far left.

How do I convert a negative decimal number to binary?

Convert the positive value, then put the minus sign in front: −42 becomes −101010. (Computers internally use two's complement instead — see the 1's & 2's Complement tool linked below.)

What is 100 in binary?

100 in binary is 1100100. Check it by place values: 64 + 32 + 4 = 100. See the full division steps for 100 in binary.

What is 10 in binary?

10 in binary is 1010. Dividing: 10 ÷ 2 = 5 r0, 5 ÷ 2 = 2 r1, 2 ÷ 2 = 1 r0, 1 ÷ 2 = 0 r1 — read the remainders bottom to top: 1010. See the full division steps for 10 in binary.

What is 128 in binary?

128 in binary is 10000000 — a single 1 followed by seven 0s, because 128 is exactly 2⁷. See the full division steps for 128 in binary.