Number System Converter
Convert binary, decimal, hexadecimal and octal numbers for digital logic, microcontrollers, registers, memory addresses and programming.
๐Ÿ”ข Digital Rule: Hex is compact binary. Each hex digit equals exactly 4 bits, and each octal digit equals exactly 3 bits. Use this with the Binary Converter, Twoโ€™s Complement Calculator, Gray Code Converter and Truth Table Generator.
๐Ÿ”ข Number Systems Used in Digital Logic
BINARY 1010 base 2 DECIMAL 10 base 10 HEX / OCTAL A / 12 base 16 / base 8 Binary groups of 4 bits become hexadecimal digits. Binary groups of 3 bits become octal digits.
Input Number
Input Base
Bit Grouping
Prefix Format
Accepts prefixes such as 0b1010, 0x2A and 0o52. Spaces and underscores are ignored.
Examples:
Decimal Value
Bit Width
Display Format
Input Type
Signed Binary Optional
Use this when you need fixed-width binary for registers, ADC values, signed integers or twoโ€™s complement representation.
Presets:
Input Value
From Base
To Base
Uppercase Output
For arbitrary base conversion, digits can use 0โ€“9 and Aโ€“Z. Base must be between 2 and 36.
Examples:
A
B
Base
Operation
Bitwise AND / OR / XOR are useful for masks, registers and digital logic states.
Examples:

๐Ÿ“ Formula Reference

Binary to Decimal
decimal = ฮฃ(bit ร— 2^position)
Hex to Binary
1 hex digit = 4 binary bits
Octal to Binary
1 octal digit = 3 binary bits
Signed Range
n-bit signed range = -2^(n-1) to 2^(n-1)-1

๐Ÿ“‹ Quick Reference

Common Values
1111โ‚‚15 / Fโ‚โ‚†
11111111โ‚‚255 / FFโ‚โ‚†
10000000โ‚‚128 / 80โ‚โ‚†
Bit Width
4 bits1 hex digit
8 bits2 hex digits
16 bits4 hex digits
Prefixes
Binary0b
Octal0o
Hex0x

๐Ÿ“š Digital Logic Notes

Why hex is popularHexadecimal is easier to read than long binary strings. An 8-bit byte such as 11111111 becomes FF.
Unsigned vs signedThe same binary pattern can mean different values. 11111111 is 255 unsigned, but -1 in 8-bit twoโ€™s complement.
Bit width mattersFixed-width systems like 8-bit, 16-bit or 32-bit registers can overflow, wrap or change sign depending on interpretation.
Use with logic toolsAfter converting values, use the Truth Table Generator or Boolean Algebra Calculator to analyze logic behavior.

What is a Number System Converter?

A number system converter changes a value between binary, decimal, octal and hexadecimal. These number systems are used in digital electronics, microcontrollers, memory addresses, registers, programming and Boolean logic.

Why convert binary to hex?

Hexadecimal is a compact representation of binary. Four binary bits make one hex digit, so long binary values become easier to read, copy and debug.

Binary, decimal, hex and octal difference

Binary uses base 2, decimal uses base 10, octal uses base 8 and hexadecimal uses base 16. The value can be the same, but the written representation changes.

โ“ Frequently Asked Questions

Multiply each bit by a power of 2 based on its position and add the results. Example: 1010โ‚‚ = 8 + 2 = 10โ‚โ‚€.
Divide the decimal number by 2 repeatedly and read the remainders from bottom to top. The calculator does this instantly and can also pad the result to a selected bit width.
Replace each hexadecimal digit with its 4-bit binary equivalent. For example, Aโ‚โ‚† = 1010โ‚‚ and Fโ‚โ‚† = 1111โ‚‚.
255 in unsigned decimal is 11111111 in binary and FF in hexadecimal.
Unsigned binary uses all bits for magnitude. Signed twoโ€™s complement uses the most significant bit as the sign indicator, so the same bit pattern can represent a negative value.
Hex is compact and maps directly to binary groups of four bits, making it convenient for memory addresses, register values, color codes, machine code and debugging.