Sunday, December 16, 2012

How to convert binary to decimal and decimal to binary number


Binary numbers are used in digital technology such as in telecommunications, banking, computers, gaming, and multimedia. Binary numbers have 2 as their base and have only two possible values, 0 and 1. Decimal numbers have 10 as their base and have ten possible values, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Decimal is the default base whenever you turn on your scientific calculator from off position. Decimal numbers are the numbers that we use in ordinary day to day transactions. It is also what we teach our children in our homes to count 1 to 10. This article will demonstrate how to convert binary numbers to decimal numbers and the other way around, how to convert decimal numbers to binary numbers.

How to convert a binary number to a decimal number: (only 5 easy steps)

Example:
Convert 1001101 to decimal number.

   
Given:
1001101 binary number

Required:
Decimal number equivalent to 1001101 binary number

Solution:
1. Copy the binary number and separate each binary number with a space.
1 0 0 1 1 0 1

2. Count the total number of binary numbers. In this example, there are seven binary numbers. Because there are seven binary numbers we will place 0, 1, 2, 3, 4, 5, 6 at the bottom of each binary number starting from the left to the right. These are the exponents to which the bases of two will be raised to.
1 0 0 1 1 0 1
6 5 4 3 2 1 0

3. Put 2 as the base for all the binary numbers.
1 0 0 1 1 0 1
6 5 4 3 2 1 0
2 2 2 2 2 2 2

4. Looking at the given binary number, determine which binary numbers are switched ON (those with values 1). Switched OFF means those binary numbers having values of 0 (zero). Starting from the right to left, the values that are 'switched on' are the first, third, fourth, and seventh. The 'switched on' positions have 0, 2, 3, 6 as their corresponding exponents.
1 1 1 1
6 3 2 0
2 2 2 2

5. Raise the 'switched on' positions using 2 as the base to their corresponding exponents. After raising to their corresponding exponents, their invidivual results will be added.
2^0 + 2^2 + 2^3 + 2^6
1 + 4 + 8 + 64
= 77

Answer:
1001101 binary number = 77 decimal number


Example:
Convert 110001 binary number to decimal number.

Solution:

Place the exponents 0, 1, 2, 3, 4, 5
1 1 0 0 0 1
5 4 3 2 1 0

Place the base 2 in all of the numbers.
1 1 0 0 0 1
5 4 3 2 1 0
2 2 2 2 2 2

Remove all 'switched off' values.
1 1 1
5 4 0
2 2 2 

Raise 2 to the exponents and add the results.
2^0 + 2^4 + 2^5 
1 + 16 + 32
= 49

Answer:
110001 binary number = 49 decimal number

-------------------------------------------------------------

How to convert a decimal number to a binary number: (in 5 simple steps)
     
Example:
Convert 12 (decimal number) to a binary number.

    
Given:
12 (decimal number)

Required:
Binary representation of 12 (decimal number).

Solution:
1. Determine if the given decimal number is even or odd. In this example, 12 is an even number.

2. The result of adding two even numbers is EVEN, e.g. 4 + 8 = 12.

3. Arrange the exponents 0, 1, 2, 3. In this case, the maximum exponent is 3 because 2^4 is equal to 16 which will be greater than 12. After laying out the exponents, put 2 as bases.
3 2 1 0
2 2 2 2

4. Assuming, they are all 'switched on', the equivalent decimal will be,
2^0 + 2^1 + 2^2 + 2^3
1 + 2 + 4 + 8
= 15

5. Because we are getting the equivalent binary number for the decimal number 12, and knowing that adding two even numbers would yield an even number, and we must remove 3 from 15, therefore:
2^0 and 2^1 must be switched off --> first position is 0, second position is 0
2^2 and 2^3 must be switched on --> third position is 1, fourth position is 1
so that,
2^2 + 2^3
4 + 8
= 12

Answer:
Starting from right to left and combining the first to the fourth positions, we will get 1100.
1100 binary = 12 decimal

Example:
What is the binary representation of the decimal number 25?

    
Solution:
The given decimal number 25 is an odd number. Even number plus Odd number is an ODD number, e.g. 24 + 1 = 25.
In order to obtain 25, the fifth position, fourth position, and first positions must all be switched on.
The second and third positions must be switched off.
So that,
1 1 0 0 1
4 3 2 1 0
2 2 2 2 2

Adding only the switched on positions,
2^0 + 2^3 + 2^4
1 + 8 + 16
= 25

Therefore,
11001 is the binary number equivalent to the decimal number 25.

(I chose the number 25, in memory of my father's basketball shirt's number).

Tuesday, December 4, 2012

MATHEMATICS: Ratio, Proportion, Variation - Force of Gravitation, Weight, surface Illumination intensity, current, resistance


WEIGHT is inversely proportional to the SQUARE OF R


where:

WEIGHT = force of attraction between the Earth and an object

R = distance of object from the center of the Earth


example:

A satellite weighs 700 N (Newtons) on the surface of the Earth. How much will the satellite weigh at an altitude of 250 km above the Earth's surface. Take the radius of the Earth as 4000 miles.


given:

W1 = 700 N

R1 = 4000 mi

R2 = 4000 + 250

R2 = 4250


find:

W2 = weight of satellite at an altitude of 250 km above the Earth


solution:


W = k/R^2

k = W * R^2

W1 * (R1)^2 = W2 * (R2)^2

700 * (4000)^2 = W2 * (4250)^2

W2 = 700 * (4000)^2/(4250)^2

W2 = 700 * 16,000,000/18,062,500

W2 = 620 N  ---> the satellite is lighter




INTENSITY OF SURFACE ILLUMINATION is inversely proportional to the SQUARE OF THE DISTANCE BETWEEN THE SOURCE AND THE SURFACE



example:

A certain light source has an illumination of 700 lux (lumens per square meter) on a surface. If the distance is doubled, find the resulting illumination.


given:

I1 = 700 lux

d1 = initial distance

d2 = 2 * d1


find:

I2 = surface illumination when the distance is doubled



solution:


I = k/d^2

k = I * d^2

I1 * (d1)^2 = I2 * (d2)^2


700 * (d1)^2 = I2 * (2 * d1)^2

700 * (d1)^2 = I2 * 4 * (d1)^2

I2 = 700/4

I2 = 175 lux  ---> reduced to 1/4 or 25% of the initial illumination





ELECTRIC CURRENT is inversely proportional to CIRCUIT RESISTANCE



example:

When the resistance of a circuit is increased by 10%, by what percent will the current change?


given:

R1 = initial circuit resistance

R2 = 1.10 R1

I1 = initial current


find:

I2 = current when resistance is increased by 10%


solution:


I = k/R

k = I * R

I1 * R1 = I2 * R2

I1 * R1 = I2 * 1.10 R1 

I1 = 1.10 I2  ---> equation 1



%I = [(I2 - I1)/I1] * 100%


substituting from equation 1,

%I = [(I2 - 1.10 I2)/1.10 I2] * 100%

%I = [-0.10/1.10] * 100%

%I = -9.09 % (negative value means decrease)

%I = 9.09 % decrease in Electric current

MATHEMATICS: Ratio, Proportion, Variation - Conductor wire Resistance, Reactance, Capacitance, Photograph exposure time, F stop of lens


RESISTANCE is inversely proportional to the SQUARE OF WIRE DIAMETER


example:

A wire AWG size 12 of 0.08 inches in diameter has a resistance of 15 ohms. Find the resistance of AWG 10 size conductor with a diameter of 0.10 in. Assume same length and same material.


given:

d1 = 0.08 in

R1 = 15 ohms

d2 = 0.10 in


find:

R2 = resistance of AWG 10 (diameter = 0.10 in)


solution:


R = k * 1/d^2

k = R * d^2

R1 * (d1)^2 = R2 * (d2)^2

15 * (0.08)^2 = R2 * (0.10)^2

R2 = 15 * (0.0064)/(0.10)^2

R2 = 15 * (0.0064)/(0.0100)

R2 = 9.6 ohms




CAPACITIVE REACTANCE is inversely proportional to CAPACITANCE


example:

If the capacitance of a circuit is increased by 50%, what percent will the capacitive reactance change?


given:

c1 = initial capacitance

c2 = 1.5 c1

R1 = initial capacitive reactance

R2 = final capacitive reactance


find:

%R = percent change in capacitive reactance corresponding to a 50% increase in capacitance


solution:


R = k/c

k = R * c

k = R1 * c1 = R2 * c2

R1 * c1 = R2 * c2

R1 * C1 = R2 * 1.5 C1

R1 = 1.5 R2  ---> equation 1


%R = [(R2 - R1)/R1] * 100%


substituting from equation 1,

%R = [(R2 - 1.5 R2)/1.5 R2] * 100%

%R = [-0.5/1.5] * 100%

%R = -33.33 % (negative value means decrease)

%R = 33.33 % decrease in capacitive reactance





TIME OF EXPOSURE is directly proportional to the SQUARE OF THE F STOP OF A LENS


example:

A photograph is exposed at a shutter speed of 0.02 seconds with a lens opening of f6. What shutter speed is required if lens opening is changed to f8.


given:

t1 = 0.02 sec

f1 = 6

f2 = 8


find:

t2 = shutter speed for a lens opening of f8



solution:


f stop of a lens = L/D


where:

L = focal length

D = diameter



t = k * f^2

k = t/f^2

t1/(f1)^2 = t2/(f2)^2

(0.02)/(6)^2 = t2/(8)^2

t2 = (0.02) * (8)^2/(6)^2

t2 = 0.02 * 64/36

t2 = 0.036 seconds

MATHEMATICS: Ratio, Proportion, Variation - FREEFALL, DISPLACEMENT, RESISTOR POWER and CURRENT, PENDULUM OSCILLATIONS and LENGTH


1. DISTANCE TRAVELLED is directly proportional to the SQUARE OF THE TIME OF TRAVEL (freefall, freely falling bodies)



example:

If a body falls 200 meters in 8 seconds, How far will it fall in 10 seconds?


given:

S1 = 200 m

t1 = 8 sec

t2 = 10 sec


solution:


S = kt^2

k = S/t^2

S1/(t1)^2 = S2/(t2)^2

200/(8)^2 = S2/(10)^2

200/64 = S2/100

S2 = 200 * 100/64

S2 = 312.5 m




2. POWER IN A RESISTOR is directly proportional to the SQUARE OF THE CURRENT



example:

How many times the current in an electric heating coil be increased such that the power consumed will be 4 times.


given:

P1 = x

P2 = 4x


solution:


P = kI^2

k = P/I^2

P1/(I1)^2 = P2/(I2)^2

x/(I1)^2 = 4x/(I2)^2

(I2)^2 = (I1)^2 * 4x/x

(I2)^2/(I1)^2 = 4


if I1 = 7 amp


(I2)^2/(7)^2 = 4

(I2)^2/49 = 4

(I2)^2 = 4 * 49

(I2)^2 = 196

(I2) = sqrt (196)

I2 = 14 amp ---> twice of I1


therefore, if the POWER consumed is 4 times, the CURRENT will be doubled




3. PENDULUM OSCILLATIONS inversely proportional to SQUARE ROOT OF LENGTH OF PENDULUM



example:

A pendulum of 12 in length oscillates at 2 oscillations per second. If the length is increased twice, that is, 24 in., how many oscillations does the pendulum produces?


given:

n1 = 2 oscillations/sec

L1 = 12 in

L2 = 24 in


find:

n2 = oscillations if the length is doubled



solution:


n = k/sqrt(L)

k = n * sqrt(L)

n1 * sqrt(L1) = n2 * sqrt(L2) 

2 * sqrt(12) = n2 * sqrt(24)

n2 = 2 * sqrt(12)/sqrt(24)

n2 = 2 * 3.464/4.899

n2 = 2 * 0.707

n2 = 1.4 oscillations/second

MATHEMATICS: Ratio, Proportion, Variation - Power, Resistance of Conductor, Volume, Turbine Flowrate


1. POWER is directly proportional to DISPLACEMENT (total volume swept out by the pistons)



example:

A Honda engine delivers 240 horsepower and has a displacement of 3 liters. If displacement is changed to 3.8 liters, how much horsepower does the Honda engine deliver?


given:

P1 = 240 horsepower

D1 = 3 liters

D2 = 3.8 liters


find:

P2 = horsepower corresponding to a displacement of 3.8 liters


solution:


P = kD

k = P/D

k = P1/D1 = P2/D2

P1/D1 = P2/D2

240/3 = P2/3.8

P2 = 240 * 3.8/3

P2 = 304 horsepower



2. RESISTANCE OF CONDUCTOR is directly proportional to LENGTH OF CONDUCTOR



example:

If the resistance of 3 miles of transmission line is 170 ohms, what is the resistance of a 30-mile transmission line?


given:

R1 = 170 ohms

L1 = 3 miles

L2 = 30 miles


find:

R2 = resistance of a 30-mile transmission line


solution:



R
 = kL


k = R/L

k = R1/L1 = R2/L2

R1/L1 = R2/L2

170/3 = R2/30

R2 = 170 * 30/3

R2 = 1700 ohms




3. POWER is directly proportional to the FLOWRATE THROUGH THE TURBINES



example:

A turbine flowrate of 6000 gpm produces 45 MW. If the flowrate through the turbines is reduced to 3000 gpm (half), how much power would be produced?


given:

Q1 = 6000 gpm (gallons per minute)

P1 = 45 MW

Q2 = 3000 gpm


find:

P2 = power produced with 3000 gpm (half the flowrate through the turbines)


solution:


P = kQ

k = P/Q

k = P1/Q1 = P2/Q2

P1/Q1 = P2/Q2

45/6000 = P2/3000

P2 = 45 * 3000/6000

P2 = 22.5 MW --------> also half of the POWER would be produced, thus confirming a direct proportion