Mathematics Magazine for Grades 1-12  

 

Decimal-Binary Converter

     
  This program converts decimal numbers to binary   
Insert Number:

  Counting in the Binary (Base 2) Number System

The binary system is a base two system.  The only digits that can be used are 0 and 1.

 
 
The first 17 decimal integers and their binary equivalents:
Decimal Binary Decimal Binary
0 0 9 1001
1 1 10 1010
2 10 11 1011
3 11 12 1100
4 100 13 1101
5 101 14 1110
6 110 15 1111
7 111 16 10000
8 1000  
 
 
     
 

Positional Notation in the Binary Number System

We saw that each digit in a decimal number carries its own weight.  The rightmost digit in a decimal number is the units digit; the weight of each digit increases by a factor of 10 as one moves to the left.

Computers use binary number notation extensively.  In computers, each digit in a binary number is called a bit.  Eight bits make up one byte.  The rightmost digit in a binary number is the units digit.  The weight of each digit increases by a factor of 2 as one moves from right to left in a binary number.  The following table gives the positional weight of each bit in the byte 1100 0101 and uses the positional weight of each column to express the number in decimal form:

Positional Weight 27 26 25 24 23 22 21 20
Value 128 64 32 16 8 4 2 1
Number  1 1 0 0 0 1 0 1
Positional Notation 1100 0101 = 1x128 + 1x64 + 0x32 + 0x16 + 0x8 + 1x4 + 0x2 + 1x1 = 197 

Note the LSD in 1100 0101 is the right most digit which is 1 and the MSD is the left most digit which is 1.