Difference between revisions of "Binary number"

From ScienceZero
Jump to: navigation, search
Line 18: Line 18:
 
Since each digit is half the value of the bit to the left and double the value of the bit to the right it is simple to [[Division|divide]] or [[Multiplication algorithms|multiply]] a number by two by just shifting all bits just one position to the right or left. This is often the key to efficient computer programming.
 
Since each digit is half the value of the bit to the left and double the value of the bit to the right it is simple to [[Division|divide]] or [[Multiplication algorithms|multiply]] a number by two by just shifting all bits just one position to the right or left. This is often the key to efficient computer programming.
  
[[Category:Computing]]
+
[[Category:General information]]

Revision as of 14:29, 23 March 2008

The binary numeral system is a positional notation with a radix of 2. The symbols used in writing is usually 0 and 1.

Each binary digit has double the value of the preceding one, the first digit has the value 1.

 0001 = 1
 0010 = 2
 0100 = 4
 1000 = 8

Summing up the values for the digits that are 1 gives the number in decimal

 0001
 0010 = 2
 0100 = 4
 1000
 --------
 0110 = 6


Since each digit is half the value of the bit to the left and double the value of the bit to the right it is simple to divide or multiply a number by two by just shifting all bits just one position to the right or left. This is often the key to efficient computer programming.