CS With NehalCS With Nehal

Number System Converter

Convert between binary, decimal, hex, octal

Number of Bits

Maximum 16 bits allowed

Bitwise Controls

Enter Value Manually

Type a value in binary, denary, octal, or hexadecimal. The bit buttons will update automatically.

12827
6426
3225
1624
823
422
221
120

Decimal

0

Base 10

Hexadecimal

0

Base 16

Octal

0

Base 8

Custom Base

0

Powers of 2 form

0×27 + 0×26 + 0×25 + 0×24 + 0×23 + 0×22 + 0×21 + 0×20 = 0

Substitute powers of 2 values

0×128 + 0×64 + 0×32 + 0×16 + 0×8 + 0×4 + 0×2 + 0×1 = 0

Final addition

0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 = 0

Binary is grouped into sets of 4 bits from the right. Extra leading zeros are added only for grouping.

Group 1

0000

Decimal: 0

Hex: 0

Group 2

0000

Decimal: 0

Hex: 0

0000 = 0, 0000 = 0

Binary is grouped into sets of 3 bits from the right. Each group is converted into one octal digit.

Group 1

000

Decimal: 0

Octal: 0

Group 2

000

Decimal: 0

Octal: 0

Group 3

000

Decimal: 0

Octal: 0

000 = 0, 000 = 0, 000 = 0

Choose any base from 1 to 16. Values 10 to 15 are represented using A, B, C, D, E, and F.

Base 8 Result

0

0 ÷ base = 0

Result = 0

010 = 08

About This Simulation

This number system converter turns binary values into denary (decimal), hexadecimal, octal and custom bases, and shows every step of the working so you can check your own answers.

Features

  • Choose the number of bits
  • Binary to denary using place values
  • Binary to hexadecimal and octal by grouping bits
  • Conversion to custom bases
  • Full step-by-step working for each conversion

Explanation

A number system represents values using a fixed set of digits and a base. Binary (base 2) uses 0 and 1, octal (base 8) uses 0–7, denary (base 10) uses 0–9, and hexadecimal (base 16) uses 0–9 and A–F.

How it works

  1. Binary to denary: multiply each bit by its place value (1, 2, 4, 8, 16, …) and add the results. For example, 1011 = 8 + 0 + 2 + 1 = 11.
  2. Denary to binary: repeatedly divide by 2 and read the remainders from bottom to top.
  3. Binary to hexadecimal: split the bits into groups of 4 from the right and convert each group to one hex digit (1010 = A).
  4. Binary to octal: split the bits into groups of 3 from the right and convert each group to one octal digit.
  5. Any base b: the value is the sum of each digit × b raised to its position.

Why it matters

Computers store everything in binary, and hexadecimal is used for memory addresses, colour codes and machine code. Number conversion is a core topic in IGCSE, O Level and A Level Computer Science and in CSE230 and CSE260.

Frequently Asked Questions

How do you convert binary to decimal?

Write the place values (powers of 2) above each bit, starting with 1 on the right, and add the place values wherever the bit is 1. For example, 110101 = 32 + 16 + 4 + 1 = 53.

How do you convert binary to hexadecimal?

Group the bits into fours from the right, padding with leading zeros, and replace each group with its hex digit. For example, 1011 1110 = BE.

Why is hexadecimal used in computing?

One hex digit represents exactly 4 bits, so long binary values become short and easy to read. It is used for memory addresses, colour codes (#FF5733), MAC addresses and error codes.

What is the largest number n bits can store?

An unsigned n-bit number can store values from 0 to 2ⁿ − 1. For example, 8 bits store 0 to 255.

Topics covered

  • Binary
  • Denary (Decimal)
  • Hexadecimal
  • Octal
  • Place Value
  • Base Conversion

Tags

  • decimal
  • number systems

Related Simulations