Another trick to converting binary numbers to decimal is this:
Using this method, we'll always work from left to right.
Frequently, a binary number will have 0's in the beginning. Truncate all the 0's until your first number is a 1
Start with the decimal value "1" in your mind.
Now work left to right, for each 0 you encounter, double the number in your mind.
For each 1 you encounter, double the number and add 1
For example, the number 001101
Truncate the begining 0's.
1101
Start with 1
double and add 1
3
double
6
double and add 1
13 = final answer
Now lets convert it the other way to proove it
The Number: 001101
Position 0: 1 * 2^0 = 1
Position 1: 0 * 2^1 = 0
Position 2: 1 * 2^2 = 4
Position 3: 1 * 2^3 = 8
Position 4: 0 * 2^4 = 0
Position 5: 0 * 2^5 = 0
Decimal Value of 001101 = 13
----------------------------------
Binary and Bytes
Much the same way as the decimal system is broken into thousands, the binary system is broken into bytes.
There are 8 bits in one byte, same as there are 3 digits in a thousand.
A byte can hold a maximum of 255 values. Two bytes in a row can hold a maximum of 65535 values.
That's all I got for that
---------------------------------
Visual Basic Data Types.
In Visual Basic 6 there are 11 different data types.
These are Boolean, Byte, Currency, Date, Double, Integer, Long, Object, Single, String, and Variant.
The common ones:
Boolean
The Boolean data type has only two states, True and False. These types of variables are stored as 16-bit (2 Byte) numbers, and are usually used for flags
• Byte
The Byte data type is an 8-bit variable which can store value from 0 to 255. This data type is very useful for storing binary data.
• Double
The Double data type is a 64-bit floating point number used when high accuracy is needed. These variables can range from -1.79769313486232e308 to -4.94065645841247e-324 for negative values and from 4.94065645841247e-324 to 1.79769313486232e308 for positive values.
• Integer
The Integer data type is a 16-bit number which can range from -32768 to 32767. Integers should be used when you are working with values that can not contain fractional numbers.
• Long
The Long data type is a 32-bit number which can range from -2,147,483,648 to 2,147,483,647. Long variables can only contain non-fractional integer values. I myself use Long variables over Integers for increased performance.
• Single
The Single data type is a 32-bit number ranging from -3.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for positive values. When you need fractional numbers within this range, this is the data type to use.
• String
The String data type is usually used as a variable-length type of variable. A variable-length string can contain up to approximately 2 billion characters. Each character has a value ranging from 0 to 255 based on the ASCII character set. Strings are used when Text is involved.
http://www.rentron.com/datatypes.htm