TVEffects
 
  A bit About Bits and Bytes    
A bit is an acronym for "binary digit" and is the smallest unit of data that can be processed or represented to a computer. A bit has a single binary value of either a one or zero. A bit is represented by a lower case "b." A bit having a value of one typically means that the state of the value is on. A bit having a value of zero typically means that the state of the value is off.

A Byte is made up of a series of 8 bits (also referred to by some as an octet). An example of 8 bits is: 0110 1100. Half of a byte is called a nibble. So in the previous example, a nibble would be either 0110 or 1100. Bytes are used by computers to represent elements such as alphabetic characters, and numerals. Bytes are also the common unit of measurement for bandwidth, RAM, and hard disk space. A byte is represented by an upper case "B."

Frequently, bits and bytes are used interchangeably by authors, but as can be seen by the above definition, the two terms have different meanings. Therefore, 100 b = 100 bits and 100 B = 100 bytes.

Converting Decimals to Binary
Ultimately, computers convert decimal numbers into binary for processing. The highest decimal that can be represented by an 8 bit number is 256 (0 - 255).

Method 1
One popular method for converting decimals to binary, is to divide a number by two until no further division is possible. The following examples show the steps for representing the decimal number 33 in binary

  128 64 32 16 8 4 2 1
33 / 2 = 16 Remainder 1               1
16 / 2 = 8 Remainder 0             0  
8 / 2 = 4 Remainder 0           0    
4 / 2 = 2 Remainder 0         0      
2 / 2 = 1 Remainder 0       0        
1 / 2 = 0 Remainder 1     1          
    0            
  0              

Therefore decimal 33 in binary is: 0010 0001.

Method 2
Another effective method for converting a decimal to binary is to find the highest binary digit column that can be divided into the decimal. Starting with the left most column, if the number represented by the column can be divided into the decimal (with or without a remainder) then a one is entered into the column - subtract the decimal by the value represented by the column and move to the next column to the right and repeat the procedure.

The following example converts decimal 250 to binary:

  128 64 32 16 8 4 2 1
250 - 128 = 122 Bit = 1 1              
122 - 64 = 58 Bit = 1   1            
58 - 32 = 26 Bit = 1     1          
26 - 16 = 10 Bit = 1       1        
10 - 8 = 2 Bit = 1         1      
2 - 4 = -2 Bit = 0           0    
2 - 2 = 0 Bit = 1             1  
0 - 1 = -1 Bit = 0               0

Decimal 250 = 1111 1010


Converting Binary to Decimal
To convert a binary number to decimal, simply enter the octet into the chart below and add together the columns that have a one together. This will add up to the equivalent decimal.

128 64 32 16 8 4 2 1
1 1 1 1 1 0 1 0

128
64
32
16
6
+ 2

250
 

Binary 1111 1010 = decimal 250.

While converting numbers between binary and decimal is handled by the computer for us, there are times when it is necessary to manually calculate between one format and the other. This article should help in the converting of numbers up to 255. (0 - 255).