Read the powers of two
Each binary position represents a power of two. The ones in 1101 mark 8, 4, and 1, which add up to 13. The converter shows the shortest representation, so the binary output for 13 is 1101 without leading zeros.
Type a whole decimal number to see its binary representation. The converter starts with base 10 as the input and base 2 as the output: 42 becomes 101010.
Each binary position represents a power of two. The ones in 1101 mark 8, 4, and 1, which add up to 13. The converter shows the shortest representation, so the binary output for 13 is 1101 without leading zeros.
Converting the number 42 gives 101010. Encoding the text 42 gives one byte for each digit instead. Use the text-to-binary tool when the input is a message, identifier, or string whose characters and leading zeros need to be preserved.
A few useful details for this tool.
No. Enter a whole number using decimal digits and an optional leading minus sign. Leave out grouping separators and decimal points.
The minus sign is kept, so -5 becomes -101. The converter does not use a fixed-width two's complement representation.
No. The converter uses exact integer arithmetic within the input limit, so it can represent values beyond the usual safe integer range.