Binary numeral system

The binary numeral system is used to write numbers using two digits only: 0 and 1. This system is used by computers and signal processing. The binary digit is also called bit (binary digit).

Each bit has a value of 0 or 1 (binary value).

The rules of sum of bits

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10

Decimal to binary conversion

Decimal number: 1910 = ?2

19 : 2 = 9 and 1 as the remainder
  9 : 2 = 4 and 1 as the remainder
  4 : 2 = 2 and 0 as the remainder
  2 : 2 = 1 and 0 as the remainder
  1 : 2 = 0 and 1 as the remainder
 

The important digits are the remainders. We organize them from the last one to the first, from the left to the right: 100112
1910 = 100112

Binary to decimal conversion

Binary number: 1100112 = ?10

Each digit represents an increasing power of 2 (the rightmost 20, the next 21, ...). We take sum of the products of the binary digits and the powers of two (which they represent).

1100112 = 1*2^5 + 1*2^4 + 0*2^3 + 0*2^2 + 1*2^1 + 1*2^0
1100112 = 1*32 + 1*16 + 0*8 + 0*4 + 1*2 + 1*1
1100112 = 5110

 

Table of binary and decimal numbers

binarydecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
101010
101111
110012
110113
111014
111115

Bit, Byte

The basic unit of information in computing and digital communications is a bit (binary digit). A bit can have only one of two values; these values are most commonly represented as either a 0 or 1. Bits can be implemented in many forms, usually represented by an electrical voltage or current pulse, or by the electrical state of a flip-flop circuit. The unit symbol for the bit is b.

The byte is a unit of digital information in computing and telecommunications that (most commonly) consists of eight bits. It is the smallest addressable unit of memory (in many computer architectures). The byte can express the values 0 through 255. The unit symbol for the byte is B.

The byte consists of eight bits.
1 B = 8 b

b7b6b5b4b3b2b1b0

The decimal value 010 is represented as 000000002


The decimal value 25510 is represented as 111111112


As a unit of memory, the byte is often too small to express the amount of the capacity; this is why we use prefixes for multiples of bytes:

-B1 B20
kkB1024 B210
MMB1024 kB = 1048576 B220
GGB1024 MB = 1073741824 B230

Binary numeral system

binary to decimal, 2 → 10
input binary value:
output decimal value:

decimal to binary, 10 → 2
input decimal value:
output binary value:


Bit, Byte

Touch bit to toggle it
1286432168421
2 = 10
byte to bits
input byte (decimal) value:
{{Bits[7]}}{{Bits[6]}}{{Bits[5]}}{{Bits[4]}}{{Bits[3]}}{{Bits[2]}}{{Bits[1]}}{{Bits[0]}}
10 = {{Bits[7]}}{{Bits[6]}}{{Bits[5]}}{{Bits[4]}}{{Bits[3]}}{{Bits[2]}}{{Bits[1]}}{{Bits[0]}}2