anındahesapla

Number base converter

Translates a number between decimal, binary, octal and hexadecimal.

· Updated:

WhatsApp X Facebook

Decimal value: 255. Entering 255 in base 10 shows the same quantity as 11111111 in binary, 377 in octal and FF in hexadecimal.

Programmers read memory addresses and colour codes in hex. Network engineers work with binary masks. Students meet base conversion early in computer science courses. A converter that shows all four systems side by side saves repeated division by hand and makes patterns between the systems easy to spot.

Result

255

Decimal value: 255

What a number base is

A base tells how many different digits a system uses before it carries over to a new place. Decimal uses ten digits. Binary uses two: 0 and 1. Octal uses eight, and hexadecimal uses sixteen, with the letters A to F standing for ten to fifteen.

Each position is worth a power of the base. In decimal the places count ones, tens, hundreds. In binary they count ones, twos, fours, eights and so on. Reading a number in any base means multiplying each digit by its place value and adding the results.

Computers store everything in binary because a circuit can be on or off. Long binary strings are hard for people to read, so groups of four bits are written as one hexadecimal digit. That is why 255, eight ones in binary, becomes just FF.

Octal groups bits in threes. It appears in older systems and in file permissions on Unix-like operating systems, where three octal digits describe read, write and execute rights.

Leading zeros carry no value. Writing 00FF instead of FF changes nothing about the number, though fixed-width formats keep them for alignment.

Web colours show the same idea in daily use. A colour code such as FF0000 is three pairs of hex digits for red, green and blue. Each pair runs from 00 to FF, which is 0 to 255 in decimal, so one byte holds every possible level of a single colour channel.

Network masks and IP addresses follow suit. A mask written as 255 in each block is eight binary ones, and reading it in binary shows at a glance which bits belong to the network part of an address.

How to convert

Type the value and choose the base it is written in. The tool reads it, converts it to decimal internally, and then writes it out in the other bases.

  1. Enter the number.
  2. Select its input base.
  3. Read decimal, binary, octal and hexadecimal outputs.
SystemValue
Decimal255
Binary11111111
Octal377
Hexadecimal (hex)FF

By hand, converting decimal to another base means dividing repeatedly by the target base and reading the remainders from bottom to top. Converting back means multiplying each digit by its place value and summing.

Letter case in hex input makes no difference. A digit outside the chosen base, such as 8 in an octal number, makes the input invalid and no result is shown.

Frequently Asked Questions

Why does hexadecimal use letters?
Base sixteen needs sixteen digits. After 0 to 9, the letters A to F stand for ten to fifteen.
How many bits make one hex digit?
Four. That makes hex a compact way to write binary.
Is ff the same as FF?
Yes. Letter case does not change a hexadecimal value.
Where is octal used today?
Mainly for file permissions on Unix-like systems and in some older hardware documentation.
Why is my input rejected?
It contains a digit that the chosen base does not allow, such as 2 in a binary number.

Related calculations