Number Systems Calculator

Instantly convert between binary, hexadecimal, octal, and decimal. Includes bitwise operations and bit-width display.

๐Ÿ”ข Base Converter

โš™๏ธ Bitwise Operations

Enter two values below, then click an operation. Results shown in all bases.

๐Ÿ“Š Quick Reference: 0โ€“15 in All Bases

DecHexOctBinaryDecHexOctBinary
000000088101000
111000199111001
222001010A121010
333001111B131011
444010012C141100
555010113D151101
666011014E161110
777011115F171111

โ“ FAQ

How do I convert binary to decimal?

Multiply each bit by its positional power of 2 (from right: 2โฐ, 2ยน, 2ยฒ, โ€ฆ) and sum them. For example: 1010 = 1ร—8 + 0ร—4 + 1ร—2 + 0ร—1 = 10. This calculator does it instantly โ€” just type the binary number in the BIN field.

How do I convert decimal to hex?

Repeatedly divide by 16, recording remainders (0โ€“9 as digits, 10โ€“15 as Aโ€“F). Read remainders bottom-up. For example: 255 รท 16 = 15 rem 15 โ†’ FF. Or just type 255 in the decimal field above.

What is the difference between AND, OR, and XOR?

AND: output 1 only when both bits are 1 (masking). OR: output 1 when at least one bit is 1 (setting bits). XOR: output 1 when exactly one bit is 1 (toggling bits). XNOR is XOR inverted โ€” output 1 when bits are equal.

What is two's complement?

Two's complement is the standard way to represent negative integers in binary. To negate: invert all bits (NOT), then add 1. In 8-bit: โˆ’1 = 11111111 = 0xFF = 255 unsigned. This calculator shows unsigned values; for signed interpretation note that MSB=1 means negative in two's complement.