Decimal 255 to binary
Du skriver inn
- Fra
- 10
- Til
- 2
- Tall
- 255
Du får
- Resultat
- 11111111
255 is one less than 256, so all eight binary places hold a 1. That gives eight ones in a row.
Kjørt med verktøyets egen kode.
Utvikling · verktøy
Velg inndata- og utdata-base, skriv inn et heltall og konverter det lokalt.
Supports whole numbers in bases 2 through 36. Digits 0–9 and letters A–Z represent values.
Om verktøyet
Som en rask kontroll: desimaltallet 25 er binært 11001, oktalt 31 og heksadesimalt 19. Konverter signerte heltall mellom baser fra 2 til 36, også heksadesimalt til binært; brøker og prefikser som 0b eller 0x godtas ikke.
Veiledning
This page turns a whole number written in one base into the same number written in another base. You pick any base from 2 to 36 for the input and for the output, type your number, and press the button. Binary, octal, decimal and hexadecimal are all in the lists, and so is everything in between. It suits students learning how number systems work, programmers checking a value, and anyone who needs a quick answer without opening code. The work happens in your browser, so nothing you type is sent away. It handles whole numbers only, with an optional minus or plus sign.
255 is one less than 256, so all eight binary places hold a 1. That gives eight ones in a row.
Kjørt med verktøyets egen kode.
The places are worth 16, 8, 4, 2 and 1. The ones sit on 16, 8 and 1, and 16 plus 8 plus 1 is 25.
Kjørt med verktøyets egen kode.
In hex, A stands for ten. So 1A3 means 1 times 256, plus 10 times 16, plus 3, which is 419. Run it again with To base set to 2 for the binary form.
Kjørt med verktøyets egen kode.
The sign is kept and put in front of the converted digits. The tool does not use a two's complement form.
Kjørt med verktøyets egen kode.
In base 36, z is worth 35. So zz is 35 times 36 plus 35, which is 1295. Lower case letters are accepted.
Kjørt med verktøyets egen kode.
Spaces are not valid digits, so a number grouped in bytes needs the spaces removed first.
Kjørt med verktøyets egen kode.
Vanlige spørsmål
Set From base to 2 and To base to 10, type the ones and zeros without spaces, and press Convert number. The tool adds up the place values for you. For example, 11001 gives 25.
Choose 16 for the From base and 2 for the To base, then type the hex digits. Letters A to F stand for ten to fifteen. Leave out any 0x at the start, because prefixes are rejected.
Any whole base from 2 up to 36 can be used for the input and for the output. Digits 0 to 9 come first, and then letters A to Z carry on the count, up to Z for 35.
Each base has a limited set of digits. Binary only has 0 and 1, and octal stops at 7. If your number holds a character outside that set, a space, or a dot, the tool names the base and stops.
No. Only whole numbers are supported, so a value like 10.5 shows an error. If you need a fractional part, convert the whole part here and work out the fraction separately.
The number can have up to 4,096 digits, not counting a leading sign. The arithmetic uses big integers, so even very long numbers stay exact instead of being rounded the way ordinary floating point numbers are.
A leading minus sign is kept, and the rest is converted as normal. So -42 in decimal becomes -101010 in binary. The tool does not produce a two's complement bit pattern.
No. The answer is the shortest correct form, so decimal 5 shows as 101, not 00000101. Add zeros yourself when a system needs a fixed width, such as eight bits to make one byte.
Underscores are removed before converting, so 1_000 is read as 1000. Spaces are not removed, so remove them first or you will see the invalid digit message.
No. The page works out the answer inside your browser. Nothing you type is uploaded, so you can use it for private values without leaving a trace on a server.
Velg inndata- og utdata-base, skriv inn et heltall og konverter det lokalt.
Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.