13 in binary is 1101: divide by 2 and read the remainders bottom-up. This page converts one decimal at a time — signed or unsigned, Auto/8/16/32/64 bits, including repeating fractions — in this tab.
Need the reverse? Binary to decimal reads the same bits as a positional sum. To see decimal, binary, hex and octal together, use all bases at once in the binary converter.
Integer 13: 13÷2 remainder 1, 6÷2 remainder 0, 3÷2 remainder 1, 1÷2 remainder 1. Reading bottom-up gives 1101. Hex is D and octal is 15 on the secondary cards. Try 13 or 255 (11111111). An alternate method subtracts powers of two: 13 = 8+4+1, so bits 1101 again.
Negatives use two’s complement at the chosen width. −13 at 8 bits is 11110011: pad 13 to 00001101, invert to 11110010, add 1. Unsigned 8-bit 255 is 11111111; signed 8-bit cannot hold 255 and shows a red range error. 64-bit values use BigInt, so they stay exact past 2^53.
Fractions use repeated ×2. 10.625 is 1010.101 exactly (0.625 = 1/2 + 1/8). 0.1 cannot terminate: the widget prints 0.0(0011) = 0.0001100110011001... Open Step-by-step working for the ÷2 table, the ×2 table, and invert+1 on negatives. Close the tab when you are done — FlashKit does not store the number.
How to convert decimal to binary
- Type a decimal such as 13, 10.625 or −13. The binary card updates immediately; hex and octal appear beside it.
- Signed is the default. Unsigned accepts 255 in 8 bits. Pick Auto, 8, 16, 32 or 64 bits. Auto chooses the smallest width that fits.
- Open Step-by-step working for the remainder table (read bottom-up), the subtract-powers-of-2 method, and the fraction ×2 table.
- Copy any card. A red alert appears if the integer does not fit the width. Close the tab when you are done.
Key Features
- Decimal → binary with hex and octal secondary results
- Signed/unsigned and Auto/8/16/32/64-bit width, BigInt past 2^53
- Fractions with repeating notation such as 0.0(0011)
- Remainder table, subtract-powers-of-2, and invert+1 for negatives
- Runs in this browser; nothing is uploaded
Repeated ÷2, and the subtract-powers method
- 13 ÷ 2 = 6 remainder 1; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1. The remainders bottom-up are 1101.
- 255 is eight remainders of 1: 11111111. 1000 is 1111101000. Those rows are produced by the same engine as the widget.
- Subtract powers of 2 as a check: 13 ≥ 8 so write 1 and subtract, 5 ≥ 4 so write 1, 1 < 2 so write 0, 1 ≥ 1 so write 1 → 1101.
- Common mistake: reading remainders top-down (1011) instead of bottom-up (1101). Another: treating unprefixed 1000 as binary eight.
Fractions, negatives, and width
- 10.625: integer 1010 from ÷2; fraction 0.625 × 2 = 1.25 → 1, 0.25 × 2 = 0.5 → 0, 0.5 × 2 = 1.0 → 1, so .101.
- 0.1 repeats. The stored IEEE bit pattern is a different job — that is the IEEE 754 float converter.
- −13 at 8 bits is 11110011. At 16 bits the same value is 1111111111110011. Width changes padding, not the invert+1 rule.
- 8-bit unsigned max is 255; 8-bit signed max is 127. 256 needs 9 bits (100000000) or a wider Auto pick (16).
Common mistakes
- Writing 13 as 1101 and then padding on the right (11010000) instead of the left (00001101) before invert+1.
- Stopping the fraction ×2 loop when a remainder looks small — 0.1 never hits 0, so you must mark the repeating block.
- Mixing the number 65 with the text “65”. Letters belong on the binary translator.
- Assuming JavaScript Number is exact above 2^53. This page uses BigInt for the integer part.
- Forgetting that Auto width will not warn on 300 in 8 bits because it silently steps up to 16.
Reference: 0–32, powers of two, and milestones
- Rows are decimal, binary and hex from the shipped converter. 2^10 = 1024 is 10000000000. 65535 is sixteen 1s (FFFF).
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 10 | 2 |
| 3 | 11 | 3 |
| 4 | 100 | 4 |
| 5 | 101 | 5 |
| 6 | 110 | 6 |
| 7 | 111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |
| 16 | 10000 | 10 |
| 17 | 10001 | 11 |
| 18 | 10010 | 12 |
| 19 | 10011 | 13 |
| 20 | 10100 | 14 |
| 21 | 10101 | 15 |
| 22 | 10110 | 16 |
| 23 | 10111 | 17 |
| 24 | 11000 | 18 |
| 25 | 11001 | 19 |
| 26 | 11010 | 1A |
| 27 | 11011 | 1B |
| 28 | 11100 | 1C |
| 29 | 11101 | 1D |
| 30 | 11110 | 1E |
| 31 | 11111 | 1F |
| 32 | 100000 | 20 |
| 64 | 1000000 | 40 |
| 100 | 1100100 | 64 |
| 127 | 1111111 | 7F |
| 128 | 10000000 | 80 |
| 255 | 11111111 | FF |
| 256 | 100000000 | 100 |
| 512 | 1000000000 | 200 |
| 1000 | 1111101000 | 3E8 |
| 1024 | 10000000000 | 400 |
Frequently Asked Questions
What is 13 in binary?
1101. Divide 13 by 2 four times and read remainders 1,0,1,1 from the last remainder upward. Hex is D.
What is −13 in 8-bit two’s complement?
11110011. Pad 13 to 00001101, invert to 11110010, add 1. The unsigned readout of those bits is 243.
How is 10.625 written in binary?
1010.101. The integer 10 is 1010; 0.625 is 1/2 + 1/8, which is the fraction bits 101.
Why does 0.1 show 0.0(0011)?
1/10 is a repeating dyadic. The parentheses mark the period 0011 after a leading 0. IEEE-754 rounding is a separate page.
Does 255 fit in 8-bit signed mode?
No. Signed 8-bit max is 127. Switch to Unsigned, or let Auto pick 16 bits. 255 unsigned is 11111111.
Is this the same as the binary converter hub?
Same engine, one direction. The hub shows four bases in one box. This page is the remainder-table lesson for decimal → binary.