Binary Calculator

Convert numbers between binary, decimal, octal, and hexadecimal systems. Perform arithmetic operations in binary.

Binary Operations

Result

1000

= 8 (Decimal)

Conversions

Decimal

42

Binary

101010

Octal

52

Hexadecimal

2A

Bit Representation

02^7
02^6
12^5
02^4
12^3
02^2
12^1
02^0

8 bits = 42

Powers of 2

2^0

1

2^1

2

2^2

4

2^3

8

2^4

16

2^5

32

2^6

64

2^7

128

Binary System

The binary system uses only 0 and 1. Each position represents a power of 2. It's the foundation of all digital computing, as electronic circuits have two states: on (1) and off (0).

Base Conversion

To convert from decimal to binary, repeatedly divide by 2 and read remainders bottom-up. To convert from binary to decimal, sum the powers of 2 where there's a 1.

Logical Operations

AND returns 1 only if both bits are 1. OR returns 1 if at least one bit is 1. XOR returns 1 if bits are different. NOT inverts each bit.